Note
UKG HR Service Delivery provides webhooks that are easy to configure and enable realtime notifications. This document will help you understand what webhooks are, by walking you through a selection of real-life examples, and configure your first webhook.
You need to understand how authenticating to UKG HR Service Delivery APIs works. Read this guide if you do not feel comfortable with this topic before going further.
Webhooks require that you expose your target environment to the Internet, so that UKG HR Service Delivery messages can be received and processed. To know more read below.
Webhooks allow you to build or set up integrations, which subscribe to certain events from UKG HR Service Delivery. When one of those events is triggered, UKG HR Service Delivery sends an HTTP POST callback to the webhook’s configured URL of choice.
In other words, rather than polling on a regular basis the target API of your choice, you simply configure a webhook to be notified that the expected action/event actually happened, in real-time.
With the UKG HR Service Delivery webhooks, you can for example be notified when a user or employee profile changes, after the creation of a document, or for the e-signature of a document.
The list of events you can subscribe to is available in the following section.
You can read more about webhooks on the Zapier Blog.
To put it simply, webhooks are made to simplify your API integration by giving you the freedom to avoid polling and managing various types of answers from the target system. Take the following API implementation scenario:
“You generate documents using UKG HR Service Delivery APIs, create a process for employees to sign the documents, and want to know when the documents are signed and sealed to store them into your CoreHR of choice”
Without UKG HR Service Delivery webhooks, your API flow would look like this:
In this case:
Your integration needs to handle recurrent requests until your system gets the expected response.
Your implementation needs you to manage potential unexpected answers and errors from UKG HR Service Delivery APIs (although we provide high SLAs).
These operations are time consuming, can lead to complex implementations and consume useless amounts of bandwidth.
Now, have a look at the same described scenario, only relying on a webhook configured for your instance:
As you can see, once configured, webhooks are a powerful feature that enables you to get notified when asynchronous tasks have to be completed.
Resource type |
Resource code |
Events |
Details |
Usage |
---|---|---|---|---|
Core data |
||||
Account |
|
created |
The account has been created |
|
updated |
The account has been updated |
|
||
deleted |
The account has been deleted |
|
||
logged_in |
The corresponding user has logged in |
|
||
Employee |
|
created |
The employee has been created |
|
updated |
The employee has been updated |
|
||
deleted |
The employee has been deleted |
|
||
restored |
The employee has been restored after having been deleted |
|
||
User |
|
created |
The user has been created |
|
updated |
The user informations have been updated, or a profile has been updated, created or deleted |
|
||
deleted |
The user has been deleted |
|
||
Import |
|
created |
The import is created but hasn’t started yet |
|
started |
The system has started processing this import |
|
||
completed |
The processing is done. You can refer to the status of the import to know whether it was a success or not |
|
||
Dataset import |
|
created |
A dataset import has been created |
|
Dataset |
|
created |
The dataset has been created |
|
updated |
The dataset has been updated |
|
||
Dataset value |
|
created |
The dataset value has been created |
|
updated |
The dataset value has been updated |
|
||
deleted |
The dataset value has been deleted |
|
||
Organization |
|
created |
The organization has been created |
|
updated |
The organization has been updated |
|
||
deleted |
The organization has been deleted |
|
||
Organization group |
|
created |
The organization group has been created |
|
updated |
The organization group has been updated |
|
||
Custom fields |
|
created |
The custom field has been created |
|
deleted |
The custom field has been deleted |
|
||
updated |
The custom field has been updated |
|
||
SAML Identity provider |
|
created |
The SAML Identity provider has been created |
|
updated |
The SAML Identity provider has been updated |
|
||
deleted |
The SAML Identity provider has been deleted |
|
||
Document Manager data |
||||
Electronic vault link |
|
deleted |
The employee and his/her vault are unlinked. The employee’s vault still exist but is unlinked this company |
|
Role permissions not included |
|
created |
The role has been created |
|
deleted |
The role has been deleted |
|
||
updated |
The role has been updated (but not permissions) |
|
||
Document generation |
|
created |
The document has been generated |
|
Document generation template |
|
created |
The document template has been created |
|
updated |
The document template has been updated |
|
||
deleted |
The document template has been deleted |
|
||
Document generation template version |
|
created |
The document template version has been created |
|
activated |
The document template version has been activated |
|
||
deactivated |
The document template version has been deactivated |
|
||
Signature types |
|
created |
The signature type has been created |
|
updated |
The signature type has been updated |
|
||
deleted |
The signature type has been deleted |
|
||
‘expired’, ‘canceled’ and ‘rejected’ are not included |
|
created |
The signature process has been created |
|
sent |
The signature process has been sent (not archived) |
|
||
updated |
The signature process has been updated |
|
||
signed |
The document has been signed by one signatory |
|
||
completed |
The signature process has been completed (only after a POST/signature_processes/archive for an external) |
|
||
deleted |
The signature process has been deleted |
|
||
Employee Document |
|
created |
The employee document has been created |
|
deleted |
The employee document has been deleted |
|
||
restored |
The employee document has been restored |
|
||
trashed |
The employee document has been trashed |
|
||
updated |
The employee document has been updated |
|
||
unlinked |
The employee document has been unlinked |
|
||
Company Document |
|
created |
The company document has been created |
|
deleted |
The company document has been deleted |
|
||
restored |
The company document has been restored |
|
||
trashed |
The company document has been trashed |
|
||
updated |
The company document has been updated |
|
||
Legalhold |
|
created |
The legalhold has been created |
|
deleted |
The legalhold has been deleted |
|
||
Employee document type |
|
created |
The employee document type has been created |
|
updated |
The employee document type has been updated |
|
||
Company document type |
|
created |
The company document type has been created |
|
updated |
The company document type has been updated |
|
||
People Assist data |
||||
Generated document (in Process automation task) |
|
signed |
The document has been signed by an HR user or by an employee |
|
created |
The document has been created |
|
||
updated |
A fill_pdf task attached to the document has been completed by an HR user or by an employee |
|
||
sealed |
The document has been digitaly signed. It can’t be modified without breaking this signature |
|
||
Request |
|
created |
The request has been created |
|
updated |
The request has been updated |
|
||
deleted |
The request has been deleted |
|
||
Process |
|
created |
The process has been created |
|
published |
The process has been published |
|
||
completed |
The process has been completed |
|
||
finalized |
The process has been closed |
|
||
hidden |
The process has been hidden in the users and employees interfaces |
|
||
Platform events |
||||
Deletion request |
|
created |
The deletion request has been created (only for employee) |
|
confirmed |
The deletion request has been confirmed after evaluation |
|
||
canceled |
The deletion request has been canceled after evaluation |
|
||
prepared |
The deletion request has been sent to the owner of the resource (only for employee) |
|
||
completed |
The deletion request has been completed : the resource is deleted |
|
||
failed |
The deletion request has failed |
|
||
Retention policies for People Assist |
|
created |
The retention policy has been created |
|
deleted |
The retention policy has been deleted |
|
||
Webhooks |
|
created |
A webhook has been created |
|
deleted |
A webhook has been deleted |
|
||
updated |
A webhook has been updated |
|
Use Case description |
Events to configure in your webhook |
You want to monitor and store every platform configuration changes that occur in UKG HR Service Delivery |
|
When documents are created (filled on our system) and sent for signature, get updates on this process to fetch the finalized documents |
|
For every employee data created or updated, fetch it’s data and import it into your coreHR |
|
Note
Webhooks API specifications are available in UKG HR Service Delivery OpenAPI specifications.
The first step to setup your webhook is to POST its configuration.
See below:
{
"name": "My webhook to receive events on my application",
"callback_url": "https://myapp.com/peopledoc-webhooks",
"events": [
"employee.created",
"signature_tasks.signed"
],
"is_active": "true"
}
Here, you are creating webhooks triggered:
When and employee profile is created
Whenever a signature event occurs through Digital Process Manager.
Note
UKG HR Service Delivery webhooks support wildcards. This enables you to subscribe to a group of events from a specific event category, rather than one event/action at the time. For example: employee.*.
If your request is successful, UKG HR Service Delivery webhooks API returns:
{
"name": "My webhook to receive events on my application",
"callback_url": "https://myapp.com/peopledoc-webhooks",
"events": [
"employee.created",
"signature_tasks.signed"
],
"is_active": "true",
"id": "5cf2b3a3-04a0-418f-8d8c-914e543f44ea",
"signature_key": "stUIMviAfCGahM8kqp5EYa1aBLgZ22ES",
"created_at": "2019-12-02T13:44:19.025+00:00",
"updated_at": "2019-12-02T13:44:19.025+00:00"
}
Webhooks require that you open at least one callback URL.
In order to help you check the authenticity of the calling service, UKG HR Service Delivery provides a signature_key as below:
{
// [...]
"signature_key": "stUIMviAfCGahM8kqp5EYa1aBLgZ22ES",
// [...]
}
Once your webhook is created, you can safely store this key to check its authenticity.
Note
This signature key can be regenerated at any time, using the /webhooks/{id}/refresh_signature_key endpoint.
Read more about the Refresh Signature Key endpoint specifications.
As stated previously, when you register for a new webhook, you are provided a “signature_key.”
This key is unique to the webhook, and can be considered as a trust certificate.
To protect yourself, compare the expected signature to each of the received signatures, as well as the webhook ID.
Webhooks require that you provide a “public” (exposed) URL to receive them.
To test that your system is open to UKG HR Service Delivery callbacks, use the following API endpoint:
POST /webhooks/{id}/tests
Assuming you have previously created a webhook, post on this endpoint, using the right webhook ID, to check that your network allows incoming calls from UKG HR Service Delivery webhook API.
This endpoint generates a “fake” webhook callback, using your provided configuration.
Once you’ve understood and configured your first webhook, it is common practice to test the callbacks with your application, to make sure everything respects your implementation’s requirements.
The one difficulty is that when you are developing an application that consumes webhooks you need a publicly accessible URL to configure the webhook service with.
Typically you would develop on localhost and the rest of the world would have no access to your application, so how do you test your webhooks?
Tip
To receive webhooks callbacks in a secure way, we suggest SSH tunneling.
Applications such as ngrok allow easy configuration and debugging tools to check that both the callbacks and your consumer application behave as expected.
Have a look at the ngrok documentation to know more and receive your first callbacks on your localhost.
As explained previously, you can easily configure and test webhooks and their callbacks.
Below, you can see how easy and fast it is, using Postman, Ngrok, and the following endpoints:
POST /webhooks to create your webhook;
POST /webhooks/{id}/tests to check your configured callback URL; UKG HR Service Delivery instantly sends a test payload back to the configured URL, for example localhost.