Duplicate Rule
A Duplicate Rule is a configuration that defines what action to take when a duplicate record is detected based on a Matching Rule.
Definition
A Duplicate Rule is a configuration that defines what action to take when a duplicate record is detected based on a Matching Rule. It can block record creation/updates, allow with a warning, or alert specific users without preventing the action, providing flexible duplicate governance.
In plain English
βA Duplicate Rule decides what happens when Salesforce detects a possible duplicate based on a Matching Rule. You can block the user from creating it, let them create it but show a warning, or just quietly alert someone for follow-up.β
Worked example
The data steward at Jameson Diagnostics, a clinical-laboratory company, configures a Duplicate Rule that fires whenever the Matching Rule detects a possible duplicate Account. The Duplicate Rule sets the action to Allow with Warning - when a sales rep tries to create an Account that matches an existing one, they see a banner: "Possible duplicate found: Memorial Hospital - already owned by Sarah Chen." The rep can dismiss the warning and proceed (sometimes the same hospital genuinely has two billing offices), or click into the existing record. A second Duplicate Rule on Contact is set to Block - clinic contacts must be unique, no exceptions. The Duplicate Rule is what turns the Matching Rule from a passive flag into a workflow gate.
Why Duplicate Rule matters
A Duplicate Rule is a Salesforce configuration that defines what action to take when a duplicate record is detected by a Matching Rule. Duplicate Rules can block record creation or updates entirely, allow the user to proceed with a warning, or alert specific users without preventing the action. Each rule applies to a specific object and references one or more Matching Rules that define what 'duplicate' means for that object.
Choosing the right Duplicate Rule action depends on the business context. Block is the strictest option and works when data quality is paramount and false positives are rare. Allow with warning gives users awareness but lets them proceed if they're confident the record is genuinely new. Alert mode is the lightest touch, useful for monitoring without disrupting users. Many orgs use different rules for different objects or scenarios: strict blocking on high-value objects like Account, gentler warnings on objects with more legitimate near-duplicates.
How to set up Duplicate Rule
Duplicate Rules are how Salesforce stops or warns users about creating dupes β "this Lead already exists, are you sure?" They pair with Matching Rules (the engine that decides what counts as a match) to form the Duplicate Management feature. Activate the Matching Rule first; the Duplicate Rule is useless without one.
- First, activate a Matching Rule
Setup β Matching Rules β New. Pick the object, pick the matching fields, save and Activate. Without an active matching rule, the duplicate rule has nothing to call.
- Open Setup β Duplicate Rules β New Rule
Setup β Quick Find: Duplicate Rules β New Rule.
- Pick the object
Lead, Contact, Account, or any custom object that has an active matching rule.
- Set Rule Name and Description
Convention: "<object> Duplicates - <strict/soft>".
- Pick Action on Create / Edit
Allow with Alert: warn but let users override. Block: prevent save entirely. Most orgs do Allow with Alert on Lead and Contact, Block on Account.
- Configure Conditions (optional)
Limit which records the rule fires for β e.g. "only Leads with Status = New."
- Set Alert Text
What users see in the duplicate banner. Be specific β "Possible duplicate of {!MatchedRecord.Name}."
- Save β Activate
Inactive rules don't fire.
Allow with Alert / Block. Allow lets users override; Block prevents save.
Same options. Common to be more lenient on Edit than Create.
Plain text shown in the duplicate banner.
When ticked, matched duplicates are tracked in the DuplicateRecordSet object so you can build dedupe reports.
Limit which records the rule fires for. Saves you scoping in the matching rule itself.
- Block prevents save for everyone β including integrations and Apex DML. If your Web-to-Lead form starts failing after activating, the duplicate rule is probably blocking it. Use Allow with Alert + a duplicate report instead.
- The Matching Rule decides what counts as a match β without one active, the Duplicate Rule has nothing to do. Activate matching first, dupe rule second.
- Duplicate Rules apply per-object β Leads and Contacts each need their own rules even if you want the same logic across both.
How organizations use Duplicate Rule
Uses Block on their Account Duplicate Rule because Account duplicates would cause major reporting and reconciliation problems. Sales reps must select an existing Account or escalate to admins.
Configured Allow with Warning on Lead duplicates so reps see the warning but can still create new leads when they're confident it's a different person.
Uses Alert mode in some scenarios where they want visibility into potential duplicates without disrupting users. The alerts feed into a periodic data hygiene review.
Trust & references
Straight from the source - Salesforce's reference material on Duplicate Rule.
- Things to Know About Duplicate RulesSalesforce Help
Test your knowledge
Q1. What does a Duplicate Rule do?
Q2. What action modes do Duplicate Rules support?
Q3. When is Block the right action?
Discussion
Loading discussionβ¦