KeyPay - Time Sheet Sync
SUMMARY
Time Sheet
Records are created in Salesforce based on a configured scheduled process which runs at an agreed time. This configuration can be access via the Time Sheet Settings option in the Setup Menu.
Generated Time Sheets
have Time Sheet Entry
Records associated to them when workers complete a Service Appointment
. Time Sheet Entry
Records are usually auto generated based on the employee checking in and checking out of their appointment.
At an agreed time a scheduled process runs in Salesforce to sync the Time Sheets
with their related Time Sheet Entries
to KeyPay. When the sync is complete, the Time Sheet Entry Records will be available in KeyPay for approval.
Salesforce Finance Users can also sync Time Sheet
Records individually from Salesforce.
From a Service Resource
Record you will be able to see related Time Sheet
Records.
The Contact
Field on the Service Resource
should be populated with a Contact
who has been synced to Employment Hero, this is where we retrieve the Payroll ID
of the employee to accurately assign the Time Sheet
Records in Employment Hero.
Clicking into the Time Sheet
Record you will see a EH Sync
quick action at the top of page. Clicking this button will attempt to sync the Time Sheet
to KeyPay, the result will be returned in the EH Sync Status
and EH Sync Details
fields.
This process will fail if there are no related Time Sheet Entry
Records related to the Time Sheet
.
Clicking into the Time Sheet Entry
Record, you will see sync details for each individual Time Sheet Entry
as well, with the ability to sync to KeyPay via the EH Sync quick action.
TECHNICAL SPECIFICATION
From a Time Sheet
and Time Sheet Entry
record in Salesforce we will trigger the creation of Time Sheet
and Time Sheet Entry
records in Employment Hero through the KeyPay API.
A summary of the Time Sheet
data services can be found here - https://api.keypay.com.au/australia/reference/timesheets
We will use the following methods:
Method | HTTP Request | Description |
---|---|---|
| When a
We can run a Bulk Insert | |
| When a | |
| If a | |
| If a | |
| If a |
TIME SHEET MAPPING
https://api.keypay.com.au/australia/reference/timesheets/au-timesheet--post?v=latest
Method | HTTP Request | Description |
---|---|---|
| When a
We can run a Bulk Insert | |
| When a | |
| If a | |
| If a | |
| If a |
TIME SHEET ENTRY MAPPING
https://api.keypay.com.au/australia/reference/timesheets/au-timesheet--post-individual?v=latest
KeyPay | Salesforce | Notes |
---|---|---|
classification |
| DO NOT MAP |
classificationId |
| DO NOT MAP |
comments | TimeSheet.Description |
|
employeeId | TimeSheet.ServiceResourceId.Contact__c.Employment_Hero_ID__c |
|
endTime | TimeSheetEntry.EndTime |
|
externalId |
| |
fullyQualifiedLocationName |
| DO NOT MAP |
hiddenComments |
| DO NOT MAP |
id |
|
|
leaveCategoryId |
| DO NOT MAP |
locationId |
| DO NOT MAP |
locationIdDeleted |
| DO NOT MAP |
payCategoryId |
| DO NOT MAP |
rate |
| DO NOT MAP |
shiftConditionIds |
| DO NOT MAP |
shiftConditions |
| DO NOT MAP |
source |
|
|
startTime | TimeSheetEntry.StartTime |
|
status | TimeSheetEntry.Status |
|
units | TimeSheetEntry.EndTime - TimeSheetEntry.StartTime | Create new formula field |
workType | Service_Appointment__r.WorkOrder.WorkType |
|
workTypeId | Service_Appointment__r.WorkOrder.WorkType.Employment_Hero_Code__c |
|