You are here:
Error Handling in Orchestrations
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.
Required Editions
| View supported editions for Flow Orchestration. |
General
When an orchestration run encounters an error, the system sets its status to Error. Many errors that occur within stages are recoverable. For these errors, you have up to 14 days to fix the error and resume the orchestration run. If errors occur outside of stages, the orchestration run fails, and you can't resume it. See Resuming a Failed Orchestration in Orchestration Run.
When an orchestration run fails, Salesforce sends an error email to the admin who last modified the orchestration or to Apex exception email recipients. The error email provides details about the orchestration run, including which elements ran and which flows the steps referenced. For an active orchestration, the email also includes a link to view the failed orchestration run's details in Flow Builder. If a flow called by the orchestration causes the failure, recipients receive two error emails: one for the orchestration and one for the called flow.
To manage errors, configure fault paths for stages in your orchestration. If a stage or any step within it encounters an error, these paths define alternative actions to minimize process failures.
Design and debug your orchestrations in a sandbox environment before deploying to production, because failed orchestrations don’t necessarily roll back all prior record changes.
Unhandled Errors and Status Changes
An unhandled error occurs when an orchestration run encounters a problem during execution and no recovery mechanism exists. For orchestrations, an unhandled error occurs when a stage or step encounters an error, and the stage has no configured fault path.
| Item | Condition | Status |
|---|---|---|
| Orchestration run | Any error occurred | Error |
| Stage run | The stage was in progress when an orchestration run-level error occurred | Discontinued |
| Stage run | The stage or a step within the stage caused the error | Error |
| Step run | The step within the stage caused the error | Error |
| Step run | The step within the stage didn't start before the error occurred | Not Started |
| Step run | The step within the stage was in progress when the error occurred | Discontinued |
Error Handling Strategies for Orchestrations
Error handling in orchestrations manages failures so that business processes complete successfully or recover gracefully. Use fault paths to manage errors from stages and steps. You can use individual fault paths for targeted recovery or a centralized fault path for comprehensive error management.
A fault path can be empty or contain decision elements and stage elements. Each stage in a fault path requires at least one step and can contain multiple steps. These steps include background steps, interactive steps, or a combination of both. Fault paths also support Go To connectors. A Go To connector links to another element in the same fault path, a different fault path, or the orchestration's main path.
Individual Fault Paths. Configure a separate fault path for each stage in an orchestration. These individual paths contain elements and stages with steps that manage errors specific to each stage. This approach provides highly localized error resolution. For example, in an order processing orchestration, the inventory verification stage encounters an error due to a connection timeout. The fault path can rerun the verification step, send a notification to operations, or route to a manual review stage.
Centralized Fault Path. Configure one central fault path that serves as a consolidated error handling mechanism. Typically, this approach starts with a decision element that evaluates variables and automatic output related to the orchestration run. The decision identifies the specific stage where the error occurred. The elements on the associated outcome path address the failure. Connect each stage's fault path to the first decision element in the central fault path. This approach provides comprehensive error resolution.
For example, in a customer onboarding orchestration, the centralized fault path begins with a decision element. This decision evaluates which stage encountered an error and determines the appropriate recovery action.
If the Create Customer Account stage status isn't Completed, the decision
outcome's path includes a stage with a background step. This step notifies the account
manager about the issue. If the Configure Service Access step in the Provision Systems stage
fails, the decision outcome's path includes a stage with two steps. A background step
creates a support ticket. An interactive step assigns system configuration to the IT team.
After IT completes the configuration, the orchestration continues to the service activation
stage.
Error Handling Limitations
- You can’t add error handling for orchestration-run level errors.
- You can view debug details for a failed orchestration run only within 14 days of the failure.
- A fault path containing only an End element handles errors by changing the orchestration
run status to
Completed. This approach suppresses the error without resolving it. Salesforce doesn't send error notification emails when the orchestration run status is Completed.

