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.

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

  1. 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. 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. 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?

    1. It means your current Org already has too many contacts that have exact match email addresses. When you create the Matching Rule, it scans your existing Org for the number of “hits” the rule will create, if this number is too large, you get the error you are seeing. Try adding another criteria as well as the email address to narrow down the number of potential “hits”

  3. Hello,
    I have a query regarding the duplicate rules. When a lead converted it will create accounts & contact, opportunities right this situation when you convert a lead form contact, it will generate an error. Could you please let me know what is the option for converted leads?.

  4. Hello, I am trying to set up the Account rules in my org and I can’t activate the matching rules because they are too broad. Does anyone know a workaround to this? This worked for the Contact object.

  5. Is there any solution for being able to see that there is a duplicate contact when looking at an already created lead when the sharing rules are set to private on the Account/Contact objects? I like the notification when creating a manual lead where it let’s them know but they can’t view the record. When our uses click on a web created lead we need them to see that there is already a duplicate contact that they don’t have access to and right now it doesn’t any duplicates in the lead for those users.

  6. I’ve never used Leads objects before, only Contacts, so please forgive my ignorance. I’m using a WordPress plugin to push form data to Salesforce to create a new Lead. It appears as though if an email address already exists in a CONTACT within Salesforce, the new Lead is not created. I’m assuming this has something to do with Duplicate Rules but haven’t found anything in my system that would prevent this. I still want the lead to be generated, even if a Contact exists with the same email address because I want to ensure this particular request is responded to (otherwise I’ll never know it was submitted). Thoughts?

  7. You may need to add a “Condition” to exclude those leads created by Web-to-Lead as your web customers will not be able to see these errors. Use the lead source to identify them as website leads and prevent the duplicate records being blocked.

    1. Exactly, web-to-lead is one situation where you do not want to block a lead creation even if it exists already as a contact or a lead. The reason is that a web customer might contact you for a different product later on.

      Also, imagine you have a lead that you are going to disqualify soon because the person has bought something else. If the same person bought something from you before, you might want to create him as a contact anyways.

      There are many situations to think about here. The only rule that I will always enforce is the contact duplication, the rest needs to be analyzed carefully.

  8. What if two different companies exist with name like Test Solutions and Test Ventures. Now these companies could be affiliated or could be separate entity. How do we create a duplicate rule that would still let these exist?

Add Comment