Shaping a Process Builder
To create a new Process Builder, perform the following steps:
- Click on Setup | Process Automation | Process Builder and then click the New button:
Creating a new Process Builder
Apart from the Process Name and API Name (which cannot be updated after creation), the process trigger event (which event the process should start on, that is, The process starts when* picklist in the preceding screenshot) will help you define what you want to do. Here, you can use one of the following trigger criteria:
- A record changes: The process is triggered by a Salesforce record that has been created/updated.
- A platform event message is received: The process is triggered by a platform event message that is received from Salesforce (more information about platform events can be found on Salesforce Help at https://help.salesforce.com/articleView?id=platform_events.htm&type=0).
- It’s invoked by another process: The Process Builder you are creating is invoked by another process (it is not triggered by any record modification; it is triggered by a parent Process Builder). With this option, you can create recurrent Process Builders, thus avoiding repetition. This is often called an invocable Process Builder.
2. Click Save. You will see the graphical tool. If you click the Edit Properties button, you can change the name and description of the process, and a new Template checkbox will appear. With this checkbox, we can define the current process as a template process that can act as the base automation for a specific kind of business process. This way, it can be cloned, which can help create slightly different modifications that can be adapted to specific/local circumstances (for example, an opportunity-related process can differ from country to country, but its main structure applies globally).
The following diagram shows the base structure of a Process Builder:
The base structure of a Process Builder
The preceding diagram will help us understand the following building blocks of a Process Builder:
- Trigger: What object/event the process should start from (the + Add Object button).
- Criteria(s): These are matching conditions that state whether a process should execute certain actions (the + Add Criteria element).
- Immediate Actions: These are actions that are executed immediately if the criteria match.
- Scheduled Actions: These are actions that have been scheduled to run if the criteria match and are executed with a time-based schedule (depending on what’s been specified in a date/time field or at the time the process is executed).
Now that we’ve set up our Process Builder, it’s time to trigger it. Let’s look at how we can do this.