Salesforce: Execute flow from Process Builder

|
| By Webner

How to execute flow from Process Builder in salesforce?
Sometime it is very useful to execute flow from the Process Builder. We can execute as many flows as we want. Flow can be used to create record, update record or send any alert or email to the user. In this example, we will update last name of contact using Process Builder and Flows.

Step to execute flow from Process Builder

Create Flow: First search flow in quick search box and click new Flow.

Click on assignment icon(left side in palette). Here we will create three flow variable to hold data which we will send from process builder. Here right hand side variable will be used in process builder for mapping.
1
Then click on lookup table. Lookup table is used to find records in salesforce by using particular criteria. Here we will find contact records using id which comes from process builder. From this lookup we will get lastname from contact records and store value in new flow variable LastNameInContact.
2
Take Decision
In this step we will take decision. We will match last name which is coming from process builder with last name of contact (LastNameInContact).
3
If our condition is true then we will update contact lastname where criteria will match with contact id.
4
Our Final Flow will look like this.
5
Send argument from Process builder.
In this step we will send 3 argument from Process Builder:
Id: When we create a new contact then send id of the same contact
L_Name: We will use this argument to take decision for example
If L_Name is Verma than change it to sharma.
L_Name_Update: This argument will hold value of new lastname i.e sharma.
6

Leave a Reply

Your email address will not be published. Required fields are marked *