...
In order to enable the integration, it’s necessary to create webhooks for each entity. They should be created in the origin
platform, see direction above.
Default webhook configuration
To be able to authenticate with the foreign Rest API, all webhooks should contain access tokens for both platforms. On Employment Hero you should set it as webhook properties and on Tātou as webhook request params:
...
Setting necessary webhooks
Employee webhook on Employment Hero
To setup the employee webhook, use Employment Hero API webhookregistrations
with the following payload, replacing all {{variables}}
:
Code Block | ||
---|---|---|
| ||
// POST https://api.yourpayroll.com.au/api/v2/business/{businessId}/webhookregistrations { "webHookUri": "https://integrations-tatou.app/production/keypay/employee", "secret": "", "description": "employee-tatou", "isPaused": false, "filters": [ "EmployeeTerminated", "EmployeeUpdated" ], "headers": {}, "properties": { "tatou_token": "{{tatou_token}}", "keypay_token": "{{keypay_token}}", "keypay_business_id": "{{keypay_business_id}}" } } |
PayRun webhook on Employment Hero
PayRun webhook is responsible for sending awards interpretation back to Tātou.
Code Block | ||
---|---|---|
| ||
// POST https://api.yourpayroll.com.au/api/v2/business/{businessId}/webhookregistrations { "webHookUri": "https://integrations-tatou.app/production/keypay/pay-earnings", "secret": "", "description": "pay-earnings-tatou", "isPaused": true, "filters": [ "PayRunFinalised" ], "headers": {}, "properties": { "tatou_token": "{{tatou_token}}", "keypay_token": "{{keypay_token}}", "keypay_business_id": "{{keypay_business_id}}" } } |
PayPeriod webhook on Tātou
On Tātou you can use the Office interface to setup your webhooks. On Subscriptions, you should enable the PayPeriod - Send
event.
...
Data gap between platforms
Every platform has a different approach for dealing with data structure. In order to fill this gap we created lambda functions, so when creating webhooks you should point them to these functions. Functions are available under the subdomain https://integrations-tatou.app/{stage}/keypay/{end-point}.
...
Available end points: employee
, pay-period
, pay-earnings
.
\uD83D\uDCCB Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|