Sub topic 16
Flow Orchestrator for multi-step, multi-user processes
This chapter assumes you know the basics of Flow Builder, record-triggered flows, screen flows, and approval processes. You should also be comfortable with Setup and the Object Manager. The chapter covers what Flow Orchestrator is, when it fits, how its parts work together, and where it goes wrong.
What Flow Orchestrator is
Flow Orchestrator is a Flow Builder feature that coordinates several flows into one process. A single flow usually handles one task. An orchestration links many tasks, assigns them to different people, and tracks progress from start to finish.
An orchestration is made of three building blocks:
- Stage: a named phase of the process, such as "Collect documents" or "Legal review". Stages run one after another.
- Step: a unit of work inside a stage. A step either asks a user to do something or runs automated work.
- Flow: the logic behind a step. Each step launches a screen flow, an autolaunched flow, or a record-triggered flow.
Orchestrator does not replace those flows. It sequences them and records who did what and when.
Where it fits in the toolbox
Orchestrator sits at the top of the declarative ladder. Reach for it only after simpler tools fall short.
| Requirement | Best fit |
|---|---|
| Change a field when a record is saved | Record-triggered flow |
| Guide one user through a form | Screen flow |
| One approve or reject decision | Approval process |
| Several people act in order, with automated work between their tasks | Flow Orchestrator |
An approval process handles one decision chain well. Orchestrator is better when the process also includes data updates, tasks for non-approvers, parallel work, and a need to see where the process is stuck.
Types of orchestration
Orchestrations start in one of two ways:
- Record-triggered orchestration: starts when a record is created or updated and meets entry conditions. Use it for processes tied to one record, such as an onboarding for a new Account.
- Autolaunched orchestration: starts from another flow, Apex, or an API call. Use it when you need to pass in your own inputs or start the process from code.
Step types
Each step is one of two kinds.
Interactive steps
An interactive step assigns a screen flow to a user, a queue, or a group. The step completes when the assignee finishes the flow. Salesforce shows the work item to the assignee in a Flow Orchestration Work Guide component on a record page, or in the Work Items list. The assignee must have access to the flow and the relevant records.
Background steps
A background step runs an autolaunched flow with no user involved. Use it to update records, call an action, or send a notification. The step completes when the flow finishes.
Steps inside a stage can run in parallel or in sequence. A stage finishes when its steps are done or when an exit condition says it can finish early.
How an orchestration moves forward
An orchestration waits at each step until a completion condition is true. That condition can be the end of a flow, or a change to a record such as Status = 'Approved'.
A worked scenario
A company onboards a new enterprise customer. The process has these requirements:
- A sales rep confirms contract details.
- Finance checks credit and a legal reviewer checks terms, in parallel.
- When both finish, the system sets the Account status to Active and creates a welcome Task.
Mapped to Orchestrator:
| Stage | Step | Type | Assigned to |
|---|---|---|---|
| Confirm | Confirm contract details | Interactive | Account owner |
| Review | Credit check | Interactive | Finance queue |
| Review | Legal review | Interactive | Legal group |
| Activate | Set status to Active | Background | None |
| Activate | Create welcome Task | Background | None |
The background step can call an autolaunched flow like the one described below. The flow takes the Account record ID as an input variable, which the orchestration passes in.
Autolaunched flow: Activate_Account
Input variable: recordId (Text, available for input)
1. Get Records: Account where Id = {!recordId}
2. Assignment: set Account.Status__c = "Active"
3. Update Records: the Account
4. Create Records: Task with WhoId/WhatId = {!recordId}, Subject = "Welcome call"Keep each flow small and single-purpose. That makes it reusable and testable on its own.
Monitoring progress
Orchestrator gives you a view that other tools lack. The Orchestration Run list and the Orchestration Run detail page show which stage is active, which steps are complete, and who holds each open work item. Administrators can see stuck processes without reading debug logs. This visibility is often the deciding reason to choose Orchestrator over a chain of separate flows.
Orchestrator and Apex
Orchestrator is declarative, but it can start Apex indirectly. A background step can run an autolaunched flow, and that flow can call an invocable Apex action. Use this when one step needs logic Flow cannot express, while keeping the overall process visible in Orchestrator.
public with sharing class CreditCheckAction {
public class Request {
@InvocableVariable(required=true)
public Id accountId;
}
@InvocableMethod(label='Run Credit Check')
public static void run(List<Request> requests) {
Set<Id> ids = new Set<Id>();
for (Request r : requests) {
ids.add(r.accountId);
}
List<Account> accounts = [SELECT Id, AnnualRevenue FROM Account WHERE Id IN :ids];
for (Account acc : accounts) {
acc.Rating = (acc.AnnualRevenue != null && acc.AnnualRevenue >= 1000000) ? 'Hot' : 'Warm';
}
update accounts;
}
}The method takes a list and does one query and one update, so it stays bulk safe. Invocable methods receive many requests at once when flows run in bulk.
Common errors and gotchas
- Using it for simple work. If one record-triggered flow does the job, Orchestrator adds setup and maintenance cost with no benefit.
- Assignee lacks access. If a user cannot open the assigned screen flow or the record, the work item stalls. Check permissions and sharing before you activate.
- Unassigned work. A step assigned to an inactive user or an empty queue never completes. Prefer queues or groups over single named users for long processes.
- No exit path. If a step is rejected or abandoned and no exit condition exists, the run waits forever. Plan what happens on rejection, and add a fallback or an early-exit condition.
- Changing a live orchestration. Existing runs continue on the version they started with. Version your orchestrations deliberately and plan for in-flight records.
- Governor limits still apply. Each background flow runs in a transaction with normal limits. Orchestrator removes no limit, so apply the bulk-safety habits from earlier chapters.
- Order of execution surprises. A background step that updates a record fires that object's other automation. Check for loops where the orchestration updates a field that re-triggers its own entry conditions.
Decision criteria
Choose Orchestrator when most of these are true:
- More than one person or team must act.
- Work must happen in a defined order, or in parallel branches.
- Automated steps sit between human steps.
- Managers need visibility into where each record stands.
Choose something simpler when one user, one decision, or one save event covers the requirement. Choose Apex only for the individual actions that Flow cannot handle, and call them from inside the orchestration.
Exercise
A contract needs a sales rep to confirm details, then Finance and Legal to review in parallel, then an automatic status update. Managers want to see where each contract is stuck. Which tool fits best, and how would you model the parallel review?
Show answer
Flow Orchestrator fits best, because several users act in a set order, automated work follows their tasks, and managers need progress visibility. Model it with three stages: Confirm, Review, and Activate. Put the Finance and Legal interactive steps in the same Review stage so they run in parallel. Put the status update in the Activate stage as a background step that runs an autolaunched flow.
Exercise
Your orchestration's background step updates the Opportunity that started the orchestration, and you notice it starts new runs for the same record. What is the cause, and how do you fix it?
Show answer
The update re-triggers the orchestration, because the record still meets the entry conditions. Fix it by adding an entry condition that excludes records already in process, such as a status or flag field that the first step sets, or by changing the entry condition so that it only matches the intended change.