The following events can be used to create Employee data updates Webhooks.
Before you begin with webhooks v2
Before you dive into the various event types, make sure to follow these key steps:
- Explore our guide Getting started with Bob webhooks.
- Important: Event payload contains only identifiers and metadata. You should make API calls to retrieve the necessary data. To learn more, see our Webhook listener best practices.
Basic Employee events
Event | Type | Description |
---|---|---|
Updated | employee.updated | Triggered when an employee's field is updated. |
Created | employee.created | Triggered when an employee is created. |
Deleted | employee.deleted | Triggered when an employee is deleted. |
Creating an employee, deleting it, or updating an employee’s field will trigger the equivalent events.
When updating an employee's field, an ‘employee update’ event will be triggered, and the event's payload will contain the IDs of the fields that were updated.
Calculated fields
Calculated fields, such as Full Name , are based on other base fields. They will trigger the update event when one of the base fields (First and Last Name) is updated.
Table events
Event | Type | Description |
---|---|---|
Table Created | table.entry.created | Triggered when an entry is added to an employee’s table. |
Table Updated | table.entry.updated | Triggered when an entry is updated in an employee’s table. |
Note: Deleting a table entry will not trigger a webhook event.
When adding or updating an entry in an employee table, this action will trigger the following events:
- 'table.entry.created' or 'table.entry.updated': depending on the operation. Note that deleting an entry does not trigger any events.
- employee.updated: If you update the 'current' table entry (i.e., the entry with the current effective date), it will also trigger an 'employee.updated' event, as this change impacts the employee's current data. The event will include the field IDs of the updated entry fields (columns).
The following tables do not trigger a 'table updated/created' event:
- Training
- Equity
- Positions
- Jobs
Lifecycle events
Lifecycle events refer to updates that affect an employee's status. These updates create an entry in the employee's lifecycle table and are triggered automatically when the lifecycle entry becomes effective.
Event | Type | Description |
---|---|---|
Inactivated | employee.inactivated | Triggered when an employee is set to be on leave or terminated, once the corresponding lifecycle entry becomes effective. |
Activated | employee.activated | Triggered when an employee's access is enabled, once the corresponding lifecycle entry becomes effective. |
Joined | employee.joined | Triggered when an employee is granted access, once the corresponding lifecycle entry becomes effective. |
Terminated | employee.left | Triggered when an employee is set as terminated or on 'Garden leave', depending on which occurs first, once the corresponding lifecycle entry becomes effective. |
On Leave | employee.temporaryLeave | Triggered when an employee is set to be on temporary leave, once the corresponding lifecycle entry becomes effective. |
Lifecycle events refer to changes that affect an employee's access status, such as rehiring, placing or returning from leave, and termination. To learn more, check out the lifecycle status in Bob overview.
Lifecycle changes create an entry in the employee's lifecycle table and take effect based on the entry's effective date. This date determines when the change impacts the employee's status.
Lifecycle changes will trigger the following events:
- Table entry created - for the entry created in the Lifecycle table.
- Employee updated - will be triggered when the entry is created it it impacts the employee's current lifecycle data (e.g.,
recentLeaveStartDate
). - Lifecycle event (Inactivated, Activated, Joined, Terminated, On Leave) - will be triggered automatically when the lifecycle entry becomes effective as part of Bob flows.
Important: When triggered via the flow, the lifecycle events will be triggered automatically at midnight on the effective date of the lifecycle table entry. For example, if an employee is terminated with an effective date of April 17, the termination event will trigger at midnight on April 18 (according to the site’s timezone).
How to implement the Webhook event listener
Your webhook event listener should perform the following:
- Receive the Event Notification:
The Webhook event alerts your endpoint whenever an Employee event is triggered. The payload includes the field IDs that were updated and relevant employee ID. - Retrieve the complete employee data:
Use the employee ID from the event's payload to call the endpoint URL and retrieve the complete data relevant to this employee. See see API call for employee events.
Notes:
- To learn more about employee data Explore employee data.
- To learn more about how to read employee data, see Read company employee fields by employee ID.
- Follow the Webhook listener best practices.
- Follow the example for how to process an employee event.
Webhook events payloads
Created Payload
{
"companyId": 637323,
"type": "employee.created",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2024-12-26T11:29:14.399997",
"data": {
"employeeId": "3332883894235038486"
}
}
Joined Payload
{
"companyId": 637323,
"type": "employee.joined",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2024-12-26T11:29:14.399997",
"data": {
"employeeId": "3332883894235038486"
}
}
Terminated Payload
{
"companyId": 637323,
"type": "employee.left",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2024-12-26T11:29:14.399997",
"data": {
"employeeId": "3332883894235038486"
}
}
Updated Payload
{
"companyId": 637323,
"type": "employee.updated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2024-12-26T11:29:14.399997",
"data": {
"employeeId": "3332883894235038486",
"fieldUpdates": [
{
"id": "personal.birthDate"
}
]
}
}
Deleted Payload
{
"companyId": 637323,
"type": "employee.deleted",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2024-12-26T11:29:14.399997",
"data": {
"employeeId": "3332883894235038486"
}
}
Temporary Leave
{
"companyId": 636192,
"type": "employee.temporaryLeave",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:06:26.935613",
"version": "v2",
"data": {
"employeeId": "3332883854254932743"
}
}
Inactivated
{
"companyId": 636192,
"type": "employee.inactivated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:06:26.915964",
"version": "v2",
"data": {
"employeeId": "3332883854254932743"
}
}
Table entry payloads
When a table entry is created or updated, the payload of the events will include the table identifier and the table entry identifier.
The entry identifier can be either:
entryId
- identifies the entry in non-historical tables (effectiveDate will be 'null').effectiveDate
identifies the entry in historical tables (entryId will be null).
To learn more about table types, see Employee data modeling.
To view the updated entry, you should use the API to retrieve the table rows and find the relevant entry by the entry identifier.
Lifecycle entry
{
"companyId": 636192,
"type": "table.entry.created",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:06:26.915906",
"version": "v2",
"data": {
"employeeId": "3332883854254932743",
"tableId": "lifecycle",
"effectiveDate": "2025-01-08",
"id": null
}
}
To learn more about the Lifecycle data, see List employee's life-cycle status history.
Lifecycle entry - employee update
The lifecycle change above will also trigger the employee update event:
{
"companyId": 636192,
"type": "employee.updated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:06:26.893941",
"version": "v2",
"data": {
"employeeId": "3332883854254932743",
"fieldUpdatesIds": [
{
"id": "employee.recentLeaveStartDate"
},
{
"id": "internal.status"
},
{
"id": "employee.recentLeaveEndDate"
},
{
"id": "internal.lifecycleStatus"
}
]
}
}
Work entry
{
"companyId": 636192,
"type": "table.entry.created",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:28:55.561963",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"tableId": "work",
"effectiveDate": "2024-09-02",
"id": null
}
}
{
"companyId": 636192,
"type": "table.entry.updated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:28:05.816304",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"tableId": "work",
"effectiveDate": "2024-03-27",
"id": null
}
}
To learn more about the Work data, see List employee's work history.
Work entry - employee update
The work change above will also trigger the employee update event:
{
"companyId": 636192,
"type": "employee.updated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:28:55.545382",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"fieldUpdatesIds": [
{
"id": "work.department"
},
{
"id": "work.title"
},
{
"id": "work.activeEffectiveDate"
}
]
}
}
Employment entry
{
"companyId": 636192,
"type": "table.entry.created",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:30:41.592528",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"tableId": "employment",
"effectiveDate": "2025-01-08",
"id": null
}
}
To learn more about the Employment data, see List employee's employment history.
Employment entry - employee update
The employment change above will also trigger the employee update event:
{
"companyId": 636192,
"type": "employee.updated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:51:59.905057",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"fieldUpdatesIds": [
{
"id": "payroll.employment.type"
}
]
}
}
Payroll entry (salary)
{
"companyId": 636192,
"type": "table.entry.updated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:55:45.055159",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"tableId": "salary",
"effectiveDate": "2015-03-03",
"id": null
}
}
To learn more about the Payroll data, see List employee's salary history.
Payroll entry - employee update
The Payroll (Salary) change above will also trigger the employee update event:
{
"companyId": 636192,
"type": "employee.updated",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:55:45.017010",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"fieldUpdatesIds": [
{
"id": "payroll.salary.monthlyPayment"
},
{
"id": "payroll.salary.yearlyPayment"
},
{
"id": "payroll.salary.payment"
}
]
}
}
Bank accounts entry
{
"companyId": 636192,
"type": "table.entry.created",
"triggeredBy": "3332883804594373380",
"triggeredAt": "2025-01-08T13:54:03.608759",
"version": "v2",
"data": {
"employeeId": "3332883904477528858",
"tableId": "bankAccounts",
"effectiveDate": null,
"id": 6236350
}
}
To learn more about the bank accounts data, see List employee's bank accounts.