Getting connected with Employment Hero
In this article we show you how to setup the integration between Tātou and Employment Hero.
This is a technical article.
Currently, the native integration is composed by three main parts:
Entity | Description | Direction |
---|---|---|
Employee | Creating, updating or deleting* an employee in Employment Hero automatically does the same in Tātou * Deleting makes the employee inactive in Tātou | Employment Hero → Tātou |
PayPeriod | Timesheet entries for a period | Tātou → Employment Hero |
PayEarning | When the Pay Run is finished in Employment Hero, it sends the awards interpretation with final costs back to Tātou | Employment Hero → Tātou |
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:
{
"tatou_token": <token>,
"employment_hero_token": <token>,
"employment_hero_business_id": <id>
}
Webhook reference documentation:
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}}
:
// POST https://api.yourpayroll.com.au/api/v2/business/{businessId}/webhookregistrations
{
"webHookUri": "https://integrations-tatou.app/production/employment-hero/employee",
"secret": "",
"description": "employee-tatou",
"isPaused": false,
"filters": [
"EmployeeTerminated",
"EmployeeUpdated"
],
"headers": {},
"properties": {
"tatou_token": "{{tatou_token}}",
"employment_hero_token": "{{employment_hero_token}}",
"employment_hero_business_id": "{{employment_hero_business_id}}"
}
}
PayRun webhook on Employment Hero
PayRun webhook is responsible for sending awards interpretation back to Tātou.
// POST https://api.yourpayroll.com.au/api/v2/business/{businessId}/webhookregistrations
{
"webHookUri": "https://integrations-tatou.app/production/employment-hero/pay-earnings",
"secret": "",
"description": "pay-earnings-tatou",
"isPaused": true,
"filters": [
"PayRunFinalised"
],
"headers": {},
"properties": {
"tatou_token": "{{tatou_token}}",
"employment_hero_token": "{{employment_hero_token}}",
"employment_hero_business_id": "{{employment_hero_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 domain https://integrations-tatou.app/production/employment-hero/{end-point}.
Available end points: employee
, pay-period
, pay-earnings
.