How to Update Contact Owners with Salesforce Flow

In Salesforce, if you want to change the contact owners or ownership of any object record using a flow, you should use a record-triggered flow to do so.

In this Salesforce flow tutorial, we will create a record-triggered flow that changes and updates the ownership of the Contacts in the Salesforce org.

When to use Salesforce flow to update Ownership in records

In Salesforce record management, many times, it is required to change the ownership of records. This process can be done manually or with the help of data management tools like data loader, but it will be great when this process of updating ownership gets automated, and we can do it with the help of Salesforce flows.

While working as a system admin, I was assigned a task to update the ownership of contacts related to a specific account. Here, I had to update the Account ownership and contact ownership to the same user.

As a solution for this, I created a record-triggered flow that will update the contact ownership to the new owner of the Account, i.e., the new owner of the Account will also own the contacts related to that account.

Update Contact Owners with Salesforce Flow

In the steps below, I will explain how to create a record-triggered flow to update Contact records’ ownership.

Now, navigate to the Setup page of Salesforce and follow the below steps.

1. In the Quick Find box, search and select Flows under the heading Process Automation.

Create a flow to change contact owners in Salesforce

2. Click on the New Flow button in the Flows setup window.

3. In this step, select the option Record-Triggered Flow and click on the Create button.

Change record Owners with Salesforce flow

4. In this Object field, select the object whose records trigger the flow when they are created, updated, or deleted. In this flow, the record will trigger when the Account object is updated, so I have selected the Account object.

In the Configure Trigger section, select the option A record is Updated.

Salesforce record triggered flow to update record owner

5. When we create a flow that is triggered when a record is updated, we first need to define the entry conditions.

In the Condition Requirements field, select the option All Conditions Are Met.

In the update condition, select the Field as OwnerId, Operator as Is Changed, and Value as True.

Update Contact owner with a flow in Salesforce

6. Now, we will use another element in the flow to update records. To do so, click on the “+” icon in the flow and select Update Records.

Use record triggered flow to Change contact owners in Salesforce

7. Enter the label for the record update element. In this example, I have entered the Label as Update Contact Owner, and the API Name will be auto-filled according to the entered label.

After this, select the radio button Specify conditions to identify records, and set fields individually.

Under the heading Update Records of this Object Type, select the Object as Contact.

Update Contact owner with triggered flow in Salesforce

8. After this, we need to define the filter conditions and, for that, select the condition requirement as All Conditions Are Met.

In this case, I have added two filter conditions, which are as follows.

  • Field = AccountId, Operator = Equals, and Value = Record -> AccountID.
  • Field = OwnerId, Operator = Equals, and Value = Record -> AccountID.

At last, set the field values for the Contact records by selecting the Field as OwnerId and Value as Record > Owner ID.

Update record ownership with Salesforce record triggered flow

9. Now click on the Save button at the top to save this flow; then, in the next window, enter the Flow Label and click Save.

I entered the flow label as Update Contact Owners in this example.

Salesforce record triggered flow to update contact owner

10. Run a debug operation to check the errors in the flow, and for that, click on the Debug button at the top.

Salesforce Flow to update Contact Ownership

11. Select the option Skip start condition requirements in the Debug options. Then select an account to test and click the Run button.

Create a Record Triggered flow to update contacts owners

12. If there is no error in the flow, then Activate the created triggered flow.

Record triggered flow to update records in Salesforce

13. To check the flow’s workings, navigate to the Account tab and open an account record with contacts.

Update Contacts record owner with triggered flow in Salesforce

14. Change the account owner with another user and save the changes in the account.

Update Contact owner with Salesforce record triggered flow

According to the condition defined in the record-triggered flow, when we change the ownership of the Account record, the ownership of the contacts in that account will also be changed.

15. After this, when you go to the contacts in the account record, the new owner of the account will be assigned the ownership of the contacts in the account.

How to Update Contact Owners with Salesforce Flow

In this way, we can Update contact owners with the help of a flow in Salesforce.

Conclusion

In Salesforce CRM, flows are very helpful for the automation of data processes that save a lot of time. In this Salesforce tutorial, we have learned about the process of updating the Contact owners with the help of Salesforce Record-triggered flow.

By following the above steps, you might have understood the process of creating a record-triggered flow and how to update the record owners with the help of that.

You may like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.