Employee Update Events

The following events can be used to create Employee data updates Webhooks.

Check out Getting started with Webhooks before diving into this guide.

EventTypeDescription
Updatedemployee.updatedTriggered when updating employee fields or when adding and updating employee tables.
Createdemployee.createdTriggered when an employee profile is created in Bob.
Deletedemployee.deletedTriggered when deleting the employee’s profile.
Inactivatedemployee.inactivatedTriggered when setting an employee to be on leave or terminated, and the effective date of the termination is reached.
Activatedemployee.activatedTriggered when granting access to an employee, and the effective date is reached.
Joinedemployee.joinedTriggered when granting access to an employee, and the effective date is reached.
Terminatedemployee.leftTriggered when an employee's termination effective date is reached and their state is either ‘Terminated’ or Garden leave’, whichever occurs first.
On Leaveemployee.temporaryLeaveTriggered when setting an employee to be on leave.
Table Entry Createdtable.entry.createdTriggered when adding a row to an employee’s table. Note that this will also send the ‘employee.updated’ event at the same time.
Table Entry Updatedtable.entry.updatedTriggered when updating a row in an employee’s table. Note that this will also send the ‘employee.updated’ event at the same time.

📘

Note

Some events are triggered automatically as part of a Bob flow, based on the effective date of the update.

When updating an employee's status, this action creates a row in relevant tables (such as work, employment, lifecycle or payroll). The Webhook event will trigger only when the row's effective date is reached. To learn more, see How employee update events are triggered .

How to handle Employee events

  1. Receive the Event Notification:
    The Webhook sends a notification to your endpoint whenever an Employee event is triggered. The payload includes partial employee data and a header key named 'get-employee' which holds a ready-to-use endpoint URL with the relevant employee ID.
  2. Retrieve the Employee’s data:
    Use the get-employee URL from the header to perform the API call and retrieve the complete data relevant for this employee. See the Read company employee fields by employee ID endpoint.
    For example:
    get-employee: https://api.hibob.com/v1/people/3332883914770350878
    where 3332883914770350878 is the Employee ID

📘

Notes

  1. The values that are returned in fields that contain an item selected from a list represent the item ID, and not the item display name. To obtain the corresponding display value, use the HiBob metadata API. To learn more, see How to work with lists Public API.
  2. The provided payloads are only examples; the actual payload will vary based on how your account's data is organized, for example, whether you have custom fields or whether fields have been relocated to a different category.

How employee update events are triggered

Employee data can be: data fields or data tables. Data table may contain historical data in several table entries (rows). Each type may trigger the update events in different times, as explained below.

How fields trigger update events

Updating an employee’s data field will trigger an ‘employee update’ event. The event payload will contain both the old values and the new values.

Data fields can be predefined fields, calculated fields, or custom fields. Note that calculated fields, such as Full Name will trigger the update event when one of the base fields (First and Last Name) is updated.

How employee tables trigger update events

Adding or updating a row in an employee’s table will trigger both 'employee.updated' and 'table.entry.created' or 'table.entry.updated' events.

Note that tables such as Work, Employment, Payroll, or Lifecycle, include historical data about the employee, allowing for tracking of information over time. Each row in these tables includes an effective date, which indicates when the information in that row takes effect and impacts the employee's status.

The update event is triggered automatically on the effective date, which may not be the same time you update the row. For example, if an employee is terminated and a row is added to the Lifecycle table with an effective date of April 17, the termination event will be triggered at midnight on April 18 (according to the site’s timezone).

To learn more about the employee fields, see Set up people's data fields .

Employee Created Payload

{
  "companyId": 636192,
  "employee": {
    "id": "3373576791477190995",
    "companyId": 636192,
    "firstName": "first",
    "surname": "last",
    "email": "[email protected]",
    "displayName": "first last",
    "site": "London",
    "siteId": 2510067
  },
  "changedBy": {
    "id": "3332883804594373380",
    "companyId": 636192,
    "firstName": "first1",
    "surname": "last1",
    "email": "[email protected]",
    "displayName": "Jane Doe",
    "site": "London",
    "siteId": 2510067
  },
  "type": "employee.created",
  "data": {
    "displayName": "first last",
    "personal": {
      "shortBirthDate": null,
      "pronouns": null,
      "honorific": null,
      "nationality": []
    },
    "employee": {
      "payrollManager": null,
      "hrbp": null,
      "itAdmin": null,
      "buddy": null,
      "veteranStatus": [],
      "disabilityStatus": null
    },
    "work": {
      "shortStartDate": "05-22",
      "startDate": "2023-05-22",
      "manager": null,
      "workPhone": null,
      "tenureDuration": {
        "periodISO": "P1Y1D",
        "sortFactor": 361,
        "humanize": "1 year and 1 day"
      },
      "custom": {
        "field_1711886937296": null
      },
      "reportsToIdInCompany": null,
      "durationOfEmployment": null,
      "employeeIdInCompany": null,
      "reportsTo": {
        "email": null
      },
      "workMobile": null,
      "indirectReports": null,
      "siteId": 2510067,
      "department": "Creative",
      "tenureDurationYears": 1.002,
      "tenureYears": 1,
      "isManager": false,
      "title": "Chief Architect",
      "site": "London",
      "originalStartDate": "2023-05-22",
      "activeEffectiveDate": "2023-05-22",
      "directReports": null,
      "secondLevelManager": null,
      "yearsOfService": 0,
      "daysOfPreviousService": null
    },
    "companyId": 636192,
    "about": {
      "foodPreferences": [],
      "socialData": {
        "linkedin": null,
        "twitter": null,
        "facebook": null
      },
      "hobbies": [],
      "superpowers": [],
      "about": null,
      "avatar": ""
    },
    "email": "[email protected]",
    "surname": "last",
    "home": {
      "privateEmail": null
    },
    "id": "3373576791477190995",
    "firstName": "first"
  },
  "previous": null,
  "creationDate": "2023-05-22T12:41:54.634633"
}

Employee Joined Payload

{
  "companyId" : 5079231109090900621,
  "employee" : {
    "id" : "2b2512d0-e0f0-43",
    "companyId" : 5079231109090900621,
    "firstName" : "first",
    "surname" : "last",
    "email" : "[email protected]",
    "displayName" : "first last",
    "avatar" : "http://images2.onionstatic.com/clickhole/3447/6/original/800.jpg"
  },
  "changedBy" : {
    "id" : "caa00387-69b9-45",
    "companyId" : 5079231109090900621,
    "firstName" : "JuKxl",
    "surname" : "sj5NgKb",
    "email" : "[email protected]",
    "displayName" : "NF6ZJAHwNSgt",
    "avatar" : null
  },
  "type" : "employee.joined",
  "data" : {
    "id" : "2b2512d0-e0f0-43",
    "firstName" : "first",
    "surname" : "last",
    "email" : "[email protected]",
    "displayName" : "first last",
    "personal" : {
      "honorific" : null,
      "secondName" : null,
      "gender" : null,
      "shortBirthDate" : null,
      "nationality" : null,
      "communication" : {
        "slackUsername" : null,
        "skypeUsername" : null
      },
      "custom" : { }
    },
    "about" : {
      "avatar" : "http://images2.onionstatic.com/clickhole/3447/6/original/800.jpg",
      "about" : "Something about me",
      "socialData" : { },
      "hobbies" : [ ],
      "superpowers" : [ ],
      "foodPreferences" : [ ],
      "custom" : { }
    },
    "work" : {
      "workPhone" : "04-04040404",
      "workMobile" : "0505050505",
      "employeeIdInCompany" : 12,
      "title" : "Developer",
      "startDate" : "2023-07-05",
      "shortStartDate" : "07-05",
      "lengthOfService" : 0,
      "site" : "New York",
      "department" : "Engineering",
      "reportsTo" : {
        "id" : "manager_id",
        "firstName" : null,
        "surname" : null,
        "email" : null
      },
      "activeEffectiveDate" : null,
      "custom" : { }
    },
    "custom" : {
      "tabName" : { }
    }
  },
  "creationDate" : "2023-07-05T11:06:26.926"
}

Employee Left Payload

{
  "companyId" : 8912898557919922434,
  "employee" : {
    "id" : "5272b8b3-3ee3-45",
    "companyId" : 8912898557919922434,
    "firstName" : "first",
    "surname" : "last",
    "email" : "[email protected]",
    "displayName" : "first last",
    "avatar" : "http://images2.onionstatic.com/clickhole/3447/6/original/800.jpg"
  },
  "changedBy" : {
    "id" : "27fefb03-46da-4b",
    "companyId" : 8912898557919922434,
    "firstName" : "HjNx1",
    "surname" : "Y8vB224",
    "email" : "[email protected]",
    "displayName" : "EihuD40vfvsn",
    "avatar" : null
  },
  "type" : "employee.left",
  "data" : {
    "id" : "5272b8b3-3ee3-45",
    "firstName" : "first",
    "surname" : "last",
    "email" : "[email protected]",
    "displayName" : "first last",
    "personal" : {
      "honorific" : null,
      "secondName" : null,
      "gender" : null,
      "shortBirthDate" : null,
      "nationality" : null,
      "communication" : {
        "slackUsername" : null,
        "skypeUsername" : null
      },
      "custom" : { }
    },
    "about" : {
      "avatar" : "http://images2.onionstatic.com/clickhole/3447/6/original/800.jpg",
      "about" : "Something about me",
      "socialData" : { },
      "hobbies" : [ ],
      "superpowers" : [ ],
      "foodPreferences" : [ ],
      "custom" : { }
    },
    "work" : {
      "workPhone" : "04-04040404",
      "workMobile" : "0505050505",
      "employeeIdInCompany" : 12,
      "title" : "Developer",
      "startDate" : "2023-07-05",
      "shortStartDate" : "07-05",
      "lengthOfService" : 0,
      "site" : "New York",
      "department" : "Engineering",
      "reportsTo" : {
        "id" : "manager_id",
        "firstName" : null,
        "surname" : null,
        "email" : null
      },
      "activeEffectiveDate" : null,
      "custom" : { }
    },
    "custom" : {
      "tabName" : { }
    }
  },
  "creationDate" : "2023-07-05T11:10:44.625"
}

Employee Updated Payload

{
  "companyId": 6362192,
  "employee": {
    "id": "3373576791477190995",
    "companyId": 6362192,
    "firstName": "first",
    "surname": "last",
    "email": "[email protected]",
    "displayName": "first last",
    "site": "London",
    "siteId": 2838510067
  },
  "changedBy": {
    "id": "3332883804594373380",
    "companyId": 636192,
    "firstName": "first1",
    "surname": "last1",
    "email": "[email protected]",
    "displayName": "first1 last1",
    "site": "London",
    "siteId": 2838510067
  },
  "type": "employee.updated",
  "data": {
    "fieldUpdates": [
      {
        "path": "/work/site",
        "originalValue": null,
        "newValue": "London (Demo)"
      },
      {
        "path": "/work/department",
        "originalValue": null,
        "newValue": "Creative"
      },
      {
        "path": "/work/title",
        "originalValue": null,
        "newValue": "Chief Architect"
      },
      {
        "path": "/work/siteId",
        "originalValue": null,
        "newValue": 2838510067
      },
      {
        "path": "/work/activeEffectiveDate",
        "originalValue": null,
        "newValue": "2023-05-22"
      }
    ]
  },
  "previous": null,
  "creationDate": "20234-05-22T12:41:54.624909"
}{
  "companyId": 6399996192,
  "employee": {
    "id": "3373576791477190995",
    "companyId": 636192,
    "firstName": "first",
    "surname": "last",
    "email": "[email protected]",
    "displayName": "first last",
    "site": "London (Demo)",
    "siteId": 2838510067
  },
  "changedBy": {
    "id": "3332883804594373380",
    "companyId": 636192,
    "firstName": "first1",
    "surname": "last1",
    "email": "[email protected]",
    "displayName": "Demo",
    "site": "London",
    "siteId": 2838510067
  },
  "type": "employee.updated",
  "data": {
    "fieldUpdates": [
      {
        "path": "/work/site",
        "originalValue": null,
        "newValue": "London (Demo)"
      },
      {
        "path": "/work/department",
        "originalValue": null,
        "newValue": "Creative"
      },
      {
        "path": "/work/title",
        "originalValue": null,
        "newValue": "Chief Architect"
      },
      {
        "path": "/work/siteId",
        "originalValue": null,
        "newValue": 2510067
      },
      {
        "path": "/work/activeEffectiveDate",
        "originalValue": null,
        "newValue": "2023-05-22"
      }
    ]
  },
  "previous": null,
  "creationDate": "2023-05-22T12:41:54.624909"
}

Employee Deleted Payload

{
  "companyId" : 8989154816019085952,
  "employee" : {
    "id" : "9770835e-365c-4c",
    "companyId" : 8989154816019085952,
    "firstName" : "first",
    "surname" : "last",
    "email" : "[email protected]",
    "displayName" : "first last",
    "avatar" : "http://images2.onionstatic.com/clickhole/3447/6/original/800.jpg"
  },
  "changedBy" : {
    "id" : "9cce0b76-4dd1-49",
    "companyId" : 8989154816019085952,
    "firstName" : "lpAbC",
    "surname" : "OaHGMLR",
    "email" : "[email protected]",
    "displayName" : "RhBF5JgW08gU",
    "avatar" : null
  },
  "type" : "employee.deleted",
  "data" : {
    "id" : "9770835e-365c-4c",
    "firstName" : "first",
    "surname" : "last",
    "email" : "[email protected]",
    "displayName" : "first last",
    "personal" : {
      "honorific" : null,
      "secondName" : null,
      "gender" : null,
      "shortBirthDate" : null,
      "nationality" : null,
      "communication" : {
        "slackUsername" : null,
        "skypeUsername" : null
      },
      "custom" : { }
    },
    "about" : {
      "avatar" : "http://images2.onionstatic.com/clickhole/3447/6/original/800.jpg",
      "about" : "Something about me",
      "socialData" : { },
      "hobbies" : [ ],
      "superpowers" : [ ],
      "foodPreferences" : [ ],
      "custom" : { }
    },
    "work" : {
      "workPhone" : "04-04040404",
      "workMobile" : "0505050505",
      "employeeIdInCompany" : 12,
      "title" : "Developer",
      "startDate" : "2017-07-05",
      "shortStartDate" : "07-05",
      "lengthOfService" : 0,
      "site" : "New York",
      "department" : "Engineering",
      "reportsTo" : {
        "id" : "manager_id",
        "firstName" : null,
        "surname" : null,
        "email" : null
      },
      "activeEffectiveDate" : null,
      "custom" : { }
    },
    "custom" : {
      "tabName" : { }
    }
  },
  "creationDate" : "2023-07-05T10:42:39.496"
}