Login to leave a review
Support
NOTE: This is an example and will require additional adjustments before immediate functionality.
How to set up (on Geotab)
These are the workflows required to implement the solution.
- In MyGeotab, navigate to People ⇒ Users & Drivers ⇒ Add
- Follow the guidelines in the Service Account documentation
How to set up (on ADP)
- Prerequisite is to have the Client ID, Client Secret, and Certificate Signing Request (CSR) ready before making your first API call in ADP.
- Configure Postman with relevant certificates, files, and ADP APIs, follow here
- Request a Bearer Token and use it in Authorization Header to perform a test API call, follow here. This link provides steps to GET HR - Worker (List) API as an example.
How to set up Middleware
- Configure the Middleware to authenticate into MyGeotab using the service account for the appropriate database.
- OPTIONAL:
It is possible to stream data from a MyGeotab database to a relational database in your environment. Integrations might choose to do this to cache data, or to repurpose data for other needs. Using this method, the Middleware would call the relevant data from the environment instead of making a Geotab API call. See the MyGeotab API Adapter documentation for more details. - Make a Get DutyStatusLog call to get Hours of Service information for drivers with the desired logic to extract hours worked by drivers to be used in ADP.
Example call to get started:
api.call("Get", {
"typeName":"DutyStatusLog",
"search":{
"fromDate": "2023-01-01T16:44:37.170Z",
"toDate": "2023-10-23T16:44:37.170Z",
"userSearch":{"id":"b41B4FD6A"}
}
}, function(result) {
console.log("Done: ", result);
}, function(e) {
console.error("Failed:", e);
});
Sample response object of above API call:
-0: Object
dateTime: "2023-07-19T17:04:04.128Z"
deferralMinutes: 0
deferralStatus: "None"
-device: Object
id: "b336A"
-driver: Object
id: "b41B4FD6A"
editDateTime: "2023-07-19T17:04:04.128Z"
eventCheckSum: "000000000000008b"
eventCode: 1
eventRecordStatus: 1
eventType: 5
id: "aWqosQhYXU0-XsZErEoVHVw"
isIgnored: false
isTransitioning: false
malfunction: "None"
origin: "Manual"
sequence: "0000000000000000"
state: "Active"
status: "Login"
version: "000000003a48cade"
4. Authenticate against your ADP account and modify pay data input hours and earnings information referencing the below POST REQUEST sample. Fields like associateOID,payrollFileNumber,earningCode,numberOfHours, etc. should be modified as per specific use-case and available configurations. Detailed information can be found here and here.
Method Path | /events/payroll/v1/pay-data-input.modify |
HTTP Method | POST |
Accepted content type(s) | application/json |
Canonical URL | payroll/payrollManagement/payrollProcessing/payDataInputManagement/pay-data-input.modify |
Token type | Oauth 2.0 |
Required scope(s) | Client id/client secret |
Media Type: application/json
{
"events": [
{
"data": {
"eventContext": {
"payrollGroupCode": {
"codeValue": "BOQ"
},
"payrollProcessingJobID": "Hours, Earning Codes"
},
"transform": {
"payDataInput": {
"payeePayInputs": [
{
"associateOID": "{{employeeAOID}}",
"payNumber": "1",
"payrollProfilePayInputs": [
{
"payrollFileNumber": "{{payrollFileNumber}}",
"payInputs": [
{
"earningInputs": [
{
"earningCode": {
"codeValue": "R"
},
"numberOfHours": 80
},
{
"earningCode": {
"codeValue": "O"
},
"numberOfHours": 10
},
{
"earningCode": {
"codeValue": "B"
},
"earningsAmount": {
"amountValue": 75,
"currencyCode": "USD"
}
}
],
"deductionInputs": [],
"memoInputs": [],
"reportableEarningAndBenefitInputs": [],
"taxInputs": [],
"_modificationTypeCode": "Add"
}
]
}
]
}
]
}
}
}
}
]
}
5. Validate the RESPONSE body such that the API call was successful.
Login to leave a review
Free solution