On this page
- How many duplicates do I have?
- What do matching rules and duplicate rules do, and what do they miss?
- How do I merge duplicates safely?
- How do I clean up duplicates in bulk without breaking reports and automations?
- Is it safe to let an AI tool merge records?
- How do I stop new duplicates from coming in?
- Sources
- Common questions about Salesforce duplicate records cleanup
Salesforce duplicate records cleanup takes five steps. Measure the duplicates, agree which record wins, back up, merge in small batches, then turn on duplicate rules. Salesforce merges at most 3 records at a time.
Clientell AI, the AI Salesforce admin, finds duplicate groups across Leads, Contacts and Accounts, shows the merge it would make, and runs it after you approve. Try the Clientell AI data cleaning tool or run the free, read-only data quality audit first.
How many duplicates do I have?
Count before you clean. Pick a few keys per object and record the duplicate rate. Then you can show progress later (Abstrakt, 25-09-2026).
Swipe sideways to see all columns
| Object | Keys to group by | Why |
|---|---|---|
| Lead | Lead.Email | Imports and web forms create the most Lead duplicates. |
| Contact | Contact.Email plus Contact.AccountId | One person can sit under two Accounts. |
| Account | Cleaned Account.Name plus the domain in Account.Website | "Acme Inc" and "ACME, Inc." should match. |
The duplicate rate is the share of active records that have at least one likely match. For example, if one in seven active Contacts has a match, your Contact duplicate rate is one in seven.
Track the rate per object and per LeadSource value (web form, import, integration). Then you see which door lets the duplicates in.
SOQL (Salesforce Object Query Language, the query language for Salesforce data) finds Contact groups in one query. Run it in the Developer Console:
SELECT Email, COUNT(Id) FROM Contact WHERE Email LIKE '%@%' GROUP BY Email HAVING COUNT(Id) > 1
You can do the same with a report. Group Leads by Email Address and look for imports or campaigns with many matches (Cloudingo, 10-06-2026).
What do matching rules and duplicate rules do, and what do they miss?
A matching rule decides what counts as a duplicate. A duplicate rule decides what happens next: block the save, alert the user, or log it in a report (Salesforce Help). You pair them. Build them at Setup > Data > Duplicate Management > Matching Rules, then Setup > Data > Duplicate Management > Duplicate Rules.
The limits are small. One duplicate rule holds up to 3 matching rules. An object can have up to 5 active matching rules (Trailhead).
Standard matching rules ship for Leads, Contacts and Accounts. They catch exact and close matches. They miss mixed formats, such as a Phone value with dashes against the same number with none.
Swipe sideways to see all columns
| Tool | What it does | What it misses |
|---|---|---|
| Duplicate rule | Warns or blocks when someone creates or edits a record | It does not clean records already in the org. |
| Duplicate Job | Scans existing records and builds DuplicateRecordSet groups | It needs Performance or Unlimited Edition. |
| Compare and Merge | Shows the records side by side so you pick field values | It handles 3 records per merge. |
| Data Import Wizard | Matches on Salesforce ID, Name or Email during an import | Data Loader has no built-in matching, so active rules fire per record. |
Duplicate Jobs run only on Performance and Unlimited Edition (Dedupely, 19-08-2026). There, open Setup > Data > Duplicate Management > Duplicate Jobs, pick one matching rule, and run the job. Each result is a DuplicateRecordSet with one DuplicateRecordItem per record. Read more about imports in Data Loader vs Data Import Wizard.
How do I merge duplicates safely?
A merge keeps one master record. Salesforce moves related records to it and sends the others to the Recycle Bin (Salesforce Help: Recover merged contacts). The master's Contact History then shows a "Contact Merged" entry.
Restoring a loser from the Recycle Bin does not undo the merge. The master keeps the merged values. So set the rules before the first merge.
- Pick the winner rule. Use the record with the latest activity, the most filled fields, or open Opportunities.
- Back up. Export the affected records and their related records to CSV with Data Loader.
- Merge Accounts first. Their Contacts, Opportunities and Cases move to the master Account.
- Merge Contacts next, then Leads. Marketing history then stays with the right person.
- Check the result. Open three merged masters. Each should show the related lists of all merged records, and the field values you picked.
- Update integrations. Point every connected system at the master record ID.
Then set a rule for each key field, such as Phone, OwnerId and MailingAddress. The best value often sits on the losing record.
Swipe sideways to see all columns
| Field type | Rule that usually works | Example |
|---|---|---|
| Contact details | Most recently verified value | A phone number a rep confirmed last month beats an old import. |
| Ownership | Owner of the record with open Opportunities | The owner of a live deal keeps the Account. |
| Descriptive fields | Most complete value | A full street address beats a city. |
| Consent and opt-out | Most restrictive value | If either record has HasOptedOutOfEmail checked, the master keeps it checked. |
| External IDs | Keep every ID | Both billing IDs stay, so the finance sync still works. |
If a merge goes wrong, you have two paths. Restore the losing record from the Recycle Bin within 15 days (Salesforce Help: Extended Recycle Bin retention). Then fix the master's fields from your CSV backup. That is why step 2 comes before step 3.
How do I clean up duplicates in bulk without breaking reports and automations?
The cap of 3 records hurts at scale. Five hundred duplicate pairs mean five hundred merges, each with field choices. A script or a data quality tool with a review step is safer than hand merges. In Apex, the merge statement also takes a master and up to two other records (Apex Developer Guide: Merging records).
Check four things before any bulk merge:
- Flows and Apex triggers that run on delete. A merge deletes the losing records, so delete logic fires.
- Reports and list views filtered on a record ID. The losing IDs disappear.
- Integrations that store a losing record's Salesforce ID. They must switch to the master ID.
- Validation rules that could reject the master once it takes new field values.
Run the first batch in a sandbox with a copy of the object. Compare record counts before and after. Run a small batch in production next. If the counts match, run the rest.
Is it safe to let an AI tool merge records?
Clientell AI starts with a read-only scan and tests changes in a sandbox first. You approve every change, and it asks before it changes anything in production.
Clientell Platform deployments can roll back. See how Clientell AI keeps your org safe.
Try it in Clientell AI: "Find duplicate Contacts by email and account. Show each group with the master I should keep. Wait for my approval before you merge."
How do I stop new duplicates from coming in?
Cleanup without prevention only buys a few months. These four controls stop new duplicates on Lead, Contact and Account:
- Start duplicate rules in alert mode, not block mode. Rules that block good records teach users to work around them.
- Make integrations upsert on an external ID. An upsert updates the match instead of adding a new record.
- Turn on matching in the Data Import Wizard. It can match on Salesforce ID, Name or Email.
- Run the duplicate report on the same day each month, with the same keys.
Duplicates now cost more than messy reports. When an AI agent or a flow acts on a duplicate, the action lands on the wrong customer. Clean data is the first item on an AI readiness list. Start with the free data quality audit, or start the 14-day trial, no card needed. Clientell MCP is $249 a month and Clientell Platform is $500 a month. See pricing.
Common questions about Salesforce duplicate records cleanup
Can I undo a Salesforce merge?
Not fully. The losing records sit in the Recycle Bin for 15 days, and you can restore them (Salesforce Help). The master record keeps the merged values, so fix it from your CSV backup.
How many records can I merge at once?
Up to 3 records of the same object per merge. This holds in the UI and in the Apex merge statement.
Do Duplicate Jobs work in Enterprise Edition?
No. Duplicate Jobs need Performance or Unlimited Edition. Matching rules and duplicate rules still work on Professional and Enterprise Edition.
Should I block duplicates or just warn?
Warn first, with the duplicate rule action set to Allow plus Alert and Report. Review the DuplicateRecordSet records it logs, then switch to Block once the matches prove accurate.
Should I merge Leads or Accounts first?
Accounts first, then Contacts. Leads go last.
Sources
Salesforce documentation
- Managing duplicate records
- Recover merged Salesforce contacts
- Enable extended Recycle Bin retention
- Apex Developer Guide: Merging records
- Trailhead: Duplicate management
Industry research
- Abstrakt: Salesforce duplicate data cleanup
- Cloudingo: Salesforce deduplication in 2026
- Dedupely: Where native Salesforce dedupe tools stop
Last reviewed October 2026
Last updated: October 22, 2026



