How Do You Find and Prevent Duplicate Leads in Salesforce?
Quick answer
To find duplicate leads in Salesforce, count unique emails on a Leads report, build a report on Duplicate Record Items, or run a Duplicate Job on Performance and Unlimited. To stop new ones, set the Standard Lead Duplicate Rule to Block or Allow with an alert, then check how web-to-lead, imports and the API behave.
Key takeaways
- Salesforce splits the job in two. A matching rule decides what counts as a duplicate, and a duplicate rule decides what happens next: alert, block, or report. The Standard Lead Duplicate Rule is active by default and compares leads with other leads and with contacts.
- In the standard lead matching equation, email only counts together with first name and last name. Two leads with the same address and names that do not match closely are not flagged. A custom matching rule with Email set to Exact closes that gap.
- To find existing duplicates, put Show Unique Count on a Leads report's Email column, report on Duplicate Record Items (the rule's Report option must be on), or run a Duplicate Job (Performance and Unlimited only). You can merge up to three leads at a time, and a lead cannot be merged into a contact.
- One duplicate rule behaves differently by entry route. A web-to-lead match is blocked even when the rule is Allow with an alert. An API or Data Loader row that hits Allow with an alert fails with DUPLICATES_DETECTED unless the call sends allowSave=true.
- Salesforce's Spring '20 guide lists Quick Create, community self-registration, undelete, Lightning Sync, manual merges and lead conversion (unless Use Apex Lead Convert is on) as cases where duplicate rules do not run, so some duplicates will always need a report or a job.
Your Salesforce lead list has the same person two or three times, two reps are chasing the same prospect, and you want a way to find the copies you already have and stop the next ones.
To find duplicate leads in Salesforce, put Show Unique Count on the Email column of a Leads report to size the problem, then report on the Duplicate Record Items object or run a Duplicate Job to see which leads. To stop new ones, open Setup, search for Duplicate Rules, and set the Standard Lead Duplicate Rule to Block, or leave it on Allow with an alert if you want reps to decide. The standard matching rule misses some obvious duplicates, and the same duplicate rule treats the Lead screen, web-to-lead, imports and the API differently.
Salesforce’s Help site renders with JavaScript, so we read the Help articles and knowledge articles that loaded, plus the REST API, Metadata API and Object Reference PDFs (Winter ’27, version 68.0). The standard rule defaults and the matching equation come from Salesforce’s Manage Duplicate Records guide, Spring ’20 edition, last updated May 31, 2020, which is the newest copy we could read. Open the Standard Lead Matching Rule in your own org to confirm it before you rely on it. Everything was checked October 21, 2026.
How do you find duplicate leads in Salesforce?
You have four routes. One counts the problem, one checks a single lead, and two list the records involved.
| Route | Use it to | What it needs | Editions |
|---|---|---|---|
| Potential Duplicates component | Check the lead you have open | An active duplicate rule and the component on the Lead page | Essentials to Developer |
| Show Unique Count on a Leads report | Count how many leads share an email | A Leads report with an Email column | Lightning only, Essentials to Developer |
| Report on Duplicate Record Items | List every lead a rule has flagged | Report option ticked on the rule, a custom report type | Essentials to Developer |
| Duplicate Job | Scan every lead already in the org | Customize Application and View All Data | Performance and Unlimited |
| Verdict | Start with the unique count. It is quick and tells you whether the other three are worth setting up. |
Source: Salesforce Help (Count Unique Values in Report Results, Run Duplicate Jobs in Lightning Experience), Salesforce Manage Duplicate Records guide, Spring ’20, checked Oct 21, 2026. “Essentials to Developer” means Essentials, Professional, Enterprise, Performance, Unlimited and Developer; the unique count also lists Group.
Check one lead with Potential Duplicates
- In Setup, search Quick Find for Lightning App Builder and edit the Lead record page.
- Add the Potential Duplicates component and choose a card, a toast message, or both.
- Open any lead that matches another. The card lists the matches, and a user with merge permission can pick up to three records on the same object to merge.
When a rep creates a lead, Lightning Experience shows up to 15 duplicate records in the alert, and that list can include contacts because the standard rule compares leads with both.
Count duplicates with a unique count
- Open or create a Leads report in Lightning Experience and add the Email column. Filter out blank emails first, because Salesforce counts a blank value as one unique value.
- On the Email column, open the more actions menu and choose Show Unique Count, then save.
- Compare the number of records with the unique count. The gap is the number of leads that repeat an address someone else already has.
A report supports up to three unique counts, and the feature does not work on encrypted fields. It only sees exact email matches, so it will not catch the same person entered with two different addresses. It also cannot compare leads with contacts.
List every flagged lead with a Duplicate Record Items report
This route reports on leads that a duplicate rule has already caught, and it needs two settings first. The duplicate rule must have its Report option selected, because duplicate record sets are only created for rules that report. And the people building reports need access to the Duplicate Record Set and Duplicate Record Item objects.
- In Setup, search Quick Find for Report Types and create a new custom report type with Lead as the primary object. Creating one needs the Manage Custom Report Types permission.
- Relate Duplicate Record Items to Lead and save the report type.
- Give your users access to the two duplicate objects.
- Create a report from the new type. Group it by Duplicate Record Set name to see which leads belong together.
If you would rather see how well your rules work overall, make the report type with Duplicate Record Sets as the primary object instead. For each matching rule that runs, up to 100 duplicates can be placed in a set.
Scan the whole org with a Duplicate Job
- In Setup, search Quick Find for Duplicate Jobs and click New Job.
- Choose Lead as the object, pick a matching rule (an existing one or a new one), and run it. Salesforce emails you when the job finishes.
- Open the job summary, open a record set, go to the Related tab and choose Compare and Merge.
Duplicate Jobs are available in Performance and Unlimited Editions only. Salesforce’s guide says new jobs are blocked once all completed jobs together hold 1,000,000 duplicate record items, a job fails if a field in its matching rule is encrypted, and editing the matching rule afterwards deletes the earlier results without warning.
Why does Salesforce miss leads that share an email?
The standard lead matching rule only treats an email as a match when first name and last name match too. Salesforce publishes the equation. A pair of leads is a duplicate if any one of these groups matches:
(First Name AND Last Name AND Title AND Company)
OR (First Name AND Last Name AND Email)
OR (First Name AND Last Name AND Phone AND Company)
OR (First Name AND Last Name AND Mailing Street AND (City OR ZIP OR Phone))
OR (First Name AND Last Name AND Mailing Street AND Title)
OR (First Name AND Last Name AND Title AND Email)
OR (First Name AND Last Name AND Phone)
Every group that includes Email also includes first name and last name. Names are compared with fuzzy methods, so spelling variants often still match, but two leads with the same address and unrelated names do not. That can happen when an assistant fills in a form for a manager, or when two people share one mailbox.
Salesforce does not let you edit the standard matching rules, so the fix is a custom one:
- In Setup, search Quick Find for Matching Rules and click New Rule.
- Apply it to Lead, name it, and add one criterion: field Email, matching method Exact.
- Save and activate it. Activation can take a while, and Salesforce emails you when it is ready.
- Add the new rule to your lead duplicate rule (steps below), or create a second duplicate rule for it.
The Spring ’20 guide says a custom matching rule can hold up to 10 fields, an object can have up to five active matching rules, and an org can have up to 25 active in total. Expect shared addresses such as info@ or sales@ to flag unrelated people under an email-only rule. If that bites, a rule that needs both Email and Last Name to match is a middle ground.
Check which version of the standard rule you have, too. In orgs created in Summer ’17 or later, the Standard Lead Duplicate Rule compares leads with leads and with contacts. In older orgs it compares leads with leads only unless an admin activates the newer rule. Open Setup, then Duplicate Rules, then the Standard Lead Duplicate Rule, and look at the Matching Rules section.
What is the difference between matching rules and duplicate rules?
A matching rule is the equation, and a duplicate rule is the consequence. The matching rule compares fields on two records and says whether they match. The duplicate rule says when that comparison runs and what Salesforce does with a match.
Some limits and behaviours are worth knowing before you build anything:
- You can have up to five active duplicate rules per object, and up to three matching rules in each duplicate rule, one per object.
- If the first duplicate rule finds a match, later rules skip that record. Salesforce advises putting rules with Block ahead of rules with Allow. Reorder them from any rule’s detail page.
- On edit, a rule only runs when an edited field appears in its matching rule. Changing a custom field does nothing unless the matching rule includes it.
- When several records are saved in the same operation, they are compared with records already in Salesforce and not with each other.
- Viewing rules needs View Setup and Configuration. Creating, editing and activating them needs Customize Application.
How do you avoid duplicate leads in Salesforce?
Set the Standard Lead Duplicate Rule to alert or block, turn on reporting, and decide how it treats records the rep cannot see. It is active by default, so the work is changing its settings.
- In Setup, search Quick Find for Duplicate Rules and open the Standard Lead Duplicate Rule.
- In the Matching Rules section, confirm which matching rules it uses (Standard Lead Matching Rule, plus Standard Contact Matching Rule in newer orgs).
- Click Edit. Under Actions, set Action on Create to Allow (the rep sees an alert and can still save) or Block (the rep can view the duplicates but cannot save). Do the same for Action on Edit.
- Tick Report so every duplicate that gets saved lands in a duplicate record set.
- Choose Enforce sharing rules or Bypass sharing rules. Bypass makes the rule check every lead whatever its owner, so a rep cannot create a copy of a lead they cannot see. Salesforce still does not show that record to the rep.
- Add conditions if the rule should only run for certain users or countries. This is also where you exclude inbound sources (more on that below).
- Save and activate. Activation only succeeds if every matching rule attached to the rule is active.
The default alert text is “Use one of these records?” and you can change it. In our view, run Allow with Report for a few weeks first and read the duplicate report. Switch to Block once it shows few false positives, and add the Web-to-Lead exclusion described below at the same time, because a web-to-lead match is rejected even on Allow with an alert.
Where do duplicate leads come from, and which control stops each?
Each way a lead can arrive has its own duplicate behaviour, and several skip the Lead screen entirely.
| How the lead arrives | What the duplicate rule does | Control to set |
|---|---|---|
| Rep types or clones a lead | Alert on Allow, refuse the save on Block | Standard Lead Duplicate Rule, Potential Duplicates component |
| Quick Create, community self-registration, undelete, Lightning Sync, manual merge | Duplicate rules do not run | Unique count report or a Duplicate Job afterwards |
| Data Import Wizard | Salesforce lists import tools among the cases that override the alert setting, and a row that hits a rule on Allow with an alert can fail | Match on lead email in the wizard, clean the file first |
| Data Loader or any API client | Allow with an alert fails with DUPLICATES_DETECTED unless allowSave=true is sent. Block fails. Allow without the alert option saves | Dedupe the file, send allowSave only on purpose |
| Web-to-Lead | Match is blocked even on Allow with an alert | Exclude the Web-to-Lead user in the condition, or a separate Allow and Report rule |
| Lead conversion | Duplicate rules do not run unless Use Apex Lead Convert is enabled | Contact matching rule that compares first and last name |
| Leads already in the org | Rules only act on new or edited records | Duplicate Job, reports, merge |
| Verdict | The Lead screen is the easy case. Forms, files and integrations need their own decision. |
Source: Salesforce Manage Duplicate Records guide (Spring ’20), Metadata API Developer Guide DuplicateRule (v68.0), Salesforce knowledge articles on Web-to-Lead and Data Import Wizard duplicates, Data Loader Guide v68.0, checked Oct 21, 2026.
What happens to web-to-lead, Data Loader and API inserts?
They hit the same rule as a rep, but nobody is there to click through an alert, so the outcome depends on how the rule is set.
Web-to-Lead comes first, because it fails in front of the visitor. Salesforce’s knowledge article on the topic says a submission that matches a rule set to Block or to Allow with an alert is rejected, because Web-to-Lead is an automated process and cannot show the alert dialog. The submitter sees “Salesforce could not create this lead because of the reason listed below,” followed by “Reason: You’re creating a duplicate record. We recommend you use an existing record instead.” The article gives two fixes. You can add a condition that excludes the default Web-to-Lead creator user from the existing rule, so rep entries are still checked. Or you can build a second rule that runs only for that user, set to Allow and Report with no alert, so duplicates are created and logged. It also says some matches slip through when records are “dirty” or when matching records sit in the Recycle Bin, and the fix there is to empty the Recycle Bin and ask Salesforce Support for a Physical Delete job. For most forms we would pick the second fix and merge afterwards, since the alternative is a visitor seeing a raw Salesforce error.
Data Loader and other API clients follow the rule’s action. Salesforce’s Metadata API documentation says that with Action on Insert set to Allow, an API insert returns an error and a message when the rule has the alert option, and the code has to set allowSave to true in the duplicate rule header and send the request again. Without the alert option, the API saves the record and returns no error. With Block, the API returns an error and does not save. The error you see in Data Loader is DUPLICATES_DETECTED: Use one of these records?, where the text after the colon is the alert text from your rule. Salesforce’s knowledge article for that error suggests checking the active duplicate and matching rules, then comparing the file against existing records. A second article on blocked imports advises against switching the rules off. If you are installing the tool for this job, our Data Loader install guide covers setup, and the CRM import limits comparison lists file and row limits.
The REST header looks like this, per the REST API Developer Guide:
Sforce-Duplicate-Rule-Header: allowSave=true; includeRecordDetails=true; runAsCurrentUser=true
It is available from API version 52.0, and every field defaults to false. allowSave only matters when the rule has an alert. includeRecordDetails returns all fields of the duplicate instead of just its ID, and runAsCurrentUser applies the current user’s sharing rules when the rule runs. The SOAP equivalent is DuplicateRuleHeader, which applies to create(), update() and upsert(). Setting allowSave to true saves a duplicate on purpose, so use it for a reviewed file and not as a default.
How do you merge duplicate leads in Salesforce?
Merge them up to three at a time, from a lead with duplicates or from a duplicate record set. Salesforce’s merge() documentation says up to three records of the same type can be combined in one request, including the one you keep, and that the limit matches the user interface. The other records are deleted and their related records move to the lead you keep. To merge more than three, repeat the merge into the same lead.
From a duplicate record set, open the Related tab and choose Compare and Merge. That action exists in Lightning Experience only, and it needs Edit and Delete on leads. From a single lead, the Merge Duplicate Leads Help article describes selecting up to three leads, choosing the principal lead and the field values to keep, then confirming. We could not load that article, only a search summary of it, so check the button labels in your org.
Two limits matter. Leads merge with leads only, and a lead cannot be merged into a contact. Salesforce’s guidance for that case is to bring the contact record up to date, log the relevant activity there, then delete the lead or change its status. And duplicate rules do not run on a manual merge, so a merge will not trigger an alert.
Take a report export of the affected leads before a bulk clean-up, because a merge deletes the non-principal records. The CRM data cleaning guide covers how to prepare a lead list, and the Salesforce migration guide shows where dedupe fits in a larger move. If you also run HubSpot or Pipedrive, the same job there is covered in how to find and merge duplicate contacts in HubSpot and how to merge duplicates in Pipedrive.
What happens to duplicates when you convert a lead?
Salesforce offers an existing contact on the Convert screen only if your Contact matching rule finds one, and the lead’s data only fills empty fields on that contact. Salesforce’s convertLead() documentation says that when a lead is merged into an existing account, contact or opportunity, only empty fields on the target are overwritten and existing data stays put. The one exception is LeadSource on the contact, when overwriteLeadSource is set to true.
Two problems come up. First, the existing contact is not offered at all. Salesforce’s knowledge article on that symptom says it happens when the active Contact matching rule does not evaluate First Name or Last Name, and the fix is a Contact matching rule with Exact matching on both, plus a Contact duplicate rule that uses it, set to Bypass sharing rules and Block on create. Second, the duplicate rule never runs. The Spring ’20 guide lists lead conversion among the cases where duplicate rules do not run unless Use Apex Lead Convert is enabled. We could not confirm the current wording of that setting, so treat it as something to test in a sandbox before relying on it.
How do you confirm it worked?
Test every entry route separately, because passing on the Lead screen proves nothing about the others.
- In a sandbox, or with a clearly named test lead, create a second lead that matches an existing one by typing it in. On Allow you should see the alert with your alert text, and on Block you should be unable to save.
- Submit your web-to-lead form once with a matching address. Check whether you get the “Salesforce could not create this lead” error or a new lead, and compare that with what you intended.
- Load a one-row file through Data Loader and the Data Import Wizard. Note whether the row fails with
DUPLICATES_DETECTEDor saves. - In Setup, search Quick Find for Duplicate Error Logs. If the fuzzy match engine is unavailable, rules with fuzzy matching do not run, and that shows up here. Salesforce deletes these logs after 90 days.
- Re-run the unique count report after a week. If the gap is not shrinking, a source you have not tested is still adding leads.
- Empty the test leads from the Recycle Bin, because matching records sitting there can cause inconsistent blocking.
Why am I getting duplicate lead errors, and how do I fix them?
The table lists each symptom with the cause Salesforce documents for it.
| What you see | Cause | Fix |
|---|---|---|
DUPLICATES_DETECTED: Use one of these records? in Data Loader or an import |
An active duplicate rule matches a row in the file | Remove or correct the row, or reuse the existing record. Salesforce advises against deactivating the rule |
| “Reason: You’re creating a duplicate record” on a web form | Web-to-Lead cannot show the alert, so a match is blocked | Exclude the Web-to-Lead user in the rule’s condition, or add an Allow and Report rule for that user |
| Leads with the same email are not flagged | The standard equation needs matching names with the email | Custom matching rule with Email set to Exact |
| Convert screen does not offer the existing contact | The Contact matching rule does not compare first and last name | Custom exact name matching rule plus a Contact duplicate rule |
| Duplicate Jobs is missing from Setup | Duplicate Jobs is Performance and Unlimited only | Use the unique count and the Duplicate Record Items report |
| The duplicate report is empty | The rule’s Report option is off, or users lack access to the duplicate objects | Tick Report, grant access to Duplicate Record Set and Items |
| Rule does not fire after a field edit | A rule on edit only runs when an edited field is in its matching rule | Add the field to a custom matching rule |
| Blocking is inconsistent | Dirty records or matches in the Recycle Bin | Empty the Recycle Bin, then ask Salesforce Support for a Physical Delete |
Source: Salesforce knowledge articles (Web-to-Lead duplicate blocking, Use one of these records in Data Loader, lead conversion contact match), Manage Duplicate Records guide (Spring ’20), checked Oct 21, 2026.
Which Salesforce editions have duplicate management?
Duplicate rules, matching rules and duplicate record sets are available in Essentials, Professional, Enterprise, Performance, Unlimited and Developer Editions, in Lightning Experience and Salesforce Classic, though Salesforce adds that they are not available in all orgs. Duplicate Jobs are limited to Performance and Unlimited. The Merge Duplicate Leads overview page lists a wider set: Starter, Essentials, Group, Professional, Enterprise, Performance, Unlimited, Pro Suite and Developer, with Sales. If your edition is the constraint, the Salesforce pricing calculator is the place to price a move up, and the HubSpot vs Salesforce comparison covers pricing and fit if you are weighing a switch.
When should you bring in an expert?
A single admin turning on Block for the Lead screen needs no help. Bring someone in when duplicates arrive through several routes at once, such as web forms, ad platforms, a marketing tool and file loads, and each one needs a different rule. Bring someone in too when you need matching across leads, contacts and accounts with custom fields, when a duplicate rule is rejecting live web leads, or when you have tens of thousands of existing duplicates and an edition without Duplicate Jobs. Our Salesforce implementation service includes de-duplication, integrations and migration work, and you can book a call to scope it.
If your integrations are the source, the CRM API rate limits comparison and the CRM integrations guide explain how sync tools write to Salesforce.
Founder’s note, Alpit Patel. Duplicate rules only help if every entry route is covered. I’d list how leads arrive, from web forms, imports, the API and manual entry, and check that each route hits a rule before writing a single new one. I founded aibrevo in San Francisco in 2021, and through autoesta I have overseen 320+ GoHighLevel implementation projects across med spas, real estate, healthcare, dental, home services, SaaS and professional-services clients in the US, UK and UAE. About Alpit
Sources
- Salesforce, Manage Duplicate Records in Salesforce, Spring ’20 edition, last updated May 31, 2020, checked Oct 21, 2026.
- Salesforce, REST API Developer Guide, Duplicate Rule Header, version 68.0 (Winter ’27), checked Oct 21, 2026.
- Salesforce, Metadata API Developer Guide, DuplicateRule and MatchingRule, version 68.0, checked Oct 21, 2026.
- Salesforce, Object Reference for the Salesforce Platform, DuplicateRecordSet, DuplicateRecordItem and DuplicateRule, version 68.0, checked Oct 21, 2026.
- Salesforce, merge() and convertLead(), SOAP API reference, checked Oct 21, 2026.
- Salesforce, DuplicateRuleHeader, SOAP API reference, checked Oct 21, 2026.
- Salesforce knowledge article, Salesforce Duplicate Matching Rules Blocking Web-to-Lead Submissions, checked Oct 21, 2026.
- Salesforce knowledge article, Error ‘Use one of these records?’ in Data Loader, checked Oct 21, 2026.
- Salesforce knowledge article, Salesforce Says Duplicate Data Exists and Blocks My Data From Being Imported, checked Oct 21, 2026.
- Salesforce knowledge article, Not Able to Associate a Lead to an Existing Contact When a Lead is Converted, checked Oct 21, 2026.
- Salesforce knowledge article, Manage Duplicate Leads and Contacts in Salesforce, summary only, checked Oct 21, 2026.
- Salesforce Help, Stop Users from Creating Duplicate Records, Count Unique Values in Report Results and Run Duplicate Jobs in Lightning Experience, checked Oct 21, 2026.
- Salesforce, Data Loader Guide, version 68.0, checked Oct 21, 2026.