PRO TIPS
Performing a Salesforce Duplicate Review

Max Hampton
PROserve Consultant
Why should I perform a Salesforce Duplicate Review?
Data quality is the cornerstone to any successful Salesforce org. Duplicate records are an inevitability, even for the most diligent admins, but excessive duplicate records can hinder your ability to accurately track and report on data in Salesforce. Learning how to manage duplicates is vital to keeping your data quality high. In this article, we'll cover Salesforce built-in Matching and Duplicate rules, which can help you do just that.
What is a Duplicate Review?
A Duplicate review consists of configuring (or confirming) your organization's Duplicate and Matching Rules, which are the first line of defense against duplicate records being created. Duplicate and Matching Rules are criteria-based and can alert users while creating and/or editing records that a potential duplicate exists. A Duplicate review also involves reporting on and reconciling any existing duplicate records, and developing a path towards data cleanliness if your org is currently bogged down by excessive duplicates. If you want to know more, or want some help assessing your org, reach out–we're happy to help!
Outline of a Salesforce Duplicate Review
Performing a duplicate review assumes that the user has at least a basic understanding of Salesforce, including an understanding of navigating through Salesforce Setup, setting up conditional logic, and creating/running reports and building new report types. The basic steps look like this:
- Reviewing your current Matching and Duplicate rules to ensure accuracy and relevance in your org OR establishing new duplicate and matching rules to fit your needs.
- Setting up reports to better track and triage duplicate records
- Merging duplicates
- Developing a plan towards data cleanliness if excessive duplicate records are found
The first thing you'll need to do is configure Matching Rules and Duplicate rules. They work hand-in-hand–you need to configure both to ensure that Salesforce scans for potential duplicates. Let's talk about the difference between them quickly:
Matching Rules Identify Potential Duplicates
A Matching Rule defines the logic that Salesforce uses to determine that records are potentially duplicates. When configuring a Matching Rule, you'll define the object you're interested in searching, such as Accounts or Opportunities. You also get the chance to define the fields that should be used to consider two records as a match. For example, for an Opportunity, you might use the account name and a type field on the record, or for an Account you might specify the Account Name and billing city.
Matching Rules can also be set to consider only exact matches, or to consider a "fuzzy" match (like Bill vs. Will or William). You can also tell Salesforce to consider blank fields matches if so desired–for example, if an Account is missing its billing city, you can tell Salesforce to ignore the missing value and use the others in the rule to consider it a match.
Duplicate Rules apply Matching Rules to Records
A Duplicate Rule defines the action(s) Salesforce should take when the associated Matching Rule IDs a record as a potential duplicate. You can choose to warn the user, or prevent them from creating or editing the affected record. You can also log the potential duplicate so that you can report on it later. Duplicate Rules can also have exceptions–for example, it's often the case that admins build these rules to exempt themselves for integration purposes.
Configuring Matching Rules
In Setup, search for Duplicate in the Quick Find box. Select Matching Rules from the left-hand navigation bar
Salesforce includes a few Standard Matching Rules for Accounts, Contacts, and Leads. The criteria behind these matching rules is a bit involved. You can click on more info in the matching rule description to view the full criteria definition, or consult Salesforce's documentation. Generally, we recommend leaving these rules enabled unless you find they are capturing or flagging too many records as duplicates.
You may have other custom matching rules built already. If so, click to review the criteria and make sure it aligns with your business needs. In our test org, we have a rule on the Contact object that looks for the email field and the phone number field to be an exact match. Smaller, more specific rules like this are a great way to help limit duplicate record creation.


You can edit an existing rule can be edited, but it must be deactivated first. If the rule is tied to an active Duplicate Rule, you will need to deactivate the Duplicate Rule first before the Matching rule can be deactivated.
To create a new rule, click the New Rule button, then follow these steps:
- When creating a new matching rule, you can specify the object you want to flag new duplicate records for, and establish the criteria.
- Select a field you want to match by, and choose the matching method.
- Exact = only exact matches will be flagged
- Fuzzy = like/similar records will be flagged
- You can review this help article to learn more about the differences and when to use exact vs fuzzy matching.
By default, all criteria fields will be treated as an And statement, meaning all must be true in order to identify a duplicate record. If you have more advanced and/or criteria, you can click Add Filter Logic. Then, you can specify OR logic for one or more of the criteria fields. Don't forget to Save and Activate the rule when you're done.
In the screenshot below I’ve created a matching rule on the Contact object that looks for a complete address match.

Configure Duplicate Rules
After establishing a Matching Rule, you need to set up a Duplicate rule to tell Salesforce what to do if a potential duplicate record is found.
- Search for Duplicate again in Setup, and click on the Duplicate Rules option
- If new rules are needed, click “New Rule”, and specify an object.
- The object selected must match the object you selected for your matching rule.
There are quite a few more options on this screen to take into consideration:
- Record Level Security - choose if you wish to enforce or bypass any record sharing rules when attempting to identify new duplicates
- For example, if you enforce sharing rules, and you have contacts set to private, the rule will only search records that the user has access to (largely, records the user owns)
- Bypassing sharing rules causes Salesforce to search all records, whether or not the user has access to them. We recommend setting duplicate rules to Bypass sharing rules unless your org operates under strict sharing policies.
- Actions - specify what happens when a potential duplicate record is created or edited
- Alert - Display a message if a potential duplicate is found–we recommend always enabling this. If you select this option, you can set the text of the alert message–Salesforce will usually suggest a generic Use one of these records? message. We highly recommend customizing this message so that you can easily troubleshoot which rule caused the alert if your users report an issue or if you encounter it while importing records–usually, we recommend numbering the messages (something like DA1, DA2, etc).
- Report - log that a duplicate was found in a reportable object in Salesforce–we'll come back to this.
- Allow - If a duplicate is found during record creation/edit, allow the user to save the record anyway.
- Block - If a duplicate is found, block the user from saving the record
- Matching Rule(s)
- This is where you can tell this duplicate rule what records it’s looking for based on the matching rule you just created.
- Multiple rules can be added to one Duplicate rule. However, we generally recommend treating duplicate/matching rules as one to one relationships to keep troubleshooting and maintenance straightforward
- Conditions
- Allows you to specify additional conditions the record must meet in order to be process our duplicate/matching rules.
- Don’t treat these as your duplicate identification criteria, but more along the lines of how criteria to trigger a flow is handled. If you wanted to never look for duplicates if the current user creating the record was a system admin, then you could add that criteria in here. It is common, for example, to build an exception for integration users.
- Click to Save, and then Activate your new rule.
Below is an example of a duplicate rule set up using the matching rule we created earlier. This rule Allows creation and editing of duplicate records, but it set to report on and alert the user with a custom error message. I have also added in a condition that will only run this rule if the current user is NOT a system admin, exempting admins from this rule.

Let’s see our new rule in action by attempting to create a contact record with the same address as an existing contact record in Salesforce.

When creating or editing a record that hits one of your active duplicate rules, an alert like this will appear. If you don't see the alert, you may need to modify the Lightning Page to add the Potential Duplicates widget. When the alert is displayed, a user can select View Duplicates to see the other records Salesforce has identified. They will then have an opportunity to merge the duplicate records.

Compare and Merge Existing Duplicates
- From the potential duplicate alert, click on View Duplicates
- Select the records you want to merge and click Next
On the next screen, you can make several selections:
- You may select the principal record (i.e. the record that will remain after the merge is completed). The other record(s) will be deleted.
- You may also select which field values to keep from the merged records. For example, you may keep the name from the left record, but a phone number from the right record by selecting the radio button next to each value.
When you are done, click Merge. Remember: Merging records is an irreversible process. Proceed with caution!
After you have merged the duplicate records, all child items (for example Opportunities, Tasks, or Cases linked to Accounts) will be re-parented to the principal record you selected.


- Click Next at the bottom of the window to proceed.
- You will now be able to view and select the winning record and field values between the selected records.
- Click Next, and then Merge to complete the merge.

Creating a Custom Report Type for Reporting on Duplicate Records
If you selected Report when you created your Duplicate Rule, Salesforce logs duplicated records in objects called Duplicate Items and Duplicate Record Sets. We can report on these records to help identify the scope of our current duplicate situation using a custom report type. If you are using Unlimited Edition, you can also take advantage of duplicate job runs to scan your whole database, instead of relying on the results of editing single records–the data gets stored in the same objects.
- In Setup, search for Report Types
- Click New Custom Report Type
- Set your Primary Object to an object you have duplicate rules established for, i.e. Contacts
- Label the report, store it in a category, and mark is as Deployed
- Set the Object relationship to “Duplicate Record Items”, where each “A” record must have at least one related “B” record
- Click Save. Your new report type should look something like this:

- Under “Fields Available for Reports”, click “Edit Layout”.
- On the right side of this page, select to view Duplicate Record Item Fields, and click “Add Fields related via lookup”.

- Click on Duplicate Record Set, and add all items to your report layout.
- Click "Ok" to add the new fields.
- Scroll down to the bottom of the page to save your changes.

Reporting on Duplicate Records using Duplicate Items and Record Sets
Now that we've created a Report Type which will allow us to bring in Duplicate Record Sets and Items, we can actually report on those records:
- Navigate to the Reports tab in Salesforce.
- Create a new report from the report type you just created.
- Add fields you want to the outline, such as any contact/object detail fields, as well as the Duplicate record set name, record count, item names, and rule names.
- Filter your report on duplicate record sets with a record count of 2 or more.
- The resulting report should look something like this. We now have a report that breaks down Contacts with Duplicate record items. In the example below, Warren and Vonnie are flagged as duplicates of each other.
- Building a report like this will help you to
- Gain visibility into how many duplicates are currently in your system
- Visually identify which rules are marking contacts as duplicates.
- Below is an example report, pulling in potential duplicates based on the Address Match rule we created earlier.

- You can click on each duplicate record set to open, and then click the down arrow in the upper right to open the “Compare and Merge” tool, which we reviewed in the previous steps.

Cleaning Up Duplicate Records
If you’ve made it this far, you should now be in a place where you’ve identified your duplicate records, and are looking for a way to clean them up. There are a couple of different methods to do so.
- If you have a reasonable number of duplicate records, then using the out-of-the-box compare and merge tool along with the report we showed you how to create in step 3 should suffice.
- If you have an extensive number of duplicate records, we recommend using 3rd Party tools to merge duplicates. While these may have a cost associated with them, some good duplicate management tools include:
- Duplicate Check from Plauti (paid)
- DupeCatcher (free, but has limited functionality) and Cloudingo (paid) from Symphonic Source
- OneMerge from Audit9 (paid)
- Duplicate Management from DataGroomr (paid)
- Smart Duplicate Manager from Peeklogic (free)
- Apsona’s Dedupe and Match Utility (paid)
Conclusion
Congratulations! By tackling duplicate records, you're taking a crucial step toward maintaining the integrity of your Salesforce data—ensuring smoother operations and more reliable reporting. Duplicates are bound to sneak in, no matter how vigilant you are, but a well-executed Duplicate Review can help you stay informed about the state of your org and take proactive steps to manage potential issues.
If you haven't already, make sure to check out our previous PROtips on Performing a Salesforce Security Review, and on Performing a Salesforce Health Check!