You are here:
Build an Orchestration
Use Flow Orchestration to build sophisticated business processes by combining and coordinating flows.
Required Editions
| View supported editions for Flow Orchestration. |
| User Permissions Needed | |
|---|---|
| To open, edit, or create an orchestration in Flow Builder: | Manage Flow |
It’s easier to automate a business process when you understand how the pieces fit. Before you create your orchestration, talk to your stakeholders to understand the requirements. You can save draft orchestrations without knowing all the required information. Specify all flows and details before activating and running your orchestration.
Orchestrations contain Stage elements and Decision elements. Stages contain at least one step, each step calling an action to run. Background and interactive steps call flows. MuleSoft steps call MuleSoft actions imported from MuleSoft APIs. Whenever possible, create the flows and import the MuleSoft actions that you need before you build your orchestration.
- Use Decision Elements in an Orchestration
Control when an orchestration takes a specific decision outcome. - Define Requirements for Stages and Steps in an Orchestration
Use requirements to resume an orchestration when a record changes. Define up to 10 requirements to determine when a step is ready to start or when to mark an interactive step or stage complete. - Create a Step to Interact with Users
To assign a step in an orchestration to a person, group, or queue, create an interactive step. An orchestration run creates a work item for each interactive step that it executes. - Customize Emails to Assignees
By default, each time an orchestration run creates an orchestration work item, assignees receive a notification. To change the email notification sent when an orchestration work item is created, customize the associated approval step. - Route Orchestration Work Items with Omni-Channel
To use Omni-Channel routing in Service Cloud with orchestration work items, you must have at least one queue associated with the Orchestration Work Item. When you assign an interactive step to that queue, members of the queue receive notifications via the Omni-Channel widget based on your routing logic. Unless you disable default email notifications for work items, queue members also receive email notifications. - Redirect an Orchestration Path
Flow Orchestration uses Auto-Layout in Flow Builder. In Auto-Layout, elements on the canvas are spaced and connected automatically. Use Go To connectors when you have elements that don’t follow the usual consecutive auto-layout path. - Add an End Element to an Orchestration Path
All elements in an orchestration are connected automatically or connected by Go To connectors that you add manually. To finish a path in your orchestration, add an End element. - Use Automatic Output in Orchestrations
An orchestration has access to output for its stages, steps, and decisions. Query the status of any stage or step in the orchestration. Use output parameters from any step’s associated flow. In an orchestration configured to run on API version 58.0 and later, referenced automatic outputs that contain a record or a record collection are refreshed with their latest values each time the orchestration run resumes. - Trigger an Evaluation of Orchestration Stage and Step Conditions
Every time a step within the current stage completes, the orchestration evaluates the conditions for that stage and its steps. You can also publish an orchestration event from a flow to trigger an evaluation of orchestration stage and step conditions. - Integrate an Orchestration with External Systems
Add a MuleSoft step to your orchestration to call an imported MuleSoft action. You can also use the$Orchestration.Instancesystem variable to integrate external systems with your orchestration. - Create and Use Orchestration Templates
Save orchestrations as templates to reuse them as starting points for new orchestrations. Distribute templates through managed packages so subscribers can build orchestrations based on them. - Make Work Accessible to Assigned Users
When an orchestration runs an interactive step, it emails a notification to the assigned user, group, or queue. Credentialed Experience Cloud site visitors can see and access their assigned Flow Orchestration work items on the Orchestration Work Item List object page. Internal users and credentialed Experience Cloud site visitors complete their assigned work in the Work Guide.
Create an Orchestration from the Automation App
Create an orchestration by clicking the New button in the Automation app.
-
On the navigation bar, click
.
-
In the search box, enter automation, and then select
Automation.
The Automation app opens.
-
In the Automation app, click New.
The New Automation window opens.
-
From the New Automation window, select the type of orchestration to create.
- To create an orchestration that runs when it’s called from a custom button, custom link, or a custom Apex class, select Autolaunched Orchestration (No Trigger).
- To create an orchestration that runs automatically after a record is added or changed, select Record-Triggered Orchestration.
Flow Builder opens.
For a record-triggered orchestration, configure the Start element. For any orchestration, add elements and resources.
Create an Orchestration in Setup
Create an orchestration by clicking the New Flow button in the Flows in Setup.
-
Click
, and then select Setup.
- From Setup, in the Quick Find box, enter Flows, and then select Flows.
- In the Flows window, click New Flow.
-
Determine which type of orchestration you want to create.
- To create an orchestration that runs when it’s called from a custom button, custom link, or a custom Apex class, select Autolaunched Automations. Then select Autolaunched Orchestration (No Trigger).
- To create an orchestration that runs automatically after a record is added or changed, select Triggered Automations. Then select Record-Triggered Orchestration.
Flow Builder opens.
For a record-triggered orchestration, configure the Start element. For any orchestration, add elements and resources.
Configure the Trigger for a Record-Triggered Orchestration
Configure the Start element to control when a record-triggered orchestration runs.
- Under Select Object, select the object with records that trigger the orchestration.
-
Under Configure Trigger, select an option.
- To trigger the orchestration only when a record is created, select A record is created.
- To trigger the orchestration only when a record is updated, select A record is updated.
- To trigger the orchestration when a record is either created or updated, select A record is created or updated.
-
Set up condition requirements to limit when the orchestration runs.
Condition Requirements When the Orchestration Runs When None Always All Conditions Are Met (AND) All conditions are true. Any Condition Is Met (OR) At least one condition is true. Custom Condition Logic Is Met The custom condition is true.
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.Formula Evaluates to True The formula evaluates to true.
If you select this option, use resources, functions, and operators to build a formula. See Create Formulas in the Flow Start Element Formula Builder in Creating Flow Formulas with Flow Formula Builder
- Save your work.
Add elements and resources to your orchestration.
Create an Orchestration
Orchestrations consist of Stage elements and Decision elements. Stages contain at least 1 step. Background and interactive steps call flows. MuleSoft steps call MuleSoft actions. Each stage can have a connected fault path that handles errors that the stage or steps within the stage encounters.
-
To add an element to an orchestration, click
, select the element, and then enter a label, API name, and description.
- To add an element that stores steps in your flow approval process, select Stage.
- To add an element that determines which path to route the flow approval process to, select Decision. For information on configuring a Decision element, see Use Decision Elements in an Orchestration.
-
To add steps to a stage, click Add Step, select the step type,
and then enter a label, API name, and description. For information on configuring a
step, see Step Flow Orchestration Resource.
- To add a step that has no user interaction, select Background Step. See
- To add a step that interacts with users, select Interactive Step.
- To add a step that calls a MuleSoft action, select MuleSoft Step.
-
When you add an element in an orchestration, it automatically connects to the
elements before and after it on the path. An orchestration can contain Decision elements
and Stage elements, but there’s no Loop element like there is for a flow. To repeat a
sequence of one or more elements in an orchestration or to change which element runs
next, use Go To connectors.
-
To connect to a different element, after a decision or stage element, click
, and then click Connect to element.
-
Click
on the element to go to.
-
To connect to a different element, after a decision or stage element, click
-
(Optional) To minimize failed orchestration runs, use fault paths to add error
handing to your orchestration.
-
To add a fault path to a stage, on the stage card, click
, and then select Add Fault Path.
- Add stage and decision elements to the fault path. Stage elements on a fault path in a flow approval process can contain background steps, interactive steps, or MuleSoft steps.
-
(Optional) By default, a fault path finishes with an end element. Use Go To
connectors to connect elements in a fault path to elements in the main flow approval
process. Click
, click Connect to element, and then click
on the element to go to.
-
To add a fault path to a stage, on the stage card, click
- Save your orchestration.
After you create an orchestration, test it to make sure that it’s working as you expect.
Add the Orchestration Work Guide component to the record page layout for the object affected by the orchestration.
Activate your orchestration.
A record-triggered orchestration is now ready to go. Call an autolaunched orchestration from a custom button, a custom link, or from a custom Apex code.

