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 - Employment Hero Payroll API Reference: Leave Requests
Get Leave Requests for Employee - Employment Hero Payroll API Reference: Get Leave Requests for Employee
Create Leave Request - Employment Hero Payroll API Reference: Create Leave Request
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.