1) Overview
2) Webhooks vs APIs
i) What is an API?
ii) How webhooks differ from APIs
3) Webhooks in Easy Employer
4) Webhook Subscriptions
5) Limitations
1) Overview
Webhooks are a simple way for online accounts to "speak" to each other, and get notified automatically when something new happens.
There are two ways apps communicate with each other to share information: polling and webhooks. Polling uses the pull model of communication, where a system pulls information from another, while webhooks use the push model, by pushing information from a source application to a destination application. Webhooks are automatically triggered when an event occurs.
2) Webhooks vs APIs
i) What is an API?
API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. An API essentially provides a common language and contract for how two systems interact.
ii) How webhooks differ from APIs
Webhooks make calls to APIs. An API provides webhooks with the access point (endpoint) to push data to an application. When an event occurs in a source application, a webhook request is triggered to one of the API endpoints.
3) Webhooks in Easy Employer
Webhooks are not included by default in Easy Employer. Your organisation's system owner can contact support to enable this service.
Webhooks can be used in Easy Employer to trigger the following:
- User Events:
- Create User.
- Update User.
- Timesheet Events:
- Clock On.
- Clock Off.
- Clock Start Break.
- Clock End Break.
- Actual Shift Updated.
- Timesheet Finalised.
- Leave Events:
- Leave Created.
- Leave Updated.
- Leave Deleted.
- Leave Shift Create.
- Leave Shift Update.
- Roster Events:
- Roster published.
- Published roster shift updated.
- Published unassigned roster shift updated.
- Entitlement Events:
- Balances updated.
- Group Events:
- Group created.
- Group updated.
- Group deleted.
- User-Group created.
- User-Group deleted.
- Payslip Events:
- Payslips Update.
- Ability Events:
- Ability create.
- Ability update.
- Ability delete.
- User linked to an ability.
- User link to an ability updated.
- User unlinked from an ability.
4) Webhook Subscriptions
Subscribing to webhook events in Easy Employer can only be done from an active account, by a user with the right set of permissions to do so, following these steps:
- From Organisation on the navigation bar.
- Select Integrations.
- Select the Webhooks tab on the side bar, this will display a list of current subscriptions. Here, you can Add new subscriptions and edit or delete existing ones.
- When adding or editing a subscription, click the Test button to send sample data to the url you have subscribed to, to ensure it works correctly.
5) Limitations
Currently, the webhooks system will only send data once, and will ignore any return (e.g. an error) from the endpoint it communicated to. There is currently no ETA on a process for dealing with failures.