---
schema_version: "1"
id: 141b9c5515c049828f6b939a052ee543f15f13557265df70012ea76cb5a43eb4
title: Define Conditions in a Decision Element
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_build_logic_conditions_decision_element.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_conditions_decision_element.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3920540fc2ec94fa20a0583cc6eb26c5d8757f9b9a6e6af9ed22788ab7c7e10c
description: Control when a flow takes a specific decision outcome.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Define Conditions in a Decision Element

Control when a flow takes a specific decision outcome.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d309066e57">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e57 ">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:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e57 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note You don't need to be an admin to have the Manage Flow permission. Ask your admin to add it to your profile or permission set.

Before you begin, add a Decision element to your flow.

1. 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)**.
2. 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.
    1. Define the condition requirements to use for the outcome.
        
        <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
                <colgroup>
                  <col style="width:50%">
                  <col style="width:50%">
                </colgroup>
                <thead class="slds-text-title_caps ">
                  <tr class="">
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d309066e134">Option</th>
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d309066e137">Behavior for Decision Outcomes</th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="">
                    <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e134 ">
                      <strong class="uicontrol">All Conditions Are Met</strong>
                    </td>

                    <td data-label="Behavior for Decision Outcomes" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e137 ">If one of the conditions is false, the flow evaluates the next
                      outcome’s conditions. </td>

                  </tr>
                  <tr class="">
                    <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e134 ">
                      <strong class="uicontrol">Any Condition Is Met</strong>
                    </td>

                    <td data-label="Behavior for Decision Outcomes" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e137 ">If one of the conditions is true, the flow immediately takes this
                      outcome’s path. </td>

                  </tr>
                  <tr class="">
                    <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e134 ">
                      <strong class="uicontrol">Custom Condition Logic Is Met</strong>
                    </td>

                    <td data-label="Behavior for Decision Outcomes" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e137 ">
                      <p>If you select this option, provide the condition logic by entering up
                        to 1,000 characters. Use: </p>
                      <ul>
                        <li>Numbers to refer to each condition</li>

                        <li><kbd>AND</kbd>, <kbd>OR</kbd>, or
                          <kbd>NOT</kbd> to identify which combination of conditions
                          must be true
                        </li>

                        <li>Parentheses to group parts of the string together</li>

                      </ul>
                      <p>If you enter <kbd>AND</kbd>, it’s the same as if you
                        selected <strong class="uicontrol">All Conditions Are Met</strong>. If you enter
                        <kbd>OR</kbd>, it’s the same as if you selected <strong class="uicontrol">Any
                          Condition Is Met</strong>. If you enter any other logic, make sure that
                        you include a number for each condition.
                      </p>
                      <p style="margin-bottom:0;">For example, for <kbd>1 AND
                          NOT(2 OR 3)</kbd>, the flow evaluates whether the first condition
                        is <code>true</code> and neither the second nor third condition is
                        <code>true</code>.
                      </p>
                    </td>

                  </tr>
                </tbody>
              </table>
    2. Define the logic conditions for the outcome.
        
        <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
                <colgroup>
                  <col style="width:24%">
                  <col style="width:76%">
                </colgroup>
                <thead class="slds-text-title_caps ">
                  <tr class="">
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d309066e248">Column Header</th>
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d309066e251">Description</th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="">
                    <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e248 ">
                      <strong class="uicontrol">Resource</strong>
                    </td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e251 ">The flow resource to evaluate the value of.</td>

                  </tr>
                  <tr class="">
                    <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e248 ">
                      <strong class="uicontrol">Operator</strong>
                    </td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e251 ">The available operators depend on the data type selected for
                      <samp class="parmname">Resource</samp>. See <a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_operators_condition.htm&amp;release=264.0.0&amp;type=5" title="Use condition operators to verify the value of a selected resource. Use conditions in Decision, Wait, and Collection Filter elements.">Flow Operators in Decision, Wait, and Collection Filter Elements</a>.
                    </td>

                  </tr>
                  <tr class="">
                    <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e248 ">
                      <strong class="uicontrol">Value</strong>
                    </td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d309066e251 ">
                      <p><strong class="uicontrol">Resource</strong> and <strong class="uicontrol">Value</strong> in the
                        same row must have compatible data types. </p>
                      <p>Options: </p>
                      <ul>
                        <li>Select an existing flow resource, such as a variable or screen
                          component.</li>

                        <li>Create a resource.</li>

                        <li>Enter a literal value or merge field. </li>

                      </ul>
                      <p style="margin-bottom:0;">When you add or subtract a number from a date value, the date
                        adjusts in days, not hours.</p>
                    </td>

                  </tr>
                </tbody>
              </table>
3. If you selected Define with AI (Advanced), define the instructions and outcomes for the element.
    1. For Decision Instructions, enter text that describes what decision the element makes. Include resources from the flow to improve AI accuracy.
    2. Enter an outcome label and an outcome API name. The outcome API name must be unique within the flow.
    3. 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.