DEV Community

Rohan Mehta
Rohan Mehta

Posted on

Salesforce Duplicate Rules: Stopping Duplicate Records Before They Multiply

Salesforce Duplicate Rules: Stopping Duplicate Records Before They Multiply

Duplicate records are the quiet tax on every Salesforce org. Two accounts for the same customer, three contacts with the same email, leads that sales and marketing both claim. The data looks fine until someone tries to report on it — and then nothing adds up.

Salesforce gives you duplicate rules to catch this at the door. Here is how to use them properly.

What a duplicate rule actually does

A duplicate rule watches a record as it is created or edited and compares it against existing records using a matching rule. When it finds a match, it does one of two things: block the save, or warn the user and let them decide.

Blocking sounds safer, but it is not always the right call. A hard block on leads, for example, can stop a rep from logging a genuine new opportunity at a company you already work with. Most orgs start with Alert and move to Block only once they trust their matching rules.

Matching rules: the part people skip

A duplicate rule is only as good as its matching rule. Salesforce ships standard matching rules for accounts, contacts, and leads, and they are a reasonable starting point — but they match on exact fields, and real-world data is messy.

A few practical choices:

  • Match on email for contacts and leads. It is the most reliable single identifier you have.
  • Match accounts on name plus a second field — website, phone, or billing city. Name alone produces false positives ("Acme" the bakery vs "Acme" the manufacturer).
  • Use fuzzy matching where it is offered. It catches "Jon Smith" vs "John Smith" and small typos that exact matching misses.
  • Set a sensible matching threshold. Too loose and users get warned constantly and start ignoring the alerts. Too tight and duplicates slip through.

Where duplicates usually come from

Rules only help if you know where the duplicates are entering. The usual suspects:

1. Web-to-Lead and imports. A form submission creates a lead for someone who is already a contact. A data import creates accounts that already exist under a slightly different name. Clean the data before it lands — the discipline in our guide on why every AI strategy needs data cleaning first applies to imports just as much as to AI.

2. Manual entry. Reps type fast and search badly. The duplicate warning only works if they actually read it, so train the team on what the alert means instead of treating it as a popup to dismiss.

3. Integrations. A marketing tool syncing contacts into Salesforce will create duplicates if the matching criteria on the integration do not line up with your duplicate rules. Check both sides.

Cleaning up what is already there

Duplicate rules prevent new duplicates. They do nothing about the ones already in the org. For that, use the Duplicate Record Sets and the Potential Duplicates component on the account, contact, and lead record pages. An admin can merge records from there, choosing which values survive.

Two rules for merging:

  • Always keep the record with the most history — activities, opportunities, and cases matter more than which record is newer.
  • Decide who owns the merge process. If everyone can merge, someone will merge the wrong records. Give the job to one or two admins and run it on a schedule, monthly at minimum.

A simple setup order

  1. Turn on duplicate rules in Alert mode for accounts, contacts, and leads.
  2. Watch the alerts for two weeks. If users are ignoring them, your matching is too loose. If nobody ever sees one, it is too tight.
  3. Fix the matching rules, then switch the worst offenders to Block.
  4. Schedule a monthly duplicate cleanup using the Potential Duplicates component.
  5. Add required fields where they help — our guide on how to make fields required in Salesforce shows the six ways to do it, and required email or company fields make matching far more reliable.

Duplicates are not a one-time cleanup. They are a process — rules at the door, a monthly merge routine, and clean data coming in. Set that up once and the problem mostly solves itself.


Originally published at Way2Force — practical guides on Salesforce Flow, automation, and CRM.

Top comments (0)