Skip to end of banner
Go to start of banner

Employment Hero Leave Requests

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

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.

  • No labels