You are here:
Define Conditions in a Decision Element
Control when a flow takes a specific decision outcome.
Required Editions
| View supported editions. |
| User Permissions Needed | |
|---|---|
| To open, edit, create, activate or deactivate a flow using all flow types, elements, and features available in Flow Builder, including Einstein and Agentforce for Flow: | Manage Flow |
Before you begin, add a Decision element to your flow.
-
Select the type of decision logic to use for the Decision element.
- To determine which outcome runs based on traditional logic expressions and explicitly defined data from your flow, select Define Manually (Default)
- To dynamically determine which outcome runs based on AI evaluating data from your flow, select Define with AI (Advanced).
-
If you selected Define Manually (Default), define the conditions and outcomes for the
element. Outcomes for a Decision element with manual conditions are evaluated in the order
that they’re listed. Therefore, the order that you define your outcomes in can impact the
outcome that the flow takes.
-
Define the condition requirements to use for the outcome.
Option Behavior for Decision Outcomes All Conditions Are Met If one of the conditions is false, the flow evaluates the next outcome’s conditions. Any Condition Is Met If one of the conditions is true, the flow immediately takes this outcome’s path. Custom Condition Logic Is Met If you select this option, provide the condition logic by entering up to 1,000 characters. Use:
- Numbers to refer to each condition
- AND, OR, or NOT to identify which combination of conditions must be true
- Parentheses to group parts of the string together
If you enter AND, it’s the same as if you selected All Conditions Are Met. If you enter OR, it’s the same as if you selected Any Condition Is Met. If you enter any other logic, make sure that you include a number for each condition.
For example, for 1 AND NOT(2 OR 3), the flow evaluates whether the first condition is
trueand neither the second nor third condition istrue. -
Define the logic conditions for the outcome.
Column Header Description Resource The flow resource to evaluate the value of. Operator The available operators depend on the data type selected for Resource. See Flow Operators in Decision, Wait, and Collection Filter Elements. Value Resource and Value in the same row must have compatible data types.
Options:
- Select an existing flow resource, such as a variable or screen component.
- Create a resource.
- Enter a literal value or merge field.
When you add or subtract a number from a date value, the date adjusts in days, not hours.
-
Define the condition requirements to use for the outcome.
-
If you selected Define with AI (Advanced), define the instructions and outcomes for the
element.
- For Decision Instructions, enter text that describes what decision the element makes. Include resources from the flow to improve AI accuracy.
- Enter an outcome label and an outcome API name. The outcome API name must be unique within the flow.
- For Outcome Instructions, enter text that tells AI when to take the outcome. Include resources from the flow to improve AI accuracy. Outcomes for a Decision element with AI conditions are evaluated simultaneously. Therefore, the order that you define your outcomes in has no impact on the outcome that the flow run takes.

