Process Builder is one of the most used declarative tools to automate business processes in Salesforce. To address multiple requirements, we create a process with multiple criteria nodes. For example – (1) if an opportunity is successfully closed by Sales representative then send an email to the customer with survey link; however, (2), in case of Lost Opportunity, post a message to Chatter Group UC Sales Reps.
Criteria and actions are evaluated in the order shown on the process canvas. When a criteria is true, the process executes the associated action group and stops evaluating additional criteria unless you select EVALUATE THE NEXT CRITERIA option. When a criteria is false, the process skips the action group and evaluates the criteria for the next action group – as shown in the following screenshot. For instance, when a record meets criteria defined in nodes (1) or (2), the process executes the associated action group and then stops at either (3) or (4). It means, processes are designed to execute only one criteria node at a time – either (1) or (2) – in a single execution.
In the preceding screenshot, criteria node (1) will always execute in all cases. For example, suppose a Sales Representative updates Opportunity Stage to Closed Lost. In this scenario, the above process will fire and it will execute criteria node (1). Since the Stage update did not meet the criteria of node (1) – Closed Won – the process will jump to criteria node (2) – Closed Lost – and execute the associated action group – Immediate Actions (4).
Business Use Case
Let us start with a business use case. Pamela Kline is working as System administrator at GurukulOnCloud. At GurukulOnCloud they are using Process Builder to streamline Sales Processes. She has created the above-mentioned process to send an email to the customer with survey link when an Opportunity is successfully closed – Closed Won. However, in the case of ‘Lost Opportunity’, she would like the process to post a message to Chatter Group UC Sales Reps.