To clean up duplicate data in Salesforce, measure the problem first, agree on which record wins when two match, merge in batches starting with the highest-value objects, and then turn on duplicate and matching rules so new duplicates are blocked or flagged at entry. Cleanup without prevention only buys a few months.
Where duplicates come from
- Data imports and migrations that did not check for existing records.
- Integrations that create a new record instead of updating an existing one.
- Web forms and marketing tools creating leads for people who are already contacts.
- Users creating records because searching felt slower than typing.
- Inconsistent formats: company names with and without suffixes, phone and email variations.
Measure before you merge
Run duplicate reports on accounts, contacts and leads using a few simple keys, such as email address, normalized company name and website domain. Record the duplicate rate for each object so you can show progress and catch regressions later.
Merge safely
| Step | What to do | Why |
|---|---|---|
| 1. Decide survivorship | Agree which record wins: most recent activity, most complete, or linked to open opportunities | Prevents arguments and lost data mid-merge |
| 2. Back up | Export affected records and related data | Merges cannot be undone |
| 3. Accounts first | Merge duplicate accounts, then their contacts | Contacts and opportunities follow the account |
| 4. Leads last | Convert or merge leads that match existing contacts | Keeps marketing history attached to the right person |
| 5. Check integrations | Confirm connected systems point at the surviving record | Stops the integration from recreating the duplicate |
Salesforce’s standard merge tools handle small batches well. For large volumes, a data-quality tool or a scripted merge with a review step is safer than doing thousands of merges by hand.
Stop them coming back
- Matching rules define what counts as a duplicate for each object.
- Duplicate rules decide whether to block the save or allow it with an alert.
- Validation rules and picklists enforce consistent formats for key fields.
- Integrations should upsert on an external ID rather than insert blindly.
- A monthly duplicate report keeps the rate visible.
Cleanup is often part of a larger project. A demand-generation firm we worked with restored reliable Salesforce and Pardot sync across 145,000+ prospects, and a medical-device company removed 970+ invalid records to get its prospect count back under its license limit.
How do you calculate a duplicate rate?
Divide the number of records that have at least one likely match by the total active records on that object. Track it per object and per source, so you can see which door the duplicates walk through.
- Count only active records, or old archived data will distort the number.
- Tag each record’s source, such as a form, an import, an integration or a user.
- Report the rate on the same date each month, using the same matching keys.
- Break it down by owner or team to find habits worth coaching.
Which value wins when two records are merged?
Choosing the surviving record is only half the decision. You also need rules for each important field, because the best value is often on the losing record.
| Field type | Rule that usually works | Example |
|---|---|---|
| Contact details | Most recently verified value | A phone number confirmed by a rep last month beats an older import |
| Ownership | Owner of the record with open opportunities | The account owner managing a live deal keeps it |
| Descriptive fields | Most complete value | A full street address beats a city on its own |
| Consent and opt-out | Most restrictive value | If either record opted out, the merged record stays opted out |
| System and external IDs | Keep every ID, in separate fields if needed | Both billing IDs are stored so the finance sync still works |
How should matching and duplicate rules be tuned?
Start by alerting rather than blocking, then tighten once the matches prove accurate. Rules that block good records teach users to work around them.
- Run new rules in report-only mode first and review a sample of the matches they flag.
- Use fuzzy matching on names and exact matching on email and website domain.
- Set different actions for users and integrations; an integration cannot respond to an alert.
- Review false positives with the teams who enter data, then adjust the rule.
- Revisit the rules whenever a new form, import source or integration goes live.
How do integrations avoid creating duplicates?
Every connected system should store a unique key from the other side and update on that key. Salesforce calls this an upsert on an external ID field.
- Create an external ID field for each source system and mark it unique.
- Backfill the field on existing records before switching the integration to upsert.
- Log records the integration could not match, and have a person review them each week.
- Make sure marketing tools search for existing contacts before creating new leads.

