6 Salesforce Duplicate Rules You Need To Activate Right Now

Share this article...

Duplicates: a perpetual Salesforce problem. I’ve seen duplicates in every single org I’ve ever worked in, even the ones that assured me there were no duplicates! The duplicate problem is made worse by companies that don’t keep an eye on their data quality, assuming that Salesforce blocks and manages duplicates out-of-the-box. Implementing these six duplicate rules will save you from future duplicates, and an increasingly horrendous data quality problem.

Throughout this post, I will refer to both “Duplicate Rules” and “Matching Rules.” Here’s a quick primer on the difference:

  • Matching Rules will identify ‘what field’ and ‘how’ to match. For example, ‘Email Field, Exact Match’ or ‘Account Name, Fuzzy Match’ They don’t do anything on their own.
  • Duplicate Rules will use those Matching Rules to control ‘when’ and ‘where’ to find duplicates. For example, “Use Account Name, Fuzzy Match to find duplicates on the Account object upon creation” or “Use Email, Exact Match, to find duplicates on Leads and Contacts, upon create and edit.”

What Comes Out-of-the-box?

Out of the box, Salesforce provides three matching rules: for Accounts, Contacts, and Leads. These alone are insufficient, because:

  1. They don’t cover every scenario, and
  2. The error messages are not helpful to end users.

You could buy an app to prevent dupes, and depending on the size of your org, you might need to find a de-duplicate service for your existing records.

The good news is that Salesforce allows you to create your own Duplicate Rules, so you shouldn’t need to spend extra to prevent duplicates going forward.

Let’s start with Accounts. When users create Accounts, they are probably in a hurry (well, they’re always in a hurry!). No matter how much training you provide, they aren’t going to search for this company to see if it already exists. So, we can assume our users are going to create duplicates.

1. Account Exact Name

Purpose: To prevent the creation of multiple Accounts with the exact same Account name.

Create an Account Exact Name Matching Rule

Then create an Account Exact Name Duplicate Rule

  • Use the Matching Rule you just created, and give it a unique error message.
  • Make sure you select “Block” on both Create and Edit Actions

2. Account Name Potential Match

Purpose:  to warn users of a potential duplicate where account names differ slightly.

Examples of when you would want to flag a potential duplicate to users, but not block what could a genuinely separate account:

  • Companies that use an acronym. A user that types “Inc.” instead of “Incorporated”.
  • Different branches of the same company, with a very similar naming convention (common for international companies “Tech Company North America” and “Tech Company UK.”

This is where we will use Salesforce’s Fuzzy logic, and a different error message.

Create an Account Name Potential Match Matching Rule

 

Then, create an Account Name Potential Match Duplicate Rule

  • Make sure to Allow on Create and Edit Actions

That takes care of Accounts!

Leads & Contacts (People Duplicates)

Leads and Contacts are a bit more complicated. Sometimes users will say “I want to prevent Lead duplicates.” Or “I want to prevent Contact duplicates.” Both great goals, but still does not solve the total duplicate problem, even in tandem.

Leads and Contacts boil down to one thing: individual people. Not only do we need to prevent Leads duplicates, and Contacts duplicates, but we also need to prevent users from creating Contacts that are already Leads, and prevent users from creating Leads that are already Contacts. Here’s the four scenarios we need to prevent:

  • New Leads that already exist as Leads
  • New Leads that already exist as Contact
  • New Contacts that already exist as Contacts
  • New Contacts that already exist as Leads

I prefer to manage these each as their own individual Duplicate Rule, so that I can give each one a very specific error message, and tell the user what they need to do to resolve. I also only base my rules on a person’s email address. It’s perfectly normal for two or more people to have the exact same first and last name, so I do not create any rules (even fuzzy) based on first and last name.

Create a Lead Email Exact Matching Rule, as shown below:

Then, create a Contact Email Exact Matching Rule, as shown below:

We’re going to use these two Matching Rules to make the rest of our Duplicate Rules.

3. Lead-to-Lead Email Exact Match

Purpose: To prevent the creation of multiple Leads with the exact same email.

The Lead-to-Lead Email Exact Match Duplicate Rules will look like this:

 

4. Lead-to-Contact Email Exact Duplicate Rule

Purpose: To prevent the creation of multiple Leads-to-Contacts with the exact same email.

Make sure to compare Leads to Contacts, and give it a unique error message:

5. Contact-to-Contact Email Exact Duplicate Rule

Purpose: To prevent the creation of multiple Contacts with the exact same email.

6. Contact-to-Lead Email Exact Duplicate Rule

Purpose: To prevent the creation of multiple Contacts-to-Leads with the exact same email.

Create a Contact-to-Lead Email Exact Duplicate Rule

  • Make sure to compare Contacts to Leads, and give it a unique error message.

Now, Activate!

Now activate all of your new rules, and deactivate the standard out-of-the-box rules. You now should have six Duplicate Rules, and four Matching Rules, like I do below:

Duplicate Rules

Matching Rules

And that’s it! Test these out in your Sandbox or Developer Org first to make sure they work as you expect. Configuring these duplicate rules is the first step in ensuring data quality, and to having a happy and healthy Salesforce Org. For additional information about managing duplicates, be sure to check out the Trailhead for Duplicate Management.

4 thoughts on “6 Salesforce Duplicate Rules You Need To Activate Right Now

  1. Avatar

    This article is very useful indeed, i have test them in sandbox and working fine, this coming week will conduct a demo to the stakeholders and deploy them in production.

    Kind Regards –
    Prashant Yadav

    1. Avatar

      Hi Roman – The only time you would run in to a problem with an integrated system would be :

      #1 – If that integrated system is attempting to create a duplicate (Contact, Account, or Lead), it would cause errors with the sync. You’d have to decide if you want your integrated system to be allowed to make duplicates, or not, and if so, you can exclude your integration user from the duplicate rules.

      #2 – If you have existing duplicates. You’d want to scrub your database for existing duplicates and merge them to prevent any sync errors.

  2. Avatar

    When I create the Matching Rule for the Contact Email Exact, I get an error upon activation that it is to broad and I must make it more unique. I didn’t have that issue with the Lead Email Exact. Any thoughts why this won’t activate but the other will?

Leave a Reply