You are here:
Handle Stage Errors in Flow Approval Processes
Set up fault paths to handle errors in flow approval processes. Create fault paths for each stage and add elements that trigger when errors occur in that stage or its steps. This approach minimizes the likelihood of approval submissions failing due to stage errors.
Required Editions
| View supported editions for Flow Approval Processes. |
| User Permissions Needed | |
|---|---|
| To open, edit, or create a flow approval process in Flow Builder: | Manage Flow |
To understand the value of and strategies for error handling in flow approval processes, see, see Error Handling in Flow Approval Processes.
Add a Fault Path
Define a fault path for a stage in the flow approval process.
You must have a flow approval process with at least 1 stage.
- Hover over a stage in the flow approval process.
-
Click
, and then select Add Fault Path.
- 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 stages are run in a fault path.
You must have a flow approval process with a stage that has a defined fault path.
Use a Decision element to avoid approving an approval submission without anyone completing an approval work item. See Avoiding Fault Path Auto Approvals in Error Handling in Flow Approval Processes.
When a fault path is configured for a stage that contains multiple steps, use a Decision element to determine which step encountered an error.
-
In the Fault Path, click
, and then select Decision.
- Enter a label, API name, and description.
-
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 approval process, select Define Manually (Default)
- To dynamically determine which outcome runs based on AI evaluating data from your flow approval process, select Define with AI (Advanced).
-
If you selectedDefine 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 associated with a parent approval
submission takes.
- Enter a label and an outcome API name. The outcome API name must be unique within the flow approval process.
-
Define the condition requirements to use for the first outcome.
Option Behavior for Decision Outcomes All Conditions Are Met If one of the conditions is false, the flow approval process evaluates the next outcome’s conditions. Any Condition Is Met If one of the conditions is true, the flow approval process 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 first outcome.
Column Header Description Resource Options:
- Select an input variable or automatic output from a stage or step.
- Select a Decision element.
- Select a global variable.
Operator The available operators depend on the data type selected for Resource. See Flow Approval Processes Operators in Decision Elements. Value Resource and Value in the same row must have compatible data types.
Options:
- Select a flow approval process resource, such as an input variable or automatic output from a stage or step.
- Select a global variable.
- Enter a literal value.
When you add or subtract a number from a date value, the date adjusts in days, not hours.
-
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 approval process to improve AI accuracy.
- Enter a label and an outcome API name. The outcome API name must be unique within the flow approval process.
- For Outcome Instructions, enter text that tells AI when to take the outcome. Include resources from the flow approval process 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 associated with a parent approval submission takes.
-
(Optional) To add a decision outcome to a Decision element, click
. Repeat the steps appropriate for the Decision element type to configure the
outcome. For manual conditions, see Step 3b. For AI conditions, see Step 4b.
-
(Optional) To reorder a decision outcome in a Decision element, click
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.
-
(Optional) To improve the readability of the Decision element, rename the default
outcome.
- Under Outcome Order, select Default Outcome.
- Enter a label.
- Save your work.
Add a Stage Element to a Fault Path
Use Stage elements to group steps that are run in a fault path.
You must have a flow approval process with a stage that has a defined fault path.
-
In the Fault path, click
, and then select Stage.
- Enter a label, API name, and description.
-
(Optional) Under Select When to Complete the Stage, select a condition.
- To complete the stage when all its steps are completed, select When all steps have been marked Completed, the stage is marked Completed.
- To specify up to 10 requirements to meet before the stage can be completed, select When the specified requirements are met, the stage is marked Completed. Then configure the requirements.
- To use complex requirements to determine when the stage can be completed, select When the specified evaluation flow returns True, the stage is marked Completed. Then select an active evaluation flow.
- Save your work.
Add steps to the stage.
Add an Approval Step to a Stage
When a flow approval process stage has a configured fault path, and an error occurs in the associated orchestration run’s stage, the associated approval submission can automatically be approved without any completed approval work items. Add an approval step to a stage in a fault path to assign an approval work item to reviewers.
To understand how errors impact the final disposition of an approval submission associated with a flow approval process, see Fault Path in Stages in Flow Approval Processes.
An approval step can be completed without running the flow associated with it. Reference a screen flow for an approval step, that includes only actions that are directly relevant to the approval work item. To perform additional actions, like updating related records or sending error notifications to stakeholders, use a background step.
- In the stage element, click + Add Step, and select Approval Step.
- Enter a label, API name, and description.
-
(Optional) Under Select When to Start the Step, select a condition.
- To automatically start the step when the stage starts, select When the stage starts, the step starts.
- To start the step after another step is completed, select When another step is marked Completed, the step starts. Then enter the name of the step to be completed first.
- To specify up to 10 requirements to meet before the step can start, select When the specified requirements are met, the step starts. Then configure the requirements.
- To use complex requirements to determine when the step starts, select When the specified evaluation flow returns True, the step starts. Then select an active evaluation flow.
-
Under Select an Action to Run, select an active screen flow that contains a text
output variable named
approvalDecisionto run for the step. Provide values or the API names of resources for the selected flow’s required inputs. See Select an Action to Run in Approval Steps.
Tip An approver or their delegate can approve or reject an approval work item without running the screen flow associated with the approval step. So select a screen flow that only gives the approver information about what they must approve or reject. To perform actions other than approving or rejecting, use a background step that follows the approval step. -
Under Select an Approver, select an assignment type.
- To specify a user, select User.
- To specify a regular public group, select Group.
- To specify a group that’s a queue, select Queue.
- To specify a resource that contains a user’s username, a group’s API name, or a queue’s API name when the orchestration run associated with an approval submission runs, select Resource.
-
Specify the assigned user, group, or queue.
- If you selected User, search for the name of an internal user or a credentialed Experience Cloud site visitor, and select it from the list.
- If you selected Group, search for a group’s label, and select it from the list.
- If you selected Queue, search for a queue’s label, and select it from the list.
- If you selected Resource, select the API name of the variable that contains the assignee’s username, group’s API name, or the queue’s API name when the orchestration run associated with an approval submission runs.
Important Don’t select $User for Resource. The $User global variable evaluates to the system user when the flow approval process is running in system context. An approval step can’t be assigned to the system user. - (Optional) To send a custom email notification to approvers and their delegates when an approval work item is created for this step, select Customize notification email. Create text templates for a personalized email subject and body and enter their API names for Subject and Body. Or enter text for the email’s subject and body.
-
Under Select Where to Complete the Action, select the API name of the variable that
contains the ID of the record to be approved.
- To lock the record under review when the orchestration run associated with an approval submission runs and the approval step starts, select Lock the record. The record is automatically unlocked when the approver or their delegate completes the approval step.
- To allow the approver to update the record under review when it’s locked, select Allow approver to edit the locked record.
-
(Optional) Under Select When to Complete the Step, select a condition.
- To complete the step when an approver or their delegate has completed the associated work item, select When the assigned user has completed the screen flow, the step is marked Completed.
- To specify up to 10 requirements to meet before the step is completed, select When the specified requirements are met, the step is marked Completed. Then configure the requirements.
- To use complex requirements to meet before the step is completed, select When the specified evaluation flow returns True, the step is marked Completed. Then select an evaluation flow that you’ve created, tested, and activated.
Add a Background Step to a Stage
Add background steps to a stage in a fault path to take actions like updating a record or communicating with stakeholders.
If the orchestration run associated with an approval submission encountered an error, use a background step to notify stakeholders if it was approved before all associated approval work items were approved.
- In the stage element, click + Add Step, and select Background Step.
- Enter a label, API name, and description.
-
(Optional) Under Select When to Start the Step, select a condition.
- To automatically start the step when the stage starts, select When the stage starts, the step starts.
- To start the step after another step is completed, select When another step is marked Completed, the step starts. Then enter the name of the step to be completed first.
- To specify up to 10 requirements to meet before the step can start, select When the specified requirements are met, the step starts. Then configure the requirements.
- To use complex requirements to determine when the step starts, select When the specified evaluation flow returns True, the step starts. Then select an active evaluation flow.
- Under Select an Action to Run, select an active, autolaunched flow.
-
Under Select Who to Run the Action As, select an option.
- (Default) To run the step as the automated process user, select Automated Process User.
- To run the step as a specific user, select A Selected User. Then select the user to run the step as.
- To run the step as a user that’s determined at run time, select A User Specified by a Resource at Run Time. Then select the flow approval process text resource that contains the username of the person to run the step as at run time.
Continue Processing After a Fault Path Runs
By default, a fault path is added to a flow approval process with an end element. To connect the fault path back into the flow approval process, use a Go To connector.
When a flow approval process includes final actions, use a Go To connector to direct fault paths to the Decision element that manages these actions. This practice ensures the orchestration run associated with a flow approval process proceeds to its intended conclusion, even if a stage error triggers a fault path.
-
In a fault path, directly before the End element that you want to change the connector
for, click
.
- Click Connect to element.
-
Click
on the element that you want to connect to.
Instead of an end element, the fault path now has a dotted line connection to the specified element.

