NewDedupely IntelligenceNow on every paid plan, monthly or yearly.

Protecting External IDs When You Merge

Keep ERP, billing and contract IDs safe: merge the duplicates that share an ID, and never the records that have different ones.

View as Markdown

External IDs, like an ERP Customer Number, a Tax ID or a billing account number, link a CRM record to another system. Two records with the same external ID are almost always duplicates. Two records with different IDs are almost always different customers, even when their names and emails look alike, and merging them leaves one ID behind. In Dedupely, you protect external IDs by matching on them, finding the matches where they differ before you merge, choosing which record survives with Merge Rules, and, in Dedupely Intelligence, using Protected fields.

What can go wrong with external IDs

Situation Example What to do
Same ID Two accounts with ERP Customer Number 10442 A strong duplicate. Match on the ID with Exact.
One record has the ID, the other is blank A contact from a web form, and the same person synced from billing Usually a duplicate. Make sure the record with the ID survives (see below).
Different IDs Two branches of the same company, each with its own Tax ID Usually different customers. Don't merge them: find these matches and reject them.

Step 1: Match on the ID itself

Create a Duplicate Search on the ID field with Exact, plus one or two fields to confirm the match, like Company Name and Website (Domain Root). Records that share an external ID are your safest duplicates. See Duplicate Searches.

Because a wrong merge here can affect billing or an ERP sync, start with Auto Match and send unclear matches to Manual Review for the account owner, instead of merging everything at once.

Step 2: Find the matches where the IDs differ

Your other searches, on name, email or domain, can still put two records with different IDs in the same match. Find them before you merge:

  1. Open the Duplicate Search and click Filters.
  2. Click + Add condition and select the ID field.
  3. Choose the operator is unique across match. It shows the matches where every record has a different value.
  4. Leave Count blanks as a value unchecked, unless you want a blank ID to count as its own value.
  5. Click Done, then Scan.

Review what's left. Reject the matches that aren't duplicates, so they never come back in any search for that object, and send the unclear ones to Manual Review. See Filters and Rejected Matches.

Step 3: Make sure the record with the ID survives

Blank values never overwrite existing data, so when only one record in a match has the ID, the ID is kept. What you choose is which record survives, with its record ID and its link to your other system:

  • Primary Record: set it to Custom, with a Win Rule: When Field your ID field, operator is not blank. The record linked to your ERP or billing system is the one that's kept.
  • The ID field: set it to Only Primary, so the surviving record keeps its own ID.
  • Check the result in the Merge Preview column of View Match Details before you merge in bulk.

How each CRM handles the record ID on a merge:

  • Salesforce: the master record keeps its ID, so integrations that point to it keep working.
  • HubSpot: HubSpot gives the merged record a new Record ID, and the old IDs redirect to it. If another tool stores HubSpot IDs, update them over time.

See Merge Rules.

Step 4: In Dedupely Intelligence, use Protected fields

Dedupely Intelligence doesn't use your Duplicate Searches' match settings or filters. To keep records with different external IDs from matching there, use Protected fields:

  1. Open Dedupely Intelligence under Contacts, Companies or Leads.
  2. Click Protected fields at the top right.
  3. Under Never match values on differing fields, click Add a field and choose your ID field. You can add up to 5 fields.
  4. Choose how blank values are treated:
  • None can be blank: records only match if every record has the ID, and it's the same.
  • At least one must not be blank: a record without the ID can still match one that has it.
  • All can be blank: blank IDs never keep records from matching; only different IDs do.
  1. Click Save.

If many of your records don't have the ID yet, like contacts from web forms, choose All can be blank, so they can still match. The other two options are stricter. See Protected Fields.

Step 5: Keep it safe over time

  • Automate last. Turn on Auto Merge only on the search that matches on the ID itself, once it has run without false matches. Keep searches on names or domains on Auto Match.
  • Keep your Safety Settings on. They set aside matches built on placeholder data, and matches with more than 20 records, which usually mean a shared or placeholder value. See Merge Safety.
  • If two records with different IDs were merged, undo the merge from Merge History within 30 days. The records come back with new IDs, so check the links your other systems have to them. See Undo a Merge.

Example setup

A distributor syncs its ERP into Salesforce. Each account has an ERP Customer Number, and branches of the same company have their own numbers.

  1. Search 1 (same ID): ERP Customer Number: Exact · Account Name: Similar Words (Any Order), with Ignored terms Inc., LLC, Ltd. · On Auto Match, then Auto Merge once it has run without false matches.
  2. Search 2 (by name): Account Name: Similar Words (Any Order) · Website: Domain Root · Billing City: Exact. Filter: ERP Customer Number · is unique across match. The team reviews these matches every week and rejects the branches.
  3. Merge Rules: Primary Record set to Custom, with a Win Rule: When Field ERP Customer Number · is not blank. ERP Customer Number set to Only Primary.
  4. Dedupely Intelligence: ERP Customer Number added to Protected fields. Accounts created by the sales team don't have a number yet, so the blank option is All can be blank.

Common mistakes

  • Merging on name alone when records have IDs. Two branches with the same name are different customers. Check the ID first.
  • Merging the "is unique across match" results in bulk. Those are the matches where the IDs differ. Review them one by one.
  • Letting the record without the ID survive. Set the Primary Record so the record linked to your other system wins.
  • Turning on Auto Merge on a search that doesn't include the ID. Keep it on Auto Match, and review.
  • Forgetting Dedupely Intelligence. Its matches don't use your filters. Add the ID to Protected fields.

FAQs about external IDs

  • Are two records with the same external ID always duplicates? Almost always. Watch for placeholder values, like 0000, that many records share. Safety Settings set aside matches with more than 20 records.
  • What happens to the ID when one record has it and the other doesn't? Blank values never overwrite existing data, so the ID is kept.
  • What if both records have different IDs? Don't merge them. Use the "is unique across match" filter to find these matches, and reject them.
  • Can Merge Rules change a read-only ID field? No. Merge Rules can't be set on read-only fields.
  • Do Protected fields work in my own Duplicate Searches? No. They're for Dedupely Intelligence. In your own searches, match on the ID and use filters.
  • Can I undo a merge of two records with different IDs? Yes, within 30 days, from Merge History. The restored record gets a new ID in your CRM.

Next up

Protected Fields Keep records from matching in Dedupely Intelligence when a field that should never change is different.

Still stuck?

Our team helps on every plan and during the free trial, by chat, email or Zoom.

Portrait of Gaby Salinas

Behind the article

Gaby Salinas

Marketing Assistant at Dedupely

Gaby Salinas came to CRM data from marketing and advertising, so she looks at duplicates from two sides: the match and merge logic behind them, and what they do to the people using the CRM, like the rep who calls a customer twice, the admin who gets blamed and the cleanup nobody wants to start.

As Marketing Assistant at Dedupely, she follows how RevOps teams, end users, consultants and technical teams actually work with their data: the records they stop trusting, the workarounds they build and the moment they finally decide to clean up. What she finds shapes most of what Dedupely publishes.

Connect with Gaby on LinkedIn

Get started for free

20 free trial merges and as much free support as you need to get your duplicates under control.

Try for freeTalk to sales
Or sign up with Google
  • "Superior deduping logic with excellent support - highly recommend for cleaning up messy HubSpot records."

    M Weppner

Running CRM cleanup for clients? See the Partner Program