/
DCR - Employment Hero Leave Requests

DCR - Employment Hero 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 Employment Hero 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

Create Leave Request - https://api.keypay.com.au/australia/reference/leave-requests/au-hours-leave-request--post

SAMPLE RESPONSE

A sample response from Employment Hero 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 Employment Hero.

 

Related content

Employment Hero Leave Requests
Employment Hero Leave Requests
More like this
DCR - Employment Hero - Time Sheet Sync
DCR - Employment Hero - Time Sheet Sync
More like this
DCR - Employment Hero - Employee Sync
DCR - Employment Hero - Employee Sync
More like this
DCR - Multi Participant Scheduling
DCR - Multi Participant Scheduling
More like this
MyForce Glossary: Data model
MyForce Glossary: Data model
More like this