Criteria definition
This is the process of matching criteria to make the Process Builder execute the actions group that has been defined for that criteria. Let’s see how we can do this.
To add the criteria, click on + Add Criteria:
Criteria definition
Criteria are defined by the following three things, as shown in the preceding screenshot:
- By a list of conditions
- A formula
- No criteria
Note that the criteria always evaluates to true.
Of these three, the formula selection can be a little different from what we are used to; the following screenshot shows how previous conditions can be written using a Process Builder formula:
Process Builder formula
Remember the following when using formulae:
- They must return true/false.
- They can contain up to 3,000 characters.
- They must reference the process trigger object (with the right capitalization).
- The ISCHANGED function cannot be used if it’s related to a parent object. For instance, ISCHANGED([Opportunity].Account.Name fails, while ISCHANGED([Opportunity].AccountId) is correct.
If we use conditions instead of formulas, the Conditions section grants the selection of AND/OR/custom conditions logic.
The Advanced tab is only shown if the trigger event is set to when a record is created or edited and the criteria node has conditions (the No criteria—just execute the actions! options is not selected) or formulas (but it has to contain a reference to the record that started the process) where the Do you want to execute the actions only when specified changes are made to the record? flag is used to prevent the Process Builder from executing the related actions if no significant change has been made to the record (that is, no field in the criteria condition/formula has changed). This is extremely useful when we don’t want to generate multiple actions on subsequent updates of a record, such as an email notification.
As an example, let’s configure the second criteria for medium-valued opportunities:
Definition of the second criteria
Another interesting feature is the option to stop the process when actions have been executed or continue to the next node (if the conditions match):
Actions for multiple criteria
In this example, if a high-value opportunity executes its actions (as we’ll see shortly), the next node is evaluated (this is defined by the EVALUATE THE NEXT CRITERIA button, but it can be set to STOP to avoid Process Builder continuation, as you can see in the criteria branch that follows). So, if an opportunity record with an amount of $500 M triggers the Process Builder’s automation, since the first criteria requires that the opportunity’s amount is greater than $100 M and the second criteria requires an opportunity with an amount of at least $1 M, both actions’ groups will be executed.
In the next section, we’ll deal with actions and action groups.