---
schema_version: "1"
id: 268cb8dd33c926f1246dbcfaf91c54cb08a43c1b4cacc813afc0a109c0d72790
title: Use Decision Elements in an Orchestration
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/orchestrator_build_logic_conditions.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.orchestrator_build_logic_conditions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b352453d62cddc984c45e4ff94ce3c516fe7c7005942a74889f6ec40cdc7b17d
description: Control when an orchestration takes a specific decision outcome.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Use Decision Elements in an Orchestration

Control when an orchestration 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 style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.automate_orchestrator_about_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Review the supported products and editions for Flow Orchestration.">View supported editions for Flow Orchestration.</a></td></tr></tbody></table>

<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="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d346576e64">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d346576e64 ">To open, edit, or create an orchestration in Flow Builder:</td>

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

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

Before you begin, add the Decision element to your orchestration.

1. Enter a label, API name, and description.
2. 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 orchestration, select **Define Manually (Default)**
    - To dynamically determine which outcome runs based on AI evaluating data from your orchestration, select **Define with AI (Advanced)**.
3. 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 orchestration run takes.
    1. Enter a label and an outcome API name. The outcome API name must be unique within the orchestration
    2. Define the condition requirements to use for the first 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="d346576e148">Option</th>
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d346576e151">Behavior for Decision Outcomes</th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="">
                    <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d346576e148 ">
                      <samp class="parmname">All Conditions Are Met</samp>
                    </td>

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

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

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

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

                    <td data-label="Behavior for Decision Outcomes" class="slds-cell-wrap" style="vertical-align:top;" headers="d346576e151 ">
                      <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>
    3. Define the logic conditions for the first 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="d346576e262">Column Header</th>
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d346576e265">Description</th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="">
                    <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d346576e262 ">
                      <strong class="uicontrol">Resource</strong>
                    </td>

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346576e265 ">
                      <p id="orchestrator_build_logic_conditions__d5945e405"><a name="orchestrator_build_logic_conditions__d5945e405"><!-- --></a>Options: </p>
                      <ul>
                        <li>Select an input variable or automatic output from a stage or step.</li>

                        <li>Select a Decision element.</li>

                        <li>Select a global variable.</li>

                      </ul>
                    </td>

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

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346576e265 ">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.orchestrator_ref_operators_condition.htm&amp;release=264.0.0&amp;type=5" title="Use condition operators to verify the value of a selected resource. Conditions are used in Decision elements.">Flow Orchestration Operators in Decision Elements</a>.
                    </td>

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

                    <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346576e265 ">
                      <p><strong class="uicontrol">Resource</strong> and <strong class="uicontrol">Value</strong> in the same
                        row must have compatible data types. </p>
                      <p id="orchestrator_build_logic_conditions__d5945e454"><a name="orchestrator_build_logic_conditions__d5945e454"><!-- --></a>Options: </p>
                      <ul>
                        <li>Select an orchestration resource, such as an input variable or automatic
                          output from a stage or step.</li>

                        <li>Select a global variable.</li>

                        <li>Enter a literal value.</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>
4. 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 orchestration to improve AI accuracy.
    2. Enter a label and an outcome API name. The outcome API name must be unique within the orchestration.
    3. For Outcome Instructions, enter text that tells AI when to take the outcome. Include resources from the orchestration 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 orchestration run takes.
5. (Optional) To add a decision outcome to a Decision element, click ![The new outcome button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/decision_element_add_outcome_button.png). Repeat the steps to add a label and outcome API name, set up conditions, and identify logic between the conditions. For manual conditions, see Step 4b. For AI conditions, see Step 5b.
6. (Optional) To reorder a decision outcome in a Decision element, click ![The reorder icon for a decision outcome](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/decision_outcome_reorder_icon.png) and drag the item to its new location. You can’t move a decision outcome with conditions to the last position on the list because the default outcome is always last.
7. (Optional) To improve the readability of the Decision element, rename the default outcome.
    1. Under Outcome Order, select **Default Outcome**.
    2. Enter a label.
8. Save your work.