Set up Matching and Duplicate Rules in Salesforce
- To identify and analyze duplicates manually, you can activate a DQE manual deduplication rule that overrides the standard Salesforce Potential Duplicates component.
- To activate a manual deduplication rule, run a deduplication process on the object you want to analyze, such as Lead, Account, or Contact.
This generates the DQE custom fields. To create manual rules:
- In Setup, search for and select Matching Rules.
- Click New Rule, select the object, and click Next.
- Provide a free-form rule name, for example DQE Dedupe [Object] Rule.
- The unique name is generated automatically when you leave the field.
- In the Matching Criteria area, select the DQE Index Group ID field.
- In Matching Method, select Exact.
- Click Save.
- Activate the new Matching Rule on the main screen.
In Setup, search for and select Duplicate Rules.
- Click New Rule and select the object on which you created the Matching Rule.
- In the Rule Name field, enter a free-form name for the rule.
- Ignore the following fields: Action on Create, Action on Edit, and Compare [Object] With.
- In the Matching Rule field, select the matching rule you created previously.
- Click Add Rule.
Set up a list view button
Salesforce offers standard buttons for list views, including Mass Quick Actions. You can also create your own custom list view buttons and add them to list views when your button uses the List Button display type.
The following example describes how to add a Manual Merge or Manual Unmerge button to an Account list view.
From Setup, type Object Manager in Quick Find, or select it from the Setup menu.
- Select the Account object.
- Select Buttons, Links, and Actions.
- Select New Button or Link from the upper right.
Provide a label for your custom button, such as Manual Merge.
The Name field is populated automatically.
For Display Type, select List Button and enable Display Checkboxes (for Multi-Record Selection).
Set Behavior to Display in existing window with sidebar.
Set Content Source to URL.
In the Formula Editor:
- Set Select Field Type to Account and enter the following text for merge:
/flow/dqeone/manual_duplicate_flow- Set Select Field Type to Account and enter the following text for unmerge:
/flow/dqeone/manual_unmerge_duplicate_flowYour New Button or Link page should look like this:
- Save your custom button.
- From the Object Manager | Account page, select List View Button Layout from the left pane.
- On the right side, click the drop-down button and select Edit.
- Select or deselect the standard buttons to display on your list view.
In the Custom Buttons section, select your newly created custom button and use the arrow to move it to Selected Buttons.
- Save your Account list view.
After running a process for the selected object, Accounts in this example, you will see a Manual Merge button on the right side.
Merging duplicate records
Once the button is in place, select the records to merge on the list view and click Manual Merge. You'll go through three steps, one group of duplicates at a time (shown as "Potential Duplicate Records: Group n / total"):
- Select Records — a table lists the candidate duplicates with a checkbox each. The gear icon ("Edit Layout Field") lets you pick a rules set / mapping and choose which fields to compare. You need to check at least two records before you can continue.
- Select Values — a field-by-field comparison table. For each field, pick with a radio button which record's value should win; fields you can't edit are shown as plain text instead.
- Merge — a confirmation screen ("Confirm merge — We're ready to merge these records") with a warning that you're about to merge these records. Click Merge, then confirm again in the dialog that appears.
You can Skip a group instead of merging it. Once every group has been handled, you'll see a confirmation that all groups are merged.
You can also reach this same screen directly from a record: if DQE One finds potential duplicates for the record you're viewing, a small card shows "We found n potential duplicates for this Record" with a View Duplicates button that opens the same step-by-step flow for that record.
"Use Salesforce Default Merge" — read this before merging
On the Merge step, a checkbox labelled Use Salesforce Default Merge is available for Lead, Contact, Account and Case (it's not offered for other objects). This choice matters more than its wording suggests:
- Checked: Salesforce's own, native merge is used. The merged records are genuinely deleted. This is not reversible — the on-screen warning that you "can't undo merging" is accurate for this option.
- Unchecked (the default): DQE One reparents the duplicate records itself instead of using Salesforce's native merge. This keeps a record of what changed, which means it can be undone later using Manual Unmerge, described below.
If you might need to undo a merge later, leave this checkbox unchecked.
Undoing a merge (Unmerge)
Set up a Manual Unmerge button the same way as above (same steps, using /flow/dqeone/manual_unmerge_duplicate_flow instead). Click it on the list view to restore records merged through the non-default path above. You'll go through two steps, again one group at a time:
- Record Preview — a table shows, field by field, the current value next to the value it will revert to ("NEW VALUE" / "CURRENT VALUE").
- Unmerge — a confirmation screen ("Confirm unmerge — We're ready to unmerge this record") with a warning that you're about to unmerge this group. Click Unmerge, then confirm again in the dialog that appears.
Unmerge only works for merges done without "Use Salesforce Default Merge" — if that box was checked when the original merge was performed, Salesforce's native merge deleted the other records outright, and there is nothing left for Unmerge to restore.
Good to know
- You need at least two records selected to start a merge.
- "Use Salesforce Default Merge" is only available for Lead, Contact, Account and Case.
- Groups are handled one at a time; you can skip any group without merging or unmerging it.
Related to