When to use one
Use a flow sequence when a later conversation depends on what an earlier one left behind in your systems: a booking, a ticket, an order, a change to an account.- Book, move, cancel an appointment
- Open a support ticket, then follow up on it
- Place an order, then ask where it is, then return it
Building a sequence in the app
Sequences live in the Flows section of the create-run page and the plan editor, next to the flows you attach. A sequence shows as a card tagged SEQUENCE, with its flows in order and a one-line summary of its customers, wait and what happens if a flow doesn’t complete.
1
Pick the flows, in order
Click + Add a sequence of flows. The picker opens as New sequence of flows: tick the flows in the order one customer goes through them, and the tick boxes number them as you go. A tick runs the flow’s happy path; open a row to pick one of its edge cases instead. Click Add sequence once you have at least two.

2
Name it and add the customers
The new sequence opens expanded. Give it a name, then add the customers who go through it. Each customer is a Persona and their own values for the flows’
{{variables}}, such as an account number. Calls from shows the number the customer calls from: the persona’s own number, or Pool number, kept for the sequence.3
Set the wait and what happens when a flow doesn't complete
Wait between flows is the pause, in seconds, between one call ending and the next one starting: time for your systems to save what the last call changed. The rail shows it between the flows (“then, 30 s after this call ends”). If a flow does not complete chooses Stop this sequence (the default) or Carry on. You can reorder the flows with the arrows or by dragging, and swap a flow’s variant from its menu.


Sequences are available on the Blank, Flow adherence and Conversation quality templates. They can’t be combined with a property sweep.
How a sequence runs
Each customer going through the sequence once is one sequence run. Within a sequence run:- Flows run in order. Each flow is its own call, and it starts only after the one before it has ended and the wait has passed. Nothing overtakes it: not another flow, not a retry, not a later iteration of the same customer.
- One caller number. Every call in a sequence run comes from the same number, so your agent sees the same customer calling back. A persona with its own number always uses it. Otherwise the first call takes a number from Roark’s pool and the sequence run keeps it; if that number is busy, the next call waits for it rather than switching. A later iteration may call from a different number.
- One persona and one set of values. The customer’s persona plays every flow, with that customer’s values.
- A failed check never stops a sequence. Checks grade a call after it ends, and a booking can succeed on a call that fails a tone check, so the sequence carries on.
- A flow that doesn’t complete stops the sequence by default. “Doesn’t complete” means the call didn’t properly happen: no answer, busy, declined, your agent never spoke, the call hit its maximum duration, or it was invalidated, timed out or cancelled. Under Stop this sequence the remaining flows are skipped for that customer and never dial; other customers carry on. Under Carry on they still run, which suits flows that don’t depend on each other.
Rules and limits
- Variables layer. A customer’s value wins over a value set on the flow in the sequence, both win over the plan’s, and values given when the run starts win over all of them.
- A flow can appear more than once in the same sequence, for example to check the booking at the start and again at the end.
- A sequence can set its own iteration count over the API or in config as code. Otherwise it follows the plan’s.
Reading the results
While the run is going
Live now nests a sequence under one header with its name, the customer and the iteration, and lists its flows on a numbered rail. The flow on a call shows that call’s live line. Flows that ran show their result and call time, a flow that just ended shows Collecting metrics, and later ones read Waiting or Next. A flow waiting out the time between flows counts down (“Starts in 0:18”).
The calls list
In All calls, each sequence run is one row: the sequence name, the customer, the iteration, a trail with a dot per flow, and one result: Passed, Failed checks, Completed, or Stopped at step N with the reason underneath. Open the row to see its calls in order. The flow that didn’t complete is marked with a red X, and a skipped flow stays in its place, dimmed, and opens nothing. Filter by sequence, or by Single flows for the plain ones.
A stopped sequence shows in the run even without checks. With checks on the plan, a stopped sequence fails the run’s coverage, because the skipped flows still count as expected calls. A run whose every sequence stopped, and which has no plain flows, ends as Failed.
Config as code
Declare sequences on akind: simulationPlan under flowSequences. Flows and personas are named the way the rest of your config names them, and a step runs the flow’s happy path unless edgeCase names one of its edge cases.
edgeCase with the edge case’s name.
API
POST /v1/simulation/plan takes flowSequences, as does the inline plan of POST /v1/simulation/run. A plan needs flows, flowSequences, or both. Each step names its flow by id (or a Roark flow by slug), with an optional edgeCase by id or slug.
testCaseCount on the created plan before you start it.
Updating. GET /v1/simulation/plan/{planId} always returns flowSequences ([] when there are none). PUT /v1/simulation/plan/{planId} replaces the whole list: leave flowSequences out to keep the sequences, send [] to remove them all, and send each sequence you keep back with the id the read gave it. A sequence sent without an id is created as a new one.
Results. GET /v1/simulation/plan/job/{jobId} and GET /v1/simulation/plan/job/{jobId}/results return flowSequenceRuns (one entry per sequence run, with its status, stoppedAtStep, stopReason and each step’s simulationJobId and outcome) and flowSequenceSummary:
A step’s
outcome is WAITING, IN_PROGRESS, COMPLETED (the call happened, whatever its checks scored), DID_NOT_COMPLETE or SKIPPED. A skipped step is a simulation job with status CANCELLED and flowSequence.skipped: true, and it placed no call, so don’t count it as a call that failed or that someone cancelled. Every job’s flowSequence gives its flowSequenceRunId and step, or null outside a sequence.
Errors to handle:
Next steps
Run Plans
Everything else a plan holds, and how to run it
Customer Flows
Author the flows a sequence runs
Variables
Give each customer their own values
Running Simulations
Watch runs live and read the report when they settle