Recently I was perusing the Salesforce IdeaExchange for interesting features to upvote and came across a common issue with over 4k upvotes, “Automate contact owner update when account owner changes.”
Now, I would LOVE for this to be a native Salesforce feature of course, but there is a simple solution to this that I couldn’t find documented anywhere.
So let’s get to it!
The problem with Account and Contact Owner mismatches
Depending on how your sales team manages Account and Contacts, Account and Contact Owner mismatches can cause a lot of headaches.
In most Salesforce orgs I’ve worked with, the Account Owner is responsible for nurturing all Contacts within the Account, but if Sales Rep A owns the Account and Sales Rep B owns half of the Contacts under the Account it can cause issues.
Those issues include:
- Sales Rep A missing Contacts when viewing reports
- Account Engagement “Create Salesforce Task” completion actions get assigned to the wrong user
- Contact Activities get missed by the Salesperson who needs to act on them
- Multiple Sales reps nurturing the same Contact at the same time
To solve for this common issue we’re going to build two items:
- Formula Field on the Contact
- Schedule-Triggered Flow for Contacts
Identify Owner Mismatches
The first step is identifying records with an Account and Contact Owner mismatch. To do so, we want to build a Formula Checkbox field.
- Navigate to Setup > Object Manager > Contact > Fields & Relationships
- Select New
- Choose Formula, then Next
- Name the field “Owner Mismatch”
- Select Checkbox, then Next
- For the Formula, enter “IF((Account.OwnerId = OwnerId), FALSE,TRUE)”
- If you are not familiar with Salesforce formulas, what this essentially says is if the Account Owner’s ID equals the Contact Owner’s ID the checkbox should be False, or unchecked. If the two Owner IDs do not match, the checkbox should be True, or checked.
- Enter an Description so other users know what this field is for, and select Next
- Select the users who should have access to this field and the page layouts you’d like the fields added to, then select Save
Automatically Update Contact Owners
Next, we’ll create a flow to automatically update your Contact Owner to match your Account Owner. This flow is very simple, so don’t abandon ship if you are not yet a Flow super user!
- Navigate to Setup > Flows
- Select New Flow
- Select Schedule-Triggered Flow
- Fill in the “Set a Schedule” details as below
- Start Date: Today’s date
- Start Time: I recommend you set this flow to run outside of business hours. For my flow, I chose 12:00 AM
- Frequency: Daily
- Next, select + Choose Object
- Fill in the Configure Start details outlined below
- Select Contact
- Enter the condition as below
- Field: Owner_Mismatch__c
- Operator: Equals
- Value: True
- Under your Start element, select the plus symbol to add a new element
- Select Update Records
- Label the Element “Update Contact Owner”
- Under “Set Field Values for the Contact Record” set the Field to OwnerID and set the Value to {!$Record.Account.OwnerId}
- Select Done
- Select Save from the top right hand corner and name your Flow “Contact – Update Owner to Match Account”
- Select Save
- Finally, Debug your Flow to ensure it works as expected, then Activate it!
Now sit back and let everyone marvel at how clean Account and Contact owners are in the org.
Get more solutions like this from Sercante
Need help figuring it all out? Reach out to the team at Sercante to get a conversation going.