The fastest way to make a mess in HubSpot is a sync that creates a new record every time it runs. Ours never does — here’s why.
A local source of truth #
Every record we sync is tracked in a local id-mapping table that links the Stripe id to the HubSpot id. On the next sync, we look it up and update that exact record instead of guessing.
Adoption order #
For a record we haven’t mapped yet, we resolve it in order:
- id-mapping — already linked? update it.
- Stripe id property — search HubSpot for the
stripe_*id and adopt the match. - Natural key — match by domain or email and adopt.
- Create — only if nothing matched.
This is what lets you point the Service at an established portal without creating a second copy of every company.
Safe to re-run #
Backfills, real-time webhooks, and the nightly reconcile all flow through the same primitive — so they can overlap, retry, and re-run without ever duplicating. More in running syncs.