What is Process Builder in Salesforce?

Process Builder

Process Builder is a powerful automation tool that allows you to automate processes and workflows. It is a declarative tool and does not require even a single line of code. By using the process builder, you can almost automate everything from everyday tasks such as approvals and follow-up emails to more complex processes such as order renewals and new-hire onboarding. Processes are automated sequences of actions that are designed to replace the manual execution of repetitive or daily tasks.

Automating processes with Process Builder is possible in three different ways. The process types specify what triggers the process.

  • A record change process triggers when you create or update a record.
  • A platform event process triggers when it receives a platform event message.
  • An invocable process triggers when another process triggers it.

Every process contains the following parts:

  1. Trigger: An event or condition that starts the process.
  2. Criteria: The logical condition that determines when to execute the action of the process.
  3. Action Group: A group of scheduled or immediate actions that executes when a flow triggers and it meets the defined criteria. The record change process is the only process that supports the scheduled actions.

Create a Salesforce process using Process builder

Suppose, you want to create a draft Contract record automatically for the Closed Won high-value opportunity records. For doing this, you can use a Record change process that is in 3 parts: the trigger, the criteria, and the action. When you create or update an Opportunity record (trigger) and it is high-value and its stage is Closed Won (criteria) then, create a contract record having ‘draft‘ status (action). To Create a Process using Process Builder, follow these instructions:

Configure the Start of the Process in Process Builder

Step 1: First, log in to your Salesforce Org and navigate to the Setup page.

Step 2: In the Quick Find box, enter “process builder” and then select Process Builder from the result. This redirects you to the Process Builder page.

Step 3: Here, click the “New” button for creating a new process. Then, a “Try Flow Builder” dialog box will appear.

Step 4: Click the “Continue in Process Builder” button.

Process Builder

Define the Trigger and Criteria of the Process

Step 1: Provide a name to the process in the “Process Name” field. This will populate the “API Name” field automatically.

Step 2: In the “The process starts when” field, select “A record changes” and click the “Save” button.

Process Builder

Step 3: Now, click “+ Add Object” on the process path and select Opportunity in the “Object” field. Also, select “When a record is created or edited” for the Start the Process field.

Step 4: Then, click the “Save” button.

Step 5: Again, click “+ Add Criteria” and provide a name in the “Criteria Name” field. Leave “Conditions are met” selected.

Step 6: In the Set Conditions section, define the first condition (Field: Stage, Operator: Equals, Type: Picklist, Value: Closed Won).

Step 7: Now, click “Add Row” to add another condition. Define the second condition (Field: Amount, Operator: Greater than, Type: Currency, Value: Enter a certain amount).

Process Builder

Step 8: Then, select “All conditions are met (AND)” and then, click the Save button.

Create a draft Contract record

Step 1: Click “+ Add Action” from the IMMEDIATE ACTIONS box.

Step 2: Select Create a Record in the Action Type field. And, enter a name in the “Action Name” field.

Step 3: Then, select Contract as the Record Type.

Step 4: For Account ID, select Field Reference as Type. And for the Value field, select Opportunity > Account ID> Account ID.

Step 5: Now, For Status, leave the Type as Picklist and select Draft in the value field.

Process Builder

Step 6: Then, save the action and activate the process.

Finally, you have created a Salesforce process using the process builder. If you create or update an opportunity record and that meets the criteria defined in the process, the process will automatically create a contract with a draft status. For more information about the process builder, read the documentation.

You can also create this automation using Flow and flow builder. To learn how to create a flow using flow builder, follow our other blogs.

Please contact us at manish@bay20.com or call us at +91-8800519180 for any support related to Salesforce. You can also visit the Salesforce development page to check the services we offer.