Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

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

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 Keypay automatically does the same in Tātou

* Deleting makes the employee inactive in Tātou

Keypay → Tātou

PayPeriod

Timesheet entries for a period

Tātou → Keypay

PayEarning

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

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

{
  "tatou_token": <token>,
  "keypay_token": <token>,
  "keypay_business_id": <id>
}

Webhook reference documentation:

Setting necessary webhooks

Employee webhook on Keypay

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

// POST https://api.yourpayroll.com.au/api/v2/business/{businessId}/webhookregistrations
{
  "webHookUri": "https://integration.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 Keypay

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://integration.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.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

  • No labels