Connector events
Data events
Data events are named<category>.<model>.<action>, where the action is created or updated. No event reports a deleted record.
The names follow this pattern:
Order within a sync
Bindbee sends the events of one sync one at a time, in this order:connector.sync.started, before any data is read.- Every
createdevent, then everyupdatedevent. Within each half, parent models come before the models that reference them -hris.companybeforehris.employee,hris.employeebeforehris.employment- following the order of the table above. connector.sync.completed, last, so itssequenceis the highest of the sync.
connector.sync.started, then connector.sync.failed, then connector.relink_needed if the failure broke the connection.
Each event’s delivery, including retries, finishes before the next starts. Across syncs and between connectors, order is not guaranteed, so sort by sequence - see Delivery and retries.
What this means for you
- Subscribe to the models your handler processes, and nothing else.
- Size your first-sync handling for every record of every subscribed model.
- Wait for
connector.sync.completedbefore acting on a sync as a whole, since the data events of that sync all precede it. - Handle
connector.relink_neededby asking your customer to reconnect - see Relink a connector. - Run a periodic full read if you need complete data.
Related
- Webhook payload - what each event carries
- Create a webhook - subscribe to these events
- Syncing - when syncs run
- Scoping - which models a connector syncs