PatronManager Help

How to Set Up Duplicate Management for Accounts & Contacts

Updated on

Use this link to share with your colleagues:

How to Set Up Duplicate Management for Accounts & Contacts: https://help.pm.leapevent.tech/a/1394860

Out of the box, Salesforce's Duplicate Management system is not compatible with PatronManager. However, we've done a bunch of testing and found that, if set up correctly, it can play nicely.

Once you've set this up, Salesforce will check new and newly-edited Accounts and Contacts for potential duplicates. You'll find those duplicates via reports, and then merge them (without having to switch back to Classic).

In this article, we'll:

  1. Set up our Account matching rules
  2. Set up our Contact matching rules
  3. Set up our Account duplicate rules
  4. Set up our Contact duplicate rules
  5. Create some duplicate-finding report record types
  6. Build our duplicate reports and subscribe
  7. Remove the Lightning Component from page layouts

We've also collected some FAQs at the end.

Once you complete these steps, you can get your merge on. The setup should take about two hours, so let's go!

This is a Lightning-only feature! If you haven't already, make sure to transition to Lightning today!

Warning!

If Duplicate Management is set up improperly, it can and will break PatronManager. Follow these instructions exactly.

1. Set up our Account Matching rules

The first thing we need to do is tell the system how to identify potential matches - that is, what things in common between different Accounts raise a red flag?

We're going to activate one rule and set up another:

  • One is a magic, standard Salesforce rule they already built for us
  • Then we'll build a rule to find potential matches based on fuzzier criteria, to allow for slight misspellings and typos
Let's match those Accounts

1.1. Go to Setup

1.2. Search for and click on Matching Rules

1.3. Click "Activate" next to the Standard Account Matching Rule

Warning: do not activate the Standard Contact Matching Rule!

1.4. Click OK in the pop-up

1.5. Now create a New Rule

1.6. Choose Account and click Next

1.7. Fill out the form as follows:

  1. Rule Name: Fuzzy Account Match
  2. Description: Fuzzier matching criteria than the default Account Matching Rule
  3. Criteria:
    • Account Name -- Fuzzy -- leave "Match blank" unchecked
    • Billing Street -- Fuzzy -- leave "Match blank" unchecked
    • Phone -- Exact -- check "Match blank"
  4. Click Save

1.8. Click Activate

1.9. Click OK in the pop-up

2. Set up our Contact Matching rules

Now let's tell the system how to identify potential duplicate Contacts - that is, what things need to be in common between different Contacts to raise a red flag?

We're going to set up two rules:

  • One that detects potential matches inside the same Account
  • One that detects potential matches across Accounts based on email address
Let's match those Contacts

2.1. If you're not already there, go to Setup, then search and click on Matching Rules

2.2. Click New Rule

Warning: do not activate the Standard Contact Matching Rule!

2.3. Choose Contact and click Next

2.4. Fill out the form as follows:

  1. Name: Duplicate Contacts within Account
  2. Description: Finds duplicate Contacts that share the same Account Name
  3. Criteria:
    • Account Name -- Exact -- leave "Match blank" unchecked
    • First Name -- Fuzzy -- leave "Match blank" unchecked
    • Last Name -- Fuzzy -- leave "Match blank" unchecked
  4. Click Save

2.5. Click Activate

2.6. Click OK in the pop-up

2.7. Click Matching Rules in the Setup sidebar

2.8. Click New Rule

Warning: do not activate the Standard Contact Matching Rule!

2.9. Choose Contact and click Next

2.10. Fill out the form as follows:

  1. Name: Duplicate Email Check
  2. Description: Used to find Contacts with the same email address across multiple Accounts, without interfering with PatronManager functionality. Note: you must only merge Contacts within the same Account!
  3. Criteria:
    • Email -- Exact -- leave "Match blank" unchecked
    • Signup Status -- Exact -- leave "Match blank" unchecked
  4. Click Save

2.11. Click Activate

2.12. Click OK in the pop-up

3. Set up our Account duplicate rules

While the matching rules we just set up tell the system how to identify potential duplicates, we still need to tell the system when to identify duplicates.

We'll set up two rules:

  • One to use the Fuzzy Account Matching rule we set up
  • One to use the Standard Account Matching rule we activated
Get those Account duplicates

3.1. In Setup, search and click on Duplicate Rules

3.2. Click the New Rule drop-down and click Account

3.3. Fill in the form as follows:

  1. Rule Name: Fuzzy Account Duplicate Rule
  2. Description: Allows finding and merging duplicate Accounts without interfering with PatronManager functionality
  3. Record-level security: enforce sharing rules
  4. Actions:
    • On create: Allow -- leave "Alert" unchecked -- check "Report"
    • On edit: Allow -- leave "Alert" unchecked -- check "Report"
  5. Compare Accounts with: Accounts
  6. Matching rule: Fuzzy Account Match
  7. Conditions:
    • Account: Account Record Type -- not equal to -- To Be Qualified
      • Use the magnifying glass to select To Be Qualified
  8. Click Save

3.4. Click Activate

3.5. Click Duplicate Rules in the Setup menu

3.6. Click the New Rule drop-down again and click Account

3.7. Fill in the form as follows:

  1. Rule Name: Standard Account Duplicate Rule
  2. Description: Allows finding and merging duplicate Accounts without interfering with PatronManager functionality
  3. Record-level security: enforce sharing rules
  4. Actions:
    • On create: Allow -- leave "Alert" unchecked -- check "Report"
    • On edit: Allow -- leave "Alert" unchecked -- check "Report"
  5. Compare Accounts with: Accounts
  6. Matching rule: Standard Account Matching Rule
  7. Conditions:
    • Account: Account Record Type -- not equal to -- To Be Qualified
      • Use the magnifying glass to select To Be Qualified
  8. Click Save

3.8. Click Activate

4. Set up our Contact duplicate rules

Now that we have our Account duplicate rules, we need to set up our Contact duplicate rules.

We'll set up two rules:

  • One to use the Contacts within Account rule we set up
  • One to use the Duplicate Email rule we set up
Get those Contact duplicates

4.1. If you're not already there, go to Setup, then search and click Duplicate Rules

4.2. Click the New Rule drop-down...

4.3. ...and then scroll down and click Contact

4.4. Fill in the form as follows:

  1. Rule Name: Contacts within Account
  2. Description: Allows merging Contacts that share an Account Name. Be sure to merge duplicate Accounts first
  3. Record-level security: enforce sharing rules
  4. Actions:
    • On create: Allow -- leave "Alert" unchecked -- check "Report"
    • On edit: Allow -- leave "Alert" unchecked -- check "Report"
  5. Compare Contacts with: Contacts
  6. Matching rule: Duplicate Contacts within Account
  7. Conditions:
    • Contact: Contact Record Type -- not equal to -- To Be Qualified
      • Use the magnifying glass to select To Be Qualified
  8. Click Save

4.5. Click Activate

4.6. Click Duplicate Rules in the Setup menu one more time

4.7. Click the New Rule drop-down again, scroll down, and click Contact

4.8. Fill in the form as follows:

  1. Rule Name: Duplicate Email Check
  2. Description: Allows reporting on duplicate Contacts across Accounts, and warns when manually creating a dupe, without interfering with PatronManager functionality. Note: you must only merge Contacts within the same Account!
  3. Record-level security: enforce sharing rules
  4. Actions:
    • On create: Allow -- leave "Alert" unchecked -- check "Report"
    • On edit: Allow -- leave "Alert" unchecked -- check "Report"
  5. Compare Accounts with: Contacts
  6. Matching rule: Duplicate Email Check
  7. Conditions:
    • Contact: Contact Record Type -- not equal to -- To Be Qualified
      • Use the magnifying glass to select To Be Qualified
  8. Click Save

4.9. Click Activate

5. Create some duplicate-finding report record types

OK, the system knows how and when to find potential duplicates. Awesome!

Now we need to be able to find those potential duplicates in a list so we can merge them when we need to - and reports are perfect for this. Just one problem: the report types we need for such a report don't exist yet.

That's why we're going to create those custom report types right now. We'll make two:

  • One for an Accounts-based report
  • One for a Contacts-based report
Let's make those reports possible

5.1. In Setup, search and click on Report Types

5.2. Click New Custom Report Type

5.3. Fill out this form as follows

  1. Primary Object: Accounts
  2. Label: Accounts with Duplicate Record Items
  3. Description: Accounts with Duplicate Record Items
  4. Category: Accounts & Contacts
  5. Deployment Status: Deployed
  6. Click Next

5.4. Click the box to relate another object

5.5. Relate Duplicate Record Items

  1. Object: Duplicate Record Items
  2. A to B Relationship: Each "A" record must have at least one related "B" record.
  3. Click Save

5.6. You'll end up on your new Report Type page; scroll down and click Edit Layout

5.7. Change the "View" dropdown in the right sidebar to "Duplicate Record Items Fields"

5.9. In the pop-up, click "Duplicate Record Set"

5.10. Check the Record Count box and click OK

5.11. Click Save

5.12. One down, one to go; click Report Types in the Setup sidebar again

5.13. Click New Custom Report Type again

5.14. Fill out this form as follows

  1. Primary Object: Contacts
  2. Label: Contacts with Duplicate Record Items
  3. Description: Contacts with Duplicate Record Items
  4. Category: Accounts & Contacts
  5. Deployment Status: Deployed
  6. Click Next

5.15. Click the box to relate another object

5.16. Relate Duplicate Record Items

  1. Object: Duplicate Record Items
  2. A to B Relationship: Each "A" record must have at least one related "B" record.
  3. Click Save

5.17. You'll end up on your new Report Type page; scroll down and click Edit Layout

5.19. In the pop-up, click Account Name

5.20. Now check the Account ID box and click OK

5.21. Change the "View" dropdown in the right sidebar to "Duplicate Record Items Fields"

5.23. In the pop-up, click "Duplicate Record Set"

5.24. Check the Record Count box and click OK

5.25. Click Save

Done! Let's build some reports

6. Build our duplicate reports and subscribe

Now that we have our report types, we can finally build the reports we need to see our potential duplicates and merge them away.

We'll make two reports:

  • One to see potential Account dupes
  • One to see potential Contact dupes
We can finally find those pesky dupes!

6.1. From the app launcher, find and click on Reports

6.2. Click New Report

6.3. Search and click on Accounts with Duplicate Record Items

6.4. Click Start Report

6.5. On the Outline tab, adjust your columns

You'll start off with:

  • Account Name
  • Duplicate Record Item Name

First, remove Duplicate Record Item Name

Then, add:

  • Account Record Type
  • Created Date (from the Account)
  • Last Modified Date

6.6. Now in the Group Rows section, add the "Duplicate Record Set: Duplicate Record Set Name" field

6.7. Over on the Filters tab, set these two filters as follows:

  • Show Me: All accounts
  • Created Date: All Time

6.8. Add one more filter for "Duplicate Record Set: Record Count" as follows

Type "Record Count" in the "Add filter..." field to find the correct field, then set the filter as follows:

  1. Operator: greater than
  2. Type: value
  3. Value: 1
  4. Click "Apply"

6.9. Click Save & Run

6.10. Fill out the pop-up as follows:

  1. Report Name: Duplicate Accounts
  2. Report Description: potential Account duplicates to merge. Only our Duplicate Manager should use this report
  3. Folder: wherever makes sense for you; we created a new public folder specifically for our Duplicate Management reports
  4. Click Save

6.11. Accounts report done, let's build the Contacts report: head back to the Reports tab and click New Report again

6.12. Search and click on Contacts with Duplicate Record Items

6.13. Click Start Report

6.14. On the Outline tab, add some columns

You'll start off with:

  • Full Name
  • Duplicate Record Item Name

First, remove Duplicate Record Item Name.

Then, add:

  • Account Name: Account Name
  • Email
  • Created Date (from the Contact)
  • Last Modified Date
  • Contact Record Type

6.15. Now in the Group Rows section, add "Duplicate Record Set: Duplicate Record Set Name" field, then add the "Account Name: Account ID" field

Be sure they're in this order!

  1. Duplicate Record Set: Duplicate Record Set Name
  2. Account Name: Account ID

6.16. Over on the Filters tab, set these two filters like so:

  • Show Me: All contacts
  • Created Date: All Time

6.17. Add one more filter for "Duplicate Record Set: Record Count" as follows

Type "Record Count" in the "Add filter..." field to find the correct field, then set the filter as follows:

  1. Operator: greater than
  2. Type: value
  3. Value: 1
  4. Click "Apply"

6.18. Click Save & Run

6.19. Fill out the pop-up as follows:

  1. Report Name: Duplicate Contacts
  2. Report Description: potential Contact duplicates to merge. Only your duplicate manager should use this report. Always merge duplicate Accounts first!
  3. Folder: wherever makes sense for you; we created a new public folder specifically for our Duplicate Management reports
  4. Click Save

Reports are built! One last thing to do

7. Remove the Lightning Component from page layouts

Once you set up all these matching rules, Salesforce really wants to bug everyone about potential duplicates, popping up with alert messages on those records. That might seem nice, but the duplicate manager at your organization is going to take care of any potential duplicates each week.

We don't want to bother your colleagues in the meantime, and we certainly do not want people to merge records willy-nilly. If everyone at your org starts merging potential duplicates, you could face some unintended data loss.

But we can avoid the whole problem by just disabling the alert messages!

Let's put the guard rails on

7.1. Head to the Accounts tab and click on any Account

7.2. Use the gear in the upper right and click Edit Page

7.3. Search the center panel for this component, hover over the block, and click the trash can

The thing you're looking for is the Duplicate Management component; we're going to remove it from the page.

7.4. Click Save

7.5. In the pop-up, click Activate

If you don't get a pop-up, you can skip ahead.

7.6. Click Assign as Org Default

7.7. Click Next

7.8. Click Save

7.9. Click the back button

7.10. Time to do the same thing for Contacts; head to the Contacts tab and click on any Contact

7.11. Use the gear in the upper right and click Edit Page

7.12. Search the center panel for this symbol, hover over the block, and click the trash can

The thing you're looking for is the Duplicate Management component; we're going to remove it from the page.

7.13. Click Save

7.14. In the pop-up, click Activate

If you don't get a pop-up, you're done!

7.15. Click Assign as Org Default

7.16. Click Next

7.17. Click Save

7.18. Click the back button, and you're done!

You did it! Now you can find new duplicates and merge them in Lightning.

Frequently Asked Questions

Congratulations! You've set up your organization to find and merge duplicates efficiently and safely - good work. Below we've gathered some frequent questions about the setup process.

Does the system only flag new potential duplicates? Can I use it to check my existing data as well?

Unfortunately, Salesforce Duplicate Management currently only checks for potential duplicates when a record is created, or edited in such a way that it triggers the matching rule (e.g. changing the email address on an existing Contact).

It's not possible to force the rules to run for existing records -- but we agree that this functionality would be great to have! We'd encourage you to vote up this idea on the Salesforce IdeaExchange.

Can I create additional matching/duplicate rules?

The rules above primarily match Accounts via name, address, and phone number; similarly, they match Contacts by name and email address.

If your organization tracks other identifying information, you might also consider building matching rules using that information, then building duplicate rules to make use of them.

If you do this, be sure to proceed with caution - again, going outside the bounds of our recommendations below can break PatronManager!

1. Test any new rules in a sandbox

If you set up a new rule that is looser than you realize, you may inadvertently tell the system to flag hundreds, or even thousands, of potential duplicates in error. You can normally "undo" and remove those potential duplicate flags by deleting the duplicate rule, but in some cases the delete can fail if there are too many associated records.

We strongly recommend testing in a sandbox to be sure that your new rules are set up correctly, and aren't overly broad.

2. ALWAYS follow these guidelines

If you create custom matching/duplicate rules, it is imperative you follow these guidelines:

  • Any Contact or Account matching rule must have this condition:
    • Record Type -- not equal to -- To Be Qualified
  • Any Contact or Account duplicate rule must be set to:
    • Action on create: allow
    • Action on edit: allow
  • Alerts must not be enabled on any Contact or Account duplicate rule
  • Any Contact or Account duplicate rule must have this condition:
    • Record Type -- not equal to -- To Be Qualified

Deviating from these guidelines can and will break PatronManager!

What if I have some purposeful duplicates?

There are some cases where you may want to keep duplicates in your system. 

For example, if Ryan Choi buys tickets to your events for personal use, but also frequently brings groups as a staff member of Ivy University, you may wish to keep two Contact records for Ryan: one in a personal Ryan Choi account and one in the Ivy University account.  

If there are some duplicates you want to keep, you have a few options on how to handle them.

Option 1: Delete the Duplicate Record Set

  • Pros:
    • This option is easy and requires no customization
  • Cons:
    • You will need to do this every time a change is made to either Contact record or if the Duplicate Rules are triggered again when the patron puts in an online order, for example
How to Delete the Duplicate Record Set
1. From one of your duplicate reports, click the Duplicate Record Set
Click the Duplicate Record Set
2. On the Duplicate Record Set page, click Delete
Click Delete
3. Click Delete in the popup
Click Delete
No more duplicates!
No more Duplicates!

But remember, if the Duplicate Rules are triggered again in the future, you'll need to go through this process again.

Option 2: Create a custom field and update Duplicate Rules

  • Pros:
    • The system will not flag these Contact records as duplicates again
  • Cons:
    • Requires more customization and testing in a Sandbox
How to create a custom field and update the rules

First, we'll build a custom field on our Contact pages to note an intentional duplicate. Then, we'll reference that custom field and update our Duplicate Rules.

1. In Setup's Object Manager, find and select Contact
In Object Manager click Contact
2. In Fields & Relationships, click New
Click Fields & Relationships, then New
3. Select Checkbox as your Data Type, then click Next
Select Checkbox, then Next
4. Create your field
Create the field
  1. Field Label: Name your field; in this example, we're calling this "Approved Duplicate"
  2. Default Value: Unchecked
  3. Description: Add a description explaining what this field is
  4. Help Text: Add some short text to help users know about this field
  5. Click Next
5. Click Next
Click Next
6. Select the Page Layouts where you want this field to appear, then click Save
Uncheck TBQ Contact, then click Save

Make sure to always uncheck TBQ Contact!

7. In the Home page of Setup, find and select Duplicate Rules
In Setup Home, click Duplicate Rules
8. Click into Contacts within Account
Click Contacts within Account
9. Click Edit
Click Edit
10. Add a Condition
Add a Condition

The Condition should be:

  1. Field: The name of the field you created; in this case "Approved Duplicate"
  2. Operator: not equal to
  3. Value: True; use the magnifying glass to select the Value
  4. Click Save
11. Click Duplicate Rules again
Click Duplicate Rules
12. Click into Duplicate Email Check
Click Duplicate Email Check
13. Click Edit
Click Edit
14. Add a Condition
Add a Condition

The Condition should be:

  1. Field: The name of the field you created; in this case "Approved Duplicate"
  2. Operator: not equal to
  3. Value: True; use the magnifying glass to select the Value
  4. Click Save

Once you've done this, go back and fill in your custom field on the Contacts you want to keep as duplicates.

Then, you can delete the Duplicate Record Set for those duplicates and they shouldn't appear again!

Previous Article All About Managing Duplicate Accounts & Contacts
Next Article How to Merge Duplicate Accounts & Contacts in Lightning
Still Need Help? Continue to the Client Community