This guide assumes you are already familiar with the basics of fetching data
from Kombo. If you need a refresher or want to see the full “from scratch”
guide, check out Fetching Data.
The Shift in Thinking
Traditionally, integrations were process-driven:- Kombo finishes a sync.
- We tell you “Sync is done”.
- You fetch everything (or a time-based delta) to see if anything changed.
- Something changes in the underlying tool (employee added, time off requested).
- We tell you “Data changed”.
- You fetch only what you need.
- (Recommended) You run a periodic cleanup job once a week as a safety net.
Migration Strategy
You can migrate incrementally. You don’t need to stop your current sync logic immediately.Phase 1: Implement data-changed Handler
First, let’s implement the new webhook handler. You can do this alongside your
existing sync-finished handler.
Phase 2: Add a Safety Net (Recommended)
While the event-driven approach is robust, webhooks can fail or get lost. To ensure your data stays consistent over time, we recommend adding a periodic full fetch. Create a Cron job (or scheduled task) that runs once a week (e.g., Sunday at 2 AM).Phase 3: Implement the Fetch Function
ThefetchEmployees function is shared between the webhook handler and the cron
job. It handles pagination and passes the updated_after parameter when
provided.
This part may be simplified by using one of our official server-side
SDKs.
Phase 4: Cutover
Once Phase 1 and 2 are deployed and you verify thatdata-changed events are
triggering syncs:
- Disable
sync-finished: Stop listening to thesync-finishedwebhook. - Disable
remote-event-received: If you were using this,data-changedreplaces it entirely. - Rely on the Safety Net: Your weekly cron covers any edge cases (like missed webhooks or bugs).
FAQ
Is this a breaking change?
No. Thesync-finished webhook still works. However, we are focusing all
performance improvements on the data-changed pipeline. Migrating ensures you
get the fastest, most reliable experience.