How to Bulk Merge Salesforce Duplicates With Your Own Merge Rules
Decide which Salesforce record is kept and which values win, then merge thousands of Accounts, Contacts or Leads in one action.
Salesforce's own merge handles 3 records at a time, by hand, and you pick the master record and its values each time. Dedupely bulk merges Salesforce duplicates with configurable Merge Rules: you set once which record is the master record (oldest, newest, last updated, most complete, or your own rule) and which value wins in each field, then merge a whole search in one action. This playbook shows how to set up those rules for Accounts, Contacts and Leads, test them, and bulk merge safely.
What Dedupely merges in Salesforce
Dedupely merges Accounts, Contacts, Leads and custom objects, one object at a time: Accounts with Accounts, Leads with Leads. A Lead can't be merged into a Contact. Person Accounts are left out, because Salesforce won't merge one with a business account.
When records merge, Salesforce's own merge runs:
- The master record keeps its ID. In Dedupely, the master record is the Primary Record.
- Child records move to it: Opportunities, Tasks, Cases, Notes and custom related lists are reparented to the master record.
- The other records go to the Recycle Bin for 15 days before Salesforce deletes them permanently.
- Flows and Apex triggers run as usual, because merges fire standard Salesforce events.
Step 1: Choose which record is kept
- Go to Merge Rules and pick the Record Type, like Accounts.
- Under the Primary Record, choose how the master record is picked: Oldest Record (the default), Newest Record, Last Updated Record, Most Field Data, or Custom.
- For Custom, add Win and Lose Rules. For example:
- The customer account wins: a Win Rule, When field Type, contains Customer.
- The account with an ERP or billing ID wins: a Win Rule, When field ERP Customer Number (or your own ID field), is not blank.
- The account with a website wins: a Win Rule, When field Website, is not blank.
- An inactive account never wins: a Lose Rule on your own status field, like Account Status is equal to Inactive.
- Click Save.
Lose Rules run first, then Win Rules from top to bottom. The first Win Rule a record passes decides. See How to Choose Which Record Is Kept When You Merge Duplicates.
Step 2: Choose which value wins in each field
The master record gives its value to every field that has no rule of its own. Set rules for the fields that matter:
- Email, phone and name fields: Primary or best keeps the master record's value unless it's unusable, like a placeholder phone number. Best email or Best phone keeps the strongest value of any record.
- Owner fields: Primary or active keeps the master record's owner when that user is active in Salesforce.
- Any other field: Custom, with its own Win and Lose Rules, like "keep the newest phone number": Win Rule, When field Created Date, is newest.
Dedupely also suggests rules for fields it recognizes, like phone, name, address, owner and lead status fields. Click Apply on a suggestion, check it, and save. Blank fields never overwrite existing data.
To use a rule in only one search, choose that search under In Duplicate Search when you build it.
Step 3: Set your Safety Settings
Salesforce refuses some merges. Dedupely predicts them before merging, and your Merge choices in Safety Settings decide what happens:
- Records point at each other. Salesforce lets you merge a child account into its parent, but not the other way around: it refuses the merge when the record that's kept is the child and the one merged away is its parent, or an account higher up. Dedupely predicts which record is kept and only asks in that case. Merge and drop the circular link removes that link so the merge goes through. The same applies to Contacts (Reports To) and to any custom lookup that points to the same object.
- Picklist values that no longer exist. A record holds a picklist value that's since been removed in Salesforce, so it can't be written back. Merge and leave that field out merges the records without that field's value.
For each, choose Always ask (the default), the fix Dedupely offers, or Skip. A skipped match stays unmerged in the Attention Required tab, with the reason and a button to merge it later. Auto Merge can't ask, so it skips matches set to Always ask or Skip, and merges the ones set to the fix. When a parent account is merged into another account, its child accounts move to the account that's kept.
Matches with more than 20 records are set aside in the Excluded tab by default, so you can check them first.
Step 4: Test your rules before you merge
- Open the Merge Preview tab at the bottom of the Merge Rules page. It shows real matches with your rules, including changes you haven't saved yet. The master record is labeled Primary, and the winning values are in bold.
- In your Duplicate Search, open View Match Details on a few matches to see the final record.
- Run two or three Single Merges, then check the master record in Salesforce: its values, its child records, and any Flows that ran.
Step 5: Bulk merge
- Select the matches you've checked, a whole page, or every match in the search, and merge them. Over 50 matches, you can get a browser alert when the merge is done.
- Send matches you're unsure about to Manual Review, and Reject the ones that aren't duplicates, so they don't come back.
- Once the search has run without false matches, turn on Auto Merge to merge new duplicates on a schedule, with the same Merge Rules.
Every merge is logged in Merge History with the original values.
Example setup
A B2B company has 12,000 duplicate Accounts after importing a trade show list into Salesforce.
- Search: Account Name with Similar Words (Any Order) and Ignored Terms Inc., LLC and Ltd. · Website with Domain Root · Billing Country with Exact.
- Primary Record: Custom. Win Rules, in this order: Type contains Customer; ERP Customer Number is not blank. Lose Rule: Account Status is equal to Inactive.
- Fields: Phone on Primary or best, Account Owner on Primary or active, and the suggested rules applied to the address fields.
- Merge choices: Records point at each other on Merge and drop the circular link, so Auto Merge can merge those matches too.
- Test: ten matches checked in the Merge Preview tab, three Single Merges checked in Salesforce. Then a bulk merge, a page at a time, and Auto Merge once the search runs clean.
What happens next
- Your rules apply to every merge from then on, including Auto Merge and Dedupely Intelligence.
- Keep Salesforce's Duplicate Rules on. They alert or block when someone creates a matching record, and Dedupely handles the duplicates that get through.
- Treat every merge as permanent. A merge of records that weren't duplicates can be undone for 30 days from Merge History, with some exceptions. See Undo a Merge.
Common mistakes
- Keeping the oldest record as master by default. In many orgs, the record your team works in isn't the oldest. Set a Custom rule and check it in the Merge Preview tab.
- Forgetting Flows and Apex triggers. Merges fire standard events. Check any Flow or trigger that listens for merges or deletes, and test in a Sandbox first.
- Merging branches your team tracks separately. A parent and its subsidiaries can share a name and domain. Add a location field set to Exact, or reject the matches you want to keep apart.
- Merging a Lead into a Contact. Records merge within one object. Clean Leads and Contacts in their own searches.
FAQs about bulk merging in Salesforce
- How do I bulk merge duplicates in Salesforce? Connect Salesforce to Dedupely, set Merge Rules for the object, test a few matches in the Merge Preview tab, then merge a page or the whole search in one action.
- Can I choose the master record when bulk merging? Yes. Pick Oldest, Newest, Last Updated, Most Field Data, or Custom with your own Win and Lose Rules.
- How many records can Dedupely merge at once? Thousands of matches in one action, and a match can hold more than 3 records. Matches with more than 20 records are set aside for review by default.
- What happens to the records that aren't kept? Salesforce moves them to the Recycle Bin for 15 days. Their child records move to the master record.
- Do Flows and Apex triggers run when Dedupely merges? Yes. Merges fire standard Salesforce events.
- Can I merge a child account into its parent? Yes. Salesforce only refuses the reverse, when the child would be kept and its parent merged away. Dedupely asks first, and Merge and drop the circular link removes that link so the merge goes through.
- Can I merge Opportunities? No. Dedupely merges Accounts, Contacts, Leads and custom objects in Salesforce.
Next up
Still stuck?
Our team helps on every plan and during the free trial, by chat, email or Zoom.
- Need help? Talk to support
- Questions about plans? Book a Zoom with sales
- Reading this with a model? Read this page as Markdown
- Feeding it the whole site? Read llms.txt




HubSpot Marketplace