Skip to content
Guide3 min readBy the DonDev teamFor CRM and revenue operations teams

How to prevent duplicate records in a CRM integration

Stop CRM syncs from creating duplicate contacts and deals. Map stable IDs, decide who owns each field, and test retries and simultaneous events.

Last updated

An illustrated CRM lifecycle linking a contact, deal, payment, and delivery project with distinct status markers
On this page
  1. Give contacts, deals and events their own IDs
  2. Handle retries and concurrent arrivals
  3. Test edge cases before cleaning up old duplicates

Use a stable ID to recognise the same record, and make repeating the same event safe. Those are two separate checks. A CRM contact might receive ten legitimate updates over its lifetime, while one webhook might be delivered twice in a minute. You want ten updates to one record and one action per event.

Start by looking at an actual duplicate. Find the upstream IDs, event times and destination records. If both were created seconds apart, look for overlapping workflows or concurrent retries. If one appeared weeks later, an email change, missing ID or import may have broken the match.

Give contacts, deals and events their own IDs

An email is useful for finding candidates. People change jobs, share an inbox and sometimes enter two email addresses. Where a CRM supports an external ID or unique property, write the upstream record’s stable ID to that field. When you have multiple sources or tenants, include the source so identical number strings cannot collide.

A contact ID should identify the person’s record. A deal ID should identify the opportunity. An event ID should identify one delivery or business action. A second deal for the same contact can be legitimate. A second creation of the same deal after a timeout usually needs investigation.

Illustrative identifiers for a CRM handoff
IdentifierExamplePurpose
Contact keyintake/contact/291Find the person before updating details
Deal keyintake/deal/604Find the opportunity before creating one
Event keyintake/event/9716Recognise a delivery already processed

Handle retries and concurrent arrivals

A lookup followed by create can still duplicate a record if two runs search before either has written it. Prefer an upsert by a unique key where the destination supports it. Otherwise coordinate processing by record, or use a store that records an event atomically before applying side effects. Plan how to recover a processing record that was interrupted.

A timeout means the caller lost the response. The CRM may still have saved the write. Read by the stable key before attempting a second creation. Keep notifications separate so replaying a record update does not send a customer another welcome email. HubSpot’s integration reliability guidance discusses retries and idempotent writes.

If two feeds can update the same field, document which source wins. Duplicates often draw attention first, but the same sync can silently overwrite a legitimate change.

Test edge cases before cleaning up old duplicates

Create a small test set. Include a repeat delivery, two updates arriving together, a changed email, a second legitimate deal and an old update arriving after a new one. Decide what the destination should contain for each case. Run the sequence twice and compare the CRM to the expected records and notifications.

For existing duplicates, review their associations before merging. A contact can own notes, deals and activity from several teams. Fix the source of the duplicates before doing a bulk cleanup, and route uncertain matches to a person with enough information to compare both records.

  • Record the source ID, decision and target ID for each tested update.
  • Verify that a backfill uses the same ownership and matching rules as the live flow.
  • Add an exception view for missing IDs, conflicting matches and changes from an unexpected source.

The takeaway

Match records by a stable key, track repeated events separately, and test the real destination under concurrent updates and retries before you clean up production duplicates.

Continue reading