How to Use Decision Element in Salesforce Flow

The Decision is a very important element in the Salesforce Flow. It allows for the creation of multiple paths based on various criteria, allowing a single flow to output different results based on decision criteria.

In this Salesforce tutorial, we will learn about decision elements in Salesforce Flow, and additionally, we will see how to use decision element in Salesforce Flow with real-time scenarios and step-by-step explanations.

What is the Decision Element in Salesforce Flow?

A Decision is a flow element that allows you to evaluate a set of conditions and route users through the flow based on their outcomes. The element actually performs an if-then statement. When a flow executes a decision element, it evaluates each decision outcome in order.

Let’s take a Scenario while working as a Salesforce Admin for a US-based Organization that provides software solutions. I was assigned the task of developing a flow. Whenever a case is created, I need to create different tasks according to different Case Priorities.

For example, we have Low, Medium, and High priorities. When the case is created, we have to create a task with a due date of 10 days, 5 days, and 2 days, respectively.

How to Use Decision Elements in Salesforce Flow

Using the above scenario and the following steps, we will discuss how to use Decision Elements in Salesforce Flow.

1. Log in to the Salesforce Org. -> Click on the Setup -> Home Tab -> In Quick Find Box, Search for Flows. You will see an option under Process Automation -> Click on Flows.

2. Then, click on the New Flow button to create a new flow.

3. The task will be created when the Case record is created. For that, we have to select the Record-Trigger flow. Then, click on the Create button.

4. In our scenario, the flow should trigger when we create a Case record. That’s why I have selected the Case in the Object field. In Configure Trigger, I have selected A Record is Created because when we create the record, the flow should trigger.