I recently implemented a Salesforce automation to simplify how we handle duplicate Prospect and Customer Accounts. Sharing the approach in case it helps other Salesforce Admins facing a similar scenario.
🔹 The Business Problem
In our process:
- Sellers manually create Prospect Accounts in Salesforce.
- Once a prospect becomes a customer, the Customer Account is automatically created in Salesforce through an integration with another system.
- The original Prospect Account remains in Salesforce.
- This can result in a Prospect Account and Customer Account representing the same company i.e, duplicate accounts.
Previously, sellers had to identify these duplicates and submit a ticket manually so an Admin could merge the records.
🔹 The Solution
I built an automation that follows this process:
Duplicate identified → Prospect Account flagged → Duplicate Account button + bell notification displayed → Seller clicks the button → Email sent to Service/Admin team → Admin reviews and merges the accounts
🔹 Implementation Steps
1. Create the Matching Rule and Duplicate Rule : A Matching Rule and Duplicate Rule to identify a Prospect Account and Customer Account as duplicates based on our internally defined matching criteria.
2. Create a Record-Triggered Flow: Record-Triggered Flow that runs when a Duplicate Record Set is created or updated.
Within the Flow:
- Get Duplicate Record Items: Retrieve the Duplicate Record Items associated with the Duplicate Record Set.
- Loop Through Duplicate Record Items: Loop through the Duplicate Record Items and assign the relevant Account/Company Name to a Flow variable.
- Find the Matching Account: After the loop, use Get Records on the Account object to find the corresponding Account based on the Account/Company Name stored in the Flow variable.
- Flag the Prospect Account: When the matching Account is found, update the Prospect Account and set our custom Duplicate Account checkbox field to True.
3. Display the Duplicate Account Button + Bell Notification: Duplicate Account button/action to the Account Lightning Record Page and configured Conditional Visibility based on the Duplicate Account checkbox.
When the checkbox is set to True, the seller sees the Duplicate Account button along with a bell notification. This gives the seller an immediate indication that Salesforce has identified the Account as a duplicate and that the records need to be reviewed/merged.
4. Notify the Admin Team: When the seller clicks the Duplicate Account button, an email is automatically sent to our ticketing system and Admin reviews and merges both Prospect and Customer accounts.
Here are screenshots of the flow:
#Salesforce Admin #Flow #Sales Cloud