Contact support

Integrations & Payroll Export

People HR Integration

SWF

Overview

Outbound integration between SWF and People HR consists of fetching subset of employee records, approved absence details, approved holiday details, other event's details, maternity/paternity details, and writing back, adding and updating Lateness, other events and timesheets.

From To Employees People HR SWF Departments People HR SWF Locations People HR SWF Absences People HR SWF Holiday People HR SWF Maternity/paternity People HR SWF Other Event Absences People HR SWF Swipes SWF People HR T&A Exceptions SWF People HR Leave Reason People HR SWF Employee Custom Fields People HR SWF Absence Request People HR SWF

Data exchange Inbound Integration Outbound Integration

Employ Details

Fetching Employee details, such as employee id, first name, last name, department name, location, start date, status, job title, leave date and leave reason

The Employee Number field is treated as the unique identifier between the two systems. During synchronization, the service downloads the list of employees from the PeopleHR API. Employees with employee numbers not found in SWF are considered new, and new SWF employees will be created for them. Employees whose employee codes match existing SWF employees are considered already existing, and their fields will be updated.

Note: The department field is required for an employee in SWF. PeopleHR employees with an empty department field will not be imported.

Integration service is going to get Employee Details from POST /Employee endpoint with action "GetAllEmployeeDetail". Service is going to import data to multiple tables, such as Employees, Departments, Locations, EmployeeCustomFields and LeaveReasons.

Mapping between systems fields: People HR SWF (Employee) EmployeeId Code (Unique Identifier)* Badge (autogenerated) FirstName First Name LastName Last Name StartDate Start Date IsActive Active LeaveDate Leave Date * Sometimes referred as Employee Code

If received employee has Location, and Department with this name is absent then service will create Department with the name of Location and this is going to be a parent department People HR SWF (Department) Location Name

If received employee has Department, and Department with this name is absent then service will create Department with the name of Department assigned to received employee People HR SWF (Department) Department Name

If received employee has ReasonForLeaving then integration service creates LeaveReason with the name of ReasonForLeaving People HR SWF (LeaveReason) ReasonForLeaving Name

If received employee has "JobRole" and Employee Custom Fields contains a Custom Field with name "Job Title" then service creates Employee Custom Fields with the value of JobRole People HR SWF (Employee Custom Fields) JobRole Value

Absence Details

Fetching Absences details, such as employee id, start date, end date, part of the day of the absence, status and reason

Service is going to get Absence Details from POST /Absence endpoint with action "GetAbsenceDetail". Service is going to map data to AbsenceRequests to put absences for Clockings. The service searches for approved absences in the PeopleHR system within the date interval configured in the synchronization settings (set as today minus x days).

Service is going to get absence first by absence name, which is in this case Reason within the Absence Details People HR SWF (Absence) Reason Name

Then service will add AbsenceRequest using this absence and other fields from GetAbsenceDetail People HR SWF (Absence) StartDate Start Date EndDate End Date PartOfDay Absence Period

Holiday Details

Fetching Holidays details, such as employee id, start date, end date, part of the day, status

The integration service is going to get Absence Details from POST /Holiday endpoint with action "GetHolidayDetail". Service is going to map data to AbsenceRequests then to put absences for Clockings.

Service is going to use Absence named "Holiday" and the rest of the mapping is going to be the same as Absence Details People HR SWF (Absence) StartDate Start Date EndDate End Date People HR SWF (Absence) PartOfDay Absence Period

Other Events

Fetching Other events details, such as id of the event, start date, end date, start time, end time, reason, status, duration in days

Service is going to get Absence Details from POST /OtherEvent endpoint with action "getothereventdetail". Service is going to map data to AbsenceRequests and put absences for Clockings.

Other events don't have AM or PM for part of the day There is only start time and end time, we should identify if it is Morning or Afternoon absence on our own It was agreed earlier that if Other Events starts within 2 hours of expected start time of the day - it is morning duration

Service is going to get absence first by absence name, which is in this case Reason within the Other Events People HR SWF (Absence) StartDate Start Date EndDate End Date

Maternity / Paternity Details

Fetching Maternity/Paternity details, such as employee Id, start date and end date

Service is going to get Maternity/Paternity Details from POST /MaternityPaternity endpoint with action "GetMaternityPaternityByEmployeeId". Service is going to map data to AbsenceRequests then to put absences for Clockings.

Service is going to use Absence named "Maternity / Paternity" and the rest of the mapping is going to be the same as Absence Details but absence is going to be for the Whole day People HR SWF (Absence) StartDate Start Date EndDate End Date

Deleted Holiday Details

Fetching deleted Holiday details, such as employee Id, start date, end date and part of the day. Must be a custom query on People HR exposed over api

Service is going to get Deleted Holiday Details from POST /Query endpoint with action "GetQueryResultByQueryName" and query name "CS - Deleted Holidays". Service is going to map data to AbsenceRequests then to remove absences for Clockings. People HR SWF (Absence) StartDate Start Date EndDate End Date Part of the Day Period

Lateness

Sending Lateness data, such as employee id, late date, how late and comments. Sent As Other Events with type lateness

First will get lateness for period for employee with POST /Late and action "GetLateByEmployeeId" If exists on server - update, if not - create new Lateness If update - will use action "UpdateLate" with POST /Late If create - will use action "AddNewLate" with POST /Late SWF People HR Date LateDate Employee Code EmployeeId Lateness Minutes HowLate

Timesheet

Sending Timesheets data, such as employee id, Timesheet date, first "in" swipe time, first "out" swipe time... till sixth "in" swipe time, sixth "out" swipe time, and comments.

Firstly, service will get swipes for period, if exists on server - update, if not - create. Getting data from PeopleHR by using action "GetTimesheetDetail" with POST /Timesheet If update - will use action "UpdateTimesheet" with POST /Timesheet If create - will use action "CreateNewTimesheet" with POST /Timesheet SWF People HR Employee Code EmployeeId Date TimesheetDate In1 TimeIn1 Out1 TimeOut1 In2 TimeIn2 Out2 TimeOut2 In3 TimeIn3 Out3 TimeOut3 In4 TimeIn4 Out4 TimeOut4 In5 TimeIn5 Out5 TimeOut5 In6 TimeIn6 Out6 TimeOut6 note Comments

No Swipes

Sending no swipes as OtherEvent by using POST /OtherEvent. First it's going to get OtherEvents using POST /OtherEvent and action "getothereventdetail" to get all OtherEvents between two dates and for one employee. If exists on server, service is going to update it, if not - create. If exists in people hr and not in TLW - delete.

If update - will use action "updateothereventleave" with POST /OtherEvent SWF People HR Date StartDate, EndDate Employee Code EmployeeId 1 DurationType "No swipe" Other Event Reason SWF People HR 1 DurationInDays OtherEventId Id

If create - will use action "addothereventleave" with POST /OtherEvent SWF People HR Date StartDate, EndDate Employee Code EmployeeId 1 DurationType "No swipe" Other Event Reason 1 DurationInDays

if delete - will use action "DeleteOtherEvent" with POST /OtherEvent and will pass OtherEvent Id and employee Id

Configuration

See document attached - the configuration settings listed at the bottom of the document.