---
schema_version: "1"
id: 64342cfefbe8ba36006a34a7798ab737b1d6e61a0feede2427758397b73a0b76
title: Handle Stage Errors in Orchestrations
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/orchestrator_add_error_handling.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.orchestrator_add_error_handling.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e97817cd3de4f8035346270303fad12e6862c6333a1c91e28a436d545e7314bf
description: Configure fault paths to manage stage errors in orchestrations. Add elements and Go To connectors that run when a stage or its steps encounter errors. These paths help orchestrations complete successfully instead of failing.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Handle Stage Errors in Orchestrations

Configure fault paths to manage stage errors in orchestrations. Add elements and Go To connectors that run when a stage or its steps encounter errors. These paths help orchestrations complete successfully instead of failing.

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

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

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

To understand the value of and strategies for error handling in orchestrations, see [Error Handling in Orchestrations](https://help.salesforce.com/s/articleView?id=platform.orchestrator_concepts_error_handling.htm&release=264.0.0&type=5 "Error handling manages unexpected issues that occur in stages during an orchestration run. Configure fault paths for stages to define recovery actions when stage errors occur, ensuring orchestrations complete successfully instead of failing.").

## Add a Fault Path

Define a fault path for a stage in the orchestration.

This task requires an orchestration with at least 1 stage.

1. Hover over a stage in the orchestration.
2. Click ![The actions icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/actions_icon.png), and then select **Add Fault Path**.
3. Save your work.

Add at least 1 element to the fault path.

### Add a Decision Element to a Fault Path

Use decision elements to create conditions that control what elements run in a fault path.

This task requires an orchestration with at least 1 stage that has a defined fault path.

Use a Decision element to determine which step encountered an error and route the orchestration to the appropriate recovery action. Decision elements evaluate orchestration run variables and automatic output to identify the error's source and determine the best recovery path.

When implementing a centralized fault path strategy, the Decision element serves as the entry point. It identifies which stage caused the error and routes to the appropriate outcome path for resolution.

1. In the Fault Path, click ![Add element](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/orchestration/orchestrator_fbuilder_circleplus.png), and then select **Decision**.
2. Enter a label, API name, and description.
3. 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)**.
4. 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="d57212e257">Option</th>
                        <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d57212e260">Behavior for Decision Outcomes</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr class="">
                        <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d57212e257 ">
                          <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="d57212e260 ">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="d57212e257 ">
                          <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="d57212e260 ">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="d57212e257 ">
                          <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="d57212e260 ">
                          <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="d57212e371">Column Header</th>
                        <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d57212e374">Description</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr class="">
                        <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d57212e371 ">
                          <strong class="uicontrol">Resource</strong>
                        </td>

                        <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d57212e374 ">
                          <p id="add_a_decision_element_to_an_orchestration_fault_path__d2804e245"><a name="add_a_decision_element_to_an_orchestration_fault_path__d2804e245"><!-- --></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="d57212e371 ">
                          <strong class="uicontrol">Operator</strong>
                        </td>

                        <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d57212e374 ">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="d57212e371 ">
                          <samp class="parmname">Value</samp>
                        </td>

                        <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d57212e374 ">
                          <p><strong class="uicontrol">Resource</strong> and <strong class="uicontrol">Value</strong> in the same
                            row must have compatible data types. </p>
                          <p id="add_a_decision_element_to_an_orchestration_fault_path__d2804e294"><a name="add_a_decision_element_to_an_orchestration_fault_path__d2804e294"><!-- --></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>
5. 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.
6. (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.
7. (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.
8. (Optional) To improve the readability of the Decision element, rename the default outcome.
    1. Under Outcome Order, select **Default Outcome**.
    2. Enter a label.
9. Save your work.