It doesn’t matter if Salesforce is the Cadillac of systems; dirty data can make your entire company grid to a screeching halt. Basing business decisions on dirty data can cause errors, missed projections and inflated forecasts while driving the ROI of the application down exponentially.

Duplicate management is one of the elements that make up dirty data and thankfully, it’s one of the easiest issues to address. There are a plethora of free and paid tools on the AppExchange that have been fantastic additions to the platform but with the Spring ’15 release, Salesforce announced Duplicate Management; an entirely native way to manage duplicate records across the Salesforce platform (including Salesforce1)!

What’s also amazing is that you don’t need a license to activate this feature, and it’s available in Professional, Enterprise, Performance and Unlimited and Developer edition orgs.

To access Duplicate Management, click Setup | Administration | Duplicate Management.

Creating Matching & Duplicate Rules

To setup Duplicate Management, there is no feature activation required. However, you do need to create and activate Matching and Duplicate Rules. When I first started to dive into these rules, I was a little confused on how they worked so let me explain them to you. uses both tools in conjunction to determine what records are matching and then how to handle a potential duplicate. Matching rules allow you to write a criteria set that will determine if there are similar records in Salesforce. This can be done using fuzzy or exact logic. Duplicate rules then determine what can be done with these matching records.

Duplicate rules allow the following behavior to be set:

alert the user that there are duplicates but allow them to proceed with the creation of the record
– or –
block the user from creating the record altogether.

Both rules need to be established and activated for this duplicate management tool to work properly.

Salesforce provides every org with default matching rules. You can activate these rules, or create your own. Click the links below to see the matching equations and criteria for each of the standard matching rules. Review these standard rules first to determine if they will work for your org before creating custom matching rules.

Should you choose to use one of the standard rules, just click Activate next to the rule to turn it on. Creating new rules is just as easy. The setup is very similar to creating a workflow rule and action. Select the object the rule is being created for, select the criteria and save it!

Unlike matching rules, there are no duplicate rules pre-defined. These need to be created from scratch. However, there are far fewer steps to go through to set these up. Here’s a screenshot of the duplicate rule in my org for the lead record.

Lead Duplicate Rule

There are a few things to notice in this duplicate rule detail. I’ll lay them out below.

Record-Level Security – The duplicate rule can determine duplicates based on two options: the records a user can see based on existing sharing rules, or a duplicate alert can be triggered across the database, bypassing the existing sharing rules for that record. Depending on the strictness of your orgs data sharing model, this will be important. Based on the selection, a duplicate rule may not trigger even if a duplicate exists because the user doesn’t have access to that record via the sharing rules.

Action on Create & Edit – based on the selection, the duplicate record can be allowed, and the user can proceed to create the duplicate, or if your business process prefers, the creation of this duplicate record can be prevented altogether by selecting Blocked from the appropriate picklist. Notice that for both of these options, there are two associated check boxes: Alert & Report. The alert option will display a warning on the record for the user with the provided Alert Text. The Report option allows the ability to report on duplicates.

Alert Text – similar to an error message, this text should be clear and concise and communicate to the user exactly what they are seeing and what their options are. The default text, in this case, is sufficient, but I always like to spice things up a little bit and tend to error on the side of overkill when it comes to help text in general.

If you want to learn how to write good error messages, check out How to Write a Great Error Message on Medium.

Order – multiple duplicate rules can be created for a single object and prioritized in the order they should be executed. If multiple duplicate rules are selected, this field will indicate the order it will be evaluated.

Once your Duplicate rules are created, it’s time to activate them and test it out!

Duplicate Management in Action

In my org, I’ve set up duplicate management for the Lead object only to accommodate our business process. When a lead is created, and matches are found, the duplicate rule will allow the user to continue with the creation of the record, but they will receive an alert. Here’s what it looks like:

Test Duplicate Lead

Notice that the UI has changed slightly. At the top of the page, the Save buttons now show the action that will take place. By clicking on Save (Ignore Alert), the user can save the record and ignore the alert altogether. Or, they can select Save & New (Ignore Alert) to create this record and jump right back into the New lead record page.

Below the buttons are where the error message displays. Notice that the possible number of matches is indicated (8 in this case) and the Alert Text provided in the Duplicate Rule is shown.

Matching records are displayed in an excellent list view format, and the fields that were evaluated and matched to these records are highlighted in red.

The user now has all of the information needed to make an educated decision on how to proceed. The view on Salesforce1 is similar.

Duplicate Management on iPhone

On Salesforce1, as soon as Save is tapped on the app, the page refreshes to show the first mobile screenshot above: it’s a duplicate alert with the Alert Text outlined in the Duplicate Alert. The user can then scroll through the duplicate list to see if the record is a duplicate.

By clicking Close in the upper right-hand corner, the user is redirected back to the lead they were creating, and can proceed if desired. Note that there is an alert remaining at the top of the page indicating that duplicate records have been found.

Other Duplicate Management Features

In this example, I’ve only setup Lead Duplicate Management rules, but these same rules can be created for Accounts and Contacts.

Cross-object Matching – this is a huge feature that most organizations will appreciate. Compare data across objects in Salesforce to help determine if a duplicate record already exists. This is great for related records like Lead to Contact, but it also works on custom objects.

Lead Convert Matching (Salesforce1) – when converting a Lead on Salesforce1, duplicate management can alert a user that an existing Contact is already in Salesforce, and it will provide the user the ability to convert into that current record.

Duplicate management in Salesforce became a breeze with this new feature earlier this year. If you don’t have any duplicate prevention tools currently being used in your org, then activate this as quickly as possible. If you do have an existing tool, review the current functionality of both and determine which one is best for your organization.

Have you used this tool before? Do you have any tips or suggestions for Administrators or Users? Leave a comment below!

19 thoughts on “ Setting Up Duplicate Management ”

  1. This is great! I have implemented the duplicate management, but I am still having issues with duplicates stemming from web to lead forms. Most of our contacts already in the CRM have an “email” field and an “other email” field. The problem is, on our online forms, I don’t know if a contact is going to use their primary email, secondary email, work email, or something else. This is the #1 way our org gets duplicates. I know there is cross-object matching, but what about cross-field matching within the same object (for instance, BLOCK if email = email OR if email = other email). Or some other creative solution?


      1. Thanks, Francis. That is what I am currently doing. But I want to be able to say Email=Email OR Email=Email2 OR Email=Other_Email_c, etc. I want to match one field to many. Any ideas?


        1. Ok exhausted everything I can think of. I even had a look to see if external objects would do it (create self-connected object to the same org and see if you could create a cross-object matching/dupe rules that way) but alas failed.


          1. Hey Francis – No problem! You have come to the frustrating point I have now come to. I am now looking in to an Apex code that would validate across fields and objects. Having no coding background though, it’s tough. If you know of anything, please let me know. Thanks!


    1. Thanks Vince! I don’t know if this native tool includes this functionality (I don’t know for sure). There are some third party apps that may be able to do this. Take a look at RingLead – they have a import duplicate management tool which may be able to leverage the logic.


  2. I’ve helped customers implement this on a number of occasions and generally recommend the Alert & Report options when you first turn them on as you may not have got your rules right when you first switch them on. This way you can evaluate how well it’s working and your users can used to the fact that duplicates are bing checked for. If you prevent users creating perfectly valid records you risk them either not creating the record or deliberately entering dirty data just to get around the block.

    In response to the question from Vince, you can’t currently check “Work email” on the new record vs “Personal email” on existing records.

    One possible approach (and I haven’t tested this) might be: Create a hidden custom field populated by a workflow or business process which is the concatenation of all the email address fields (don’t try a formula field for this) and then use one of the matching algorithms listed here: to find one that works for you.

    If you implement this, then I’d certainly do a warning, rather then a block – and note that if you use a hidden field, then the matching fields won’t be displayed to the user so you will need to be very clear in your error message

    I had a quick look in the ideas exchange and this doesn’t appear to be there, but I have had other people ask me about doing this. Maybe it’s time to create a new one:


    1. Thanks, Stephen. I am looking into an Apex code now. I think the concatenation idea would be complicated to do and communicate to users. I’d need two fields – one that concatenates Email + Other email (in that order), and another that does it the other way with Other email first. It just gets complicated, no?


      1. Just one thought if you want to block records from being created you could use the unique field trick. You could have a field on the contact that concatenates the two emails together using a workflow and puts it in a field on the contact. That field is also unique. When another record is created with both the same email it throws an error.

        One of my first stabs at creating a Salesforce package was a de-dupe app. I created it in early 2011 but if you want to take a look at the code, go ahead but works a bit differently…


  3. Hi Vince, you might be able to get away with concatenating the fields together just one way and then trying the various matching rules that are available to see if any of them to the job you are looking for – possibly one of the fuzzy ones might work. If you find one that works for a combination it could well be simpler than writing it in APEX and would save test class writing and future maintenance work.

    With just two email addresses you’d need 2 concatenated fields and if you have more then the number of combinations required grows really quickly


  4. Does this native tool only prevent us from entering duplicates, or it can show us also a list of duplicates?


    1. It can show a list of duplicates if you setup the preferences to do so. When setting up the Duplicate Rule, check the “Report” box and the potential duplicate will be recorded and can be reported on.


  5. Great post. One big disclaimer you need to add is checking web to lead forms. If duplicate rules are on they can block web to lead forms.

    This means sometimes enquiry will not be logged in salesforce or any where else and you simply lose that functionality. You need to turn off alerts to avoid this. However, alerts are the part you want.

    As a side note you should be able to use matching criteria to avoid this. But it does not work. Seems to be buggy


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.