One Simple Way to Prevent Duplicates in Salesforce

 In blog, Data Clean, Data Management

Your Salesforce data is one of the most important aspects to making your Salesforce implementation successful. When data is structured incorrectly, not complete, or simply not visible to the right people, your adoption and usability of the platform decreases dramatically. One of the common issues every Salesforce customer experiences is duplicate data.

It can be really easy to get duplicate records into Salesforce. It can happen because someone didn’t search properly for an existing records before creating a new one. It can happen because an import spreadsheet wasn’t cleaned before data was created. Regardless, duplicate records are the bane of every Salesforce environment.

There are many ways you can handle duplicates. You can manually review and manually merge duplicate records in Salesforce. This is viable if you’re overall data set is pretty small. For most companies, this is simply not feasible. There are some great tools and services that help remove the duplicates from your system (feel free to ask us about them).

Once your data is squeaky clean, the best way to handle duplicate records is to prevent duplicates in Salesforce from being created in the first place. There are many tools that can do this, but there is on available in Salesforce for free and it is very easy to setup and use.

Using Duplicate Management in Salesforce

You can find duplicate management options in the Setup Menu underneath Administration. You do NOT need a license to use this tool.

Salesforce Duplicate Management
Create and Activate your Matching Rules

Matching rules is where you define when a record may be a potential duplicate. There are a few rules already built, but you’re going to want to build your own.

Creating a new rule is easy. You provide a name, description (optional), and then define your criteria with drop down menus. You also have the option to  match when the field is blank. For out example, we’re looking for records that have the same email, the same last name, and where the First name is “fuzzy.” Don’t know what fuzzy means? Learn about Fuzzy matching.

Next Save, and then activate the Rule. On to creating the Duplicate Rule!

Contact Matching Rule

Creating Duplicate Rules

Matching Rules define what is a potential duplicate. A Duplicate Rule defines what the system should do when it finds a potential duplicate.

Just like a matching rule you can create a duplicate rule first by defining a name and description (optional) after you choose the object the rule is for. Next you can set the record level security. When it’s enforced it will only consider records the current user has visibility to for potential matches. If you don’t want ANY duplicates regardless of what the user can actually see, bypass sharing rules.

Next you can set the actions when a duplicate is found. In this example, we’re allowing a duplicate to be created but only after we Alert and Report on the this possible duplicate. An alternative is we can block the creation outright. For new matching rules, I prefer to Allow and confirm that rule is ONLY finding duplicates. Going forward we can change this to block.

Next we choose which Matching rule we’ll use. It will only display Matching rules that are active. Finally, you can also set additional criteria to limit the records that could be a valid duplicate.
Duplicate Rule

Duplicate Management in Practice

What does this look like in practice? Here we can see I’m trying to create a contact from Brian Kwong at Better Partners. Our matching rule finds a match based on the name and email address. When I click save, I see red message similar to a validation rule. The existing record also shows up in the list so I can open and review it. Then I have the option to Save (ignoring the warning) or cancel and not create a new contact. The Save (Ignore Alert) only displays if you’re not blocking duplicates in the Duplicate Rule.
Duplicate warning

You may need to create multiple Matching and Duplicate rules depending on your data and the issues you experience. Don’t wait until everything is perfect to start using Duplicate Management. Start small with one or two rules and add as you go along. Make sure your users are informed and provide feedback so you can tune the rules as needed.

Need more help?
Talk With Us
  • Want to know when we post something new? Get Notified of Future Posts

  • Resources



    Brian Kwong
    Brian has been an Admin/Developer on the Salesforce platform since 2007. He was recognized as a Salesforce MVP in 2012 and has been renewed each year. Brian is a passionate supporter of the Salesforce community and is a co-leader for the Wisconsin Salesforce User Group. Brian specializes in business automation, business analyst, and best practices. He's the Vice President of Delivery and Operations at Better Partners.
    Recommended Posts

    Leave a Comment

    Start typing and press Enter to search