Deal with Duplicates: Two Tactics to Use Today


You have the lead Sam Thacker at Roadrunner Supply with a phone number but no email. Then you notice a contact named Sam Thacker with an email but no phone number. And then there’s another lead named Sam Thacker at Acme Supply with the same phone number as Sam Thacker at Roadrunner Supply.

Duplicates. You had hundreds or thousands of them. But you’re a Salesforce Admin hero, so you saved the day by devoting a Saturday to zapping all the duplicates you can find. However, the next time you run a report, you find… more duplicates!

You can stop the madness!

When your Salesforce data contains duplicate records, sales reps waste time trying to contact out-of-date leads. Worse, they risk inadvertently spoiling customer relationships by contacting accounts or contacts too soon or without the right information.

If your org was created in Spring ’15 or later, you’re good to go: Duplicate Management is already active in most orgs created since then. Otherwise, read on to find out how to keep the number of duplicates at zero—or at least keep it from growing.

Tactic #1: When reps look at a record with duplicates, show ’em those dups

If your sales team uses Lightning Experience, use duplicate rules and the Potential Duplicates component to alert them to duplicate business accounts, person accounts, contacts, or leads.

Example: Show your sales team duplicates on lead records

Let’s walk through an example with leads.

  1. In Setup, in the Quick Find box, find Duplicate Rules. Check that the standard lead duplicate rule is active.


Note: If your org was created before Summer ’17, standard rules don’t find duplicates across leads and contacts. But you can update the rules. Add the standard contact matching rule to your standard lead duplicate rule, and add the standard lead matching rule to the standard contact duplicate rule. Or create custom duplicate rules with whatever matching rules you want.

       2. In Setup, in the Quick Find box, find Lightning App Builder.

       3. On the lead layout, add the Potential Duplicates component. Choose an alert option: Display the default card (shown), switch to a temporary toast, or display both card and toast.

Now imagine that the next morning your newest sales rep, Jason, finds Susan Lee on his list of assigned leads.

Before dialing the number, Jason looks at the duplicates and sees that a colleague, Marie, recorded a successful call to this lead just yesterday. Contacting the lead again would be counterproductive, so Jason moves to the next lead on his list. Customer relationship saved!

Try these steps with business accounts, person accounts, and contacts.

Take it one step further—let your sales team merge duplicates

Sometimes a snapshot of duplicates is all the information a sales rep needs. But you can enlist your sales team in your cleanup effort by giving them permission to merge the duplicates they find.

Sales reps with permission can merge up to three records at a time on the same object.

Before merging, the rep can choose the correct value for each field.

You did it! You protected your customer relationships by giving your sales team information that they can use to understand customers before contacting them.  

Tactic #2: Stop sales reps from creating duplicates in the first place (or at least warn them)

Now learn how to reach your ultimate goal: To keep the number of duplicates at zero, zilch, none.

Imagine that in the process of creating or editing leads, your sales reps enter duplicate data.

Well, that’s not too hard to imagine, but picture showing reps an alert to warn them that they’re about to create a duplicate. Or picture blocking new duplicates altogether.

Apply this tactic whether your sales team uses Lightning Experience, Salesforce Classic, or the Salesforce mobile app. (You can apply it via an API or Data Loader, too.)

In Part 1, you activated the standard lead duplicate rule. The rule matches records with the same name and phone number. Let’s look at different ways to apply the rule to deal with new duplicates.

Example 1: Just a warning

In Setup, in the Quick Find box, find Duplicate Rules. In your lead duplicate rule, under Actions, select Alert. If you want, customize the alert text.

Now suppose that Jason starts creating a lead and enters a phone number that matches a phone number already in Salesforce. Salesforce shows a message with a link. Jason can save the new lead or click View Duplicates to see the existing records.

When Jason chooses to view the duplicates, he sees that the record he was going to create duplicates two leads and a contact.

Example 2: No new duplicates allowed, period

Now try blocking sales reps from creating duplicates. Under Action On Create, select Block.

Jason can click to view duplicates, but he can’t save a new one.

Example 3: Stop reps from creating duplicates even when they can’t see what they’re duplicating

Now suppose that Jason tries to create a lead and enters data that duplicates a record he doesn’t have access to. You’ve got him covered because you can still prevent Jason from creating a duplicate.

In the lead duplicate rule, under Record-Level Security, select Bypass sharing rules.

Now when Jason starts creating a duplicate lead, Salesforce alerts him and allows or blocks him according to the other settings you’ve selected. But the alert doesn’t show information about the existing record that Jason doesn’t have permission to see.

For more information:

Trailhead Module: Data Quality

Deter or Prevent Users from Creating Duplicate Records

Let Users View and Merge Duplicate Records in Lightning Experience


For questions, comments, or feedback, post on the Duplicate Management Trailblazer Community.

Creating an AppExchange Strategy

Editor’s note: This is one of our most popular posts, so we’ve updated it with the latest information and resources. A big portion of a Salesforce Admin’s job is listening and learning. Listening to your users and learning what they need will not only help you drive adoption but also help shape your feature roadmap. […]

Screenshot of lightning setup page

Take a Tour of Setup Home in Lightning Experience

Editor’s Note: This is one of our most popular posts, so we’ve updated it with the latest information and resources. You’ve probably been on a tour before at a museum, historical site, or even your best friend’s new home. Didn’t you learn a lot more than by stumbling through on your own? Well, consider this […]


Have an Idea for a Story?

We are all about the community and sharing ideas.
Do you have an interesting idea or useful tip that you want to share?