Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article we show you how to setup the integration between Tātou and KeypayEmployment Hero.

Note

This is a technical article.

...

Entity

Description

Direction

Employee

Creating, updating or deleting* an employee in Keypay Employment Hero automatically does the same in Tātou

* Deleting makes the employee inactive in Tātou

Keypay Employment Hero → Tātou

PayPeriod

Timesheet entries for a period

Tātou → KeypayEmployment Hero

PayEarning

When the Pay Run is finished in KeypayEmployment Hero, it sends the awards interpretation with final costs back to Tātou

Keypay 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 Keypay Employment Hero you should set it as webhook properties and on Tātou as webhook request params:

...

Webhook reference documentation:

Setting necessary webhooks

Employee webhook on

...

Employment Hero

To setup the employee webhook, use Keypay Employment Hero API webhookregistrations with the following payload, replacing all {{variables}}:

Code Block
languagejson
// POST https://api.yourpayroll.com.au/api/v2/business/{businessId}/webhookregistrations
{
  "webHookUri": "https://integration.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
languagejson
// POST https://api.yourpayroll.com.au/api/v2/business/{businessId}/webhookregistrations
{
  "webHookUri": "https://integration.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://integration.integrations-tatou.app/{stage}/keypay/{end-point}.

Available stages: dev, staging, production.

Available end points: employee, pay-period, pay-earnings.

Employee integration

...

Pay Period integration

...

Pay Earnings integration

...

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "KB"
labelskb-how-to-article