/
KeyPay - Leave Requests

KeyPay - Leave Requests

Leave Requests are retrieved from Employment Hero and added into Salesforce as Resource Absence records.

SCHEDULED SERVICE

Salesforce will run a process each night at a specified time to retrieve Leave Request records from KeyPay and create them as Resource Absence records in Salesforce.

To run the process we use this code.

new EHGetApprovedLeaveRequestsProc().start();

API REFERENCES

Leave Requests API Reference - https://api.keypay.com.au/australia/reference/leave-requests

Get Leave Requests for Employee - https://api.keypay.com.au/australia/reference/leave-requests/au-hours-leave-request--get-leave-requests

SAMPLE RESPONSE

A sample response from KeyPay when retrieving a Leave Request is detailed below.

{ "totalHours": 30.40000, "hoursApplied": 0.0, "id": 4261501, "employeeId": 5384635, "leaveCategoryId": 389714, "employee": "Gabriela Donnelly", "leaveCategory": "Annual Leave", "fromDate": "2023-05-26T00:00:00", "toDate": "2023-05-31T00:00:00", "notes": null, "status": "Approved", "attachmentId": null }

ABSENCE TYPES

Resource Absence Type values in Salesforce match the same values that are available for an employee to select in KeyPay.

 

Related content

Employment Hero Leave Requests
Employment Hero Leave Requests
More like this
DCR - Employment Hero Leave Requests
DCR - Employment Hero Leave Requests
More like this
Keypay/Employment Hero Integration
Keypay/Employment Hero Integration
More like this
Employment Hero - Time Sheet Sync
Employment Hero - Time Sheet Sync
More like this