In Onboard, you can configure a webhook to be triggered whenever a worker performs an action: either they have completed a task, or they have reached the end of the flow.
This configuration can be found by adding a Universal Task with a Webhook integration, and selecting the corresponding trigger:
Once the flow is published, every time a worker reaches the trigger point for that task, a POST call is made to that endpoint, containing the following payload:
{
"worker": {
"uuid": "b897bd4d-3bd3-4e98-aa94-69cba600c679",
"firstName": "Harry",
"lastName": "Potter",
"startDate": "2024-08-07",
"email": "[email protected]",
"customAttributes": {
"Compliance Drivers License": {
"url": null,
"complianceCheckTemplateUuid": "85fb6026-be74-4fe2-9054-f806f577a852"
},
"In Compliance": false,
"Onboard completed": false
},
"workerPageUrl": "http://localhost:8200/employer/workers/b897bd4d-3bd3-4e98-aa94-69cba600c679"
},
"tasks": [
{
"title": "Welcome to the team!",
"uuid": "5bed4436-2ef0-4f0f-a49f-539cf7e4671a",
"status": "completed",
"type": "informationSharing",
"data": {
"inputData": [],
"w4Profile": null,
"i9Profile": null,
"hirePapiProfile": null
}
}
],
"flowTitle": "webhook"
}