# 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.

- URL: https://dedupe.ly/knowledge-base/bulk-merge-salesforce-duplicates-with-merge-rules
- Section: knowledge-base
- Site index: https://dedupe.ly/llms.txt
- Any page: append `.md` to its URL for this plain-text form

---

Skip to content

## How to Bulk Merge Salesforce Duplicates With Your Own Merge Rules

By
[Gaby Salinas](https://www.linkedin.com/in/gbyslns)
Updated November 20, 2026
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.

### Before you start

- **Salesforce connected and synced.** See [Connect your CRM](https://dedupe.ly/knowledge-base/connect-your-crm). Dedupely works with every Salesforce edition, including Essentials and Professional.
- **The right permissions:** a System Administrator profile, or a role with Modify All Data, or Edit and Delete on the objects you want to dedupe.
- **A Sandbox, if your org is heavily customized.** Connect it first to see how merges affect your Flows, Apex triggers and integrations. Sandbox records count toward your plan's record limit.

### 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](https://dedupe.ly/knowledge-base/choose-which-record-is-kept-when-merging).

### 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](https://dedupe.ly/knowledge-base/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](https://dedupe.ly/knowledge-base/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

[How to Find and Mass Merge Duplicates in Salesforce How Dedupely works with Salesforce, object by object.](https://dedupe.ly/knowledge-base/salesforce-deduplication-guide)

### Still stuck?

Our team helps on every plan and during the free trial, by chat, email or Zoom.
- Need help? [Talk to support](https://dedupe.ly/contact)
- Questions about plans? [Book a Zoom with sales](https://meetings.dedupe.ly/meetings/gaby-salinas/kb-zoom-scheduler)
- Reading this with a model? [Read this page as Markdown](https://dedupe.ly/knowledge-base/bulk-merge-salesforce-duplicates-with-merge-rules.md)
- Feeding it the whole site? [Read llms.txt](https://dedupe.ly/llms.txt)
Behind the article

### Gaby Salinas

Marketing Assistant at Dedupely
Gaby Salinas came to CRM data from marketing and advertising, so she looks at duplicates from two sides: the match and merge logic behind them, and what they do to the people using the CRM, like the rep who calls a customer twice, the admin who gets blamed and the cleanup nobody wants to start.
As Marketing Assistant at Dedupely, she follows how RevOps teams, end users, consultants and technical teams actually work with their data: the records they stop trusting, the workarounds they build and the moment they finally decide to clean up. What she finds shapes most of what Dedupely publishes.
[Connect with Gaby on LinkedIn](https://www.linkedin.com/in/gbyslns)

### Get started for free

20 free trial merges and as much free support as you need to get your duplicates under control.
[Try for free](https://v2.app.dedupe.ly/signup) [Talk to sales](https://meetings.dedupe.ly/meetings/gaby-salinas/talk-to-sales)
[Or sign up with Google](https://v2.app.dedupe.ly/signup/google)
Running CRM cleanup for clients? [See the Partner Program](https://dedupe.ly/become-a-partner)
