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:
- Set up our Account matching rules
- Set up our Contact matching rules
- Set up our Account duplicate rules
- Set up our Contact duplicate rules
- Create some duplicate-finding report record types
- Build our duplicate reports and subscribe
- 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
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.7. Fill out the form as follows:
- Rule Name: Fuzzy Account Match
- Description: Fuzzier matching criteria than the default Account Matching Rule
-
Criteria:
- Account Name -- Fuzzy -- leave "Match blank" unchecked
- Billing Street -- Fuzzy -- leave "Match blank" unchecked
- Phone -- Exact -- check "Match blank"
- Click Save
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
2.4. Fill out the form as follows:
- Name: Duplicate Contacts within Account
- Description: Finds duplicate Contacts that share the same Account Name
-
Criteria:
- Account Name -- Exact -- leave "Match blank" unchecked
- First Name -- Fuzzy -- leave "Match blank" unchecked
- Last Name -- Fuzzy -- leave "Match blank" unchecked
- Click Save
2.6. Click OK in the pop-up
2.10. Fill out the form as follows:
- Name: Duplicate Email Check
- 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!
-
Criteria:
- Email -- Exact -- leave "Match blank" unchecked
- Signup Status -- Exact -- leave "Match blank" unchecked
- Click Save
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
3.3. Fill in the form as follows:
- Rule Name: Fuzzy Account Duplicate Rule
- Description: Allows finding and merging duplicate Accounts without interfering with PatronManager functionality
- Record-level security: enforce sharing rules
-
Actions:
- On create: Allow -- leave "Alert" unchecked -- check "Report"
- On edit: Allow -- leave "Alert" unchecked -- check "Report"
- Compare Accounts with: Accounts
- Matching rule: Fuzzy Account Match
-
Conditions:
- Account: Account Record Type -- not equal to -- To Be Qualified
- Use the magnifying glass to select To Be Qualified
- Account: Account Record Type -- not equal to -- To Be Qualified
- Click Save
3.5. Click Duplicate Rules in the Setup menu
3.7. Fill in the form as follows:
- Rule Name: Standard Account Duplicate Rule
- Description: Allows finding and merging duplicate Accounts without interfering with PatronManager functionality
- Record-level security: enforce sharing rules
-
Actions:
- On create: Allow -- leave "Alert" unchecked -- check "Report"
- On edit: Allow -- leave "Alert" unchecked -- check "Report"
- Compare Accounts with: Accounts
- Matching rule: Standard Account Matching Rule
-
Conditions:
- Account: Account Record Type -- not equal to -- To Be Qualified
- Use the magnifying glass to select To Be Qualified
- Account: Account Record Type -- not equal to -- To Be Qualified
- Click Save
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
4.2. Click the New Rule drop-down...
4.4. Fill in the form as follows:
- Rule Name: Contacts within Account
- Description: Allows merging Contacts that share an Account Name. Be sure to merge duplicate Accounts first
- Record-level security: enforce sharing rules
-
Actions:
- On create: Allow -- leave "Alert" unchecked -- check "Report"
- On edit: Allow -- leave "Alert" unchecked -- check "Report"
- Compare Contacts with: Contacts
- Matching rule: Duplicate Contacts within Account
-
Conditions:
- Contact: Contact Record Type -- not equal to -- To Be Qualified
- Use the magnifying glass to select To Be Qualified
- Contact: Contact Record Type -- not equal to -- To Be Qualified
- Click Save
4.6. Click Duplicate Rules in the Setup menu one more time
4.8. Fill in the form as follows:
- Rule Name: Duplicate Email Check
- 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!
- Record-level security: enforce sharing rules
-
Actions:
- On create: Allow -- leave "Alert" unchecked -- check "Report"
- On edit: Allow -- leave "Alert" unchecked -- check "Report"
- Compare Accounts with: Contacts
- Matching rule: Duplicate Email Check
-
Conditions:
- Contact: Contact Record Type -- not equal to -- To Be Qualified
- Use the magnifying glass to select To Be Qualified
- Contact: Contact Record Type -- not equal to -- To Be Qualified
- Click Save
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
5.3. Fill out this form as follows
- Primary Object: Accounts
- Label: Accounts with Duplicate Record Items
- Description: Accounts with Duplicate Record Items
- Category: Accounts & Contacts
- Deployment Status: Deployed
- Click Next
5.4. Click the box to relate another object
5.5. Relate Duplicate Record Items
- Object: Duplicate Record Items
- A to B Relationship: Each "A" record must have at least one related "B" record.
- 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.8. Click the "Add fields related via lookup" link
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.13. Click New Custom Report Type again
5.14. Fill out this form as follows
- Primary Object: Contacts
- Label: Contacts with Duplicate Record Items
- Description: Contacts with Duplicate Record Items
- Category: Accounts & Contacts
- Deployment Status: Deployed
- Click Next
5.15. Click the box to relate another object
5.16. Relate Duplicate Record Items
- Object: Duplicate Record Items
- A to B Relationship: Each "A" record must have at least one related "B" record.
- Click Save
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.22. Click the "Add fields related via lookup" link
5.23. In the pop-up, click "Duplicate Record Set"
5.24. Check the Record Count box and click OK
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
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:
- Operator: greater than
- Type: value
- Value: 1
- Click "Apply"
6.10. Fill out the pop-up as follows:
- Report Name: Duplicate Accounts
- Report Description: potential Account duplicates to merge. Only our Duplicate Manager should use this report
- Folder: wherever makes sense for you; we created a new public folder specifically for our Duplicate Management reports
- 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.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
- 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!
- Duplicate Record Set: Duplicate Record Set Name
- 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:
- Operator: greater than
- Type: value
- Value: 1
- Click "Apply"
6.19. Fill out the pop-up as follows:
- Report Name: Duplicate Contacts
- Report Description: potential Contact duplicates to merge. Only your duplicate manager should use this report. Always merge duplicate Accounts first!
- Folder: wherever makes sense for you; we created a new public folder specifically for our Duplicate Management reports
- 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!
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.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.14. In the pop-up, click Activate
If you don't get a pop-up, 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.
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.
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!
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
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
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.
4. Create your field
- Field Label: Name your field; in this example, we're calling this "Approved Duplicate"
- Default Value: Unchecked
- Description: Add a description explaining what this field is
- Help Text: Add some short text to help users know about this field
- Click Next
6. Select the Page Layouts where you want this field to appear, then click Save
Make sure to always uncheck TBQ Contact!
10. Add a Condition
The Condition should be:
- Field: The name of the field you created; in this case "Approved Duplicate"
- Operator: not equal to
- Value: True; use the magnifying glass to select the Value
- Click Save
14. Add a Condition
The Condition should be:
- Field: The name of the field you created; in this case "Approved Duplicate"
- Operator: not equal to
- Value: True; use the magnifying glass to select the Value
- 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!