Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Duplicate Management entry
How-to guide

Set up Duplicate Management on a new object

Setting up Duplicate Management for a new object means three things in order: define how records should be compared, decide what to do when a match is found, and build the steward workflow to triage logs. The standard Account, Contact, and Lead rules ship pre-configured, but custom objects need every step.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 19, 2026

Setting up Duplicate Management for a new object means three things in order: define how records should be compared, decide what to do when a match is found, and build the steward workflow to triage logs. The standard Account, Contact, and Lead rules ship pre-configured, but custom objects need every step.

  1. Decide what makes a duplicate

    Before opening Setup, list the fields that uniquely identify a record (Email, Phone + Account Name, Tax ID). Decide which require exact matches and which can tolerate fuzzy comparison.

  2. Create the Matching Rule

    Setup > Matching Rules > New. Select the object, define match criteria field by field, set the matching method per field, and save. The rule takes a few minutes to activate.

  3. Create the Duplicate Rule

    Setup > Duplicate Rules > New. Reference the Matching Rule, choose actions for Create and Edit (Block, Allow with alert, Allow with report), and define any user or record-type filters.

  4. Test in a sandbox

    Insert known duplicates manually and via API to confirm the rule fires as expected. Test with Bypass Sharing Rules on and off; the behavior differs by user permission.

  5. Run a baseline Duplicate Job

    Setup > Duplicate Jobs > New. Select the Matching Rule and run a one-time job against existing data. This builds the initial backlog of duplicates already in the org.

  6. Add the Potential Duplicates component

    On the Lightning record page, drop the Potential Duplicates component on the right rail. End users will see matches on every record they open, which catches duplicates that the steward queue might miss.

  7. Build the steward queue

    Pin the Duplicate Record Sets tab to the data-quality team's nav. Build a report joining DuplicateRecordSet to DuplicateRecordItem, scheduled weekly, grouped by rule and created date.

Blockremember

Save fails unless user has Manage Duplicates permission. Use for high-stakes objects like Accounts where a duplicate creates real downstream pain.

Allow with alertremember

User sees the warning but can override. The middle-ground option, fits most B2B Contact and Lead use cases.

Allow with reportremember

Saves silently and logs for later review. Use for high-volume inbound where stopping users would hurt conversion.

Bypass Sharing Rulesremember

Matching Rule setting that lets the engine compare against records the running user cannot see. Required for cross-team dedup.

Cross-object Matchingremember

Match Leads to Contacts or Accounts. Catches duplicates that single-object rules miss.

Gotchas
  • Apex insert() bypasses Duplicate Rules unless the code explicitly sets DMLOptions.DuplicateRuleHeader.allowSave. Any integration code written before this was understood is probably bypassing your rules silently.
  • Each object caps at 5 active Duplicate Rules and 5 Matching Rules. Plan rule design tightly; overlapping rules create noise and confuse stewards.
  • Matching Rule activation takes several minutes and queues other operations on the rule. Plan rule changes for low-traffic hours.
  • Duplicate Jobs only run on Account, Contact, Lead, and custom objects with an active Matching Rule. They do not work for Opportunity, Case, or other standard objects.
  • Bypass Sharing Rules can surface matches the user cannot then merge or view. Use it for steward profiles, not standard sales users.

See the full Duplicate Management entry

Duplicate Management includes the definition, worked example, deep dive, related terms, and a quiz.