Customer flows
Improv vs. Scripted
The single biggest decision in a customer flow is the authoring mode, and it maps directly to what you’re testing. Improv — You write a free-text brief describing who the customer is, what they want, and how they behave. The simulator improvises a fresh conversation from that brief on every run — different words, same intent:Write improv briefs like backstories
The customer setup brief is where the simulated customer comes to life. Behavioral color — emotional state, context, quirks — belongs in this prose, not in the persona (personas carry voice and speech characteristics; the brief carries the situation). Good briefs give the simulator context that drives nuanced, realistic behavior: Bereaved customerStructure scripted flows around paths
Scripted flows are graph-based — a DAG of agent and customer steps. Every unique path from start to leaf becomes its own variant automatically: the path engine derives one variant per path, so structuring the graph well is how you get coverage without duplication.Start with a happy path
Begin with a single expected route — the happy path where everything goes as planned:Add branches for edge cases
Once your happy path works, branch at points where the conversation can diverge. Branches inherit everything above them, and each new path shows up as an edge case in the variant rail: Focus your branching where:- The agent asks the customer a question (customers respond in unexpected ways)
- The agent could go on a tangent or lose track of the conversation
- Tool calls or lookups might fail or return unexpected results
Structural graph edits (adding or removing steps and edges) pause variant editing until you save — the flow needs to refresh its paths before you can add or remove variants.
Compose flows instead of duplicating them
Two composition tools keep shared sequences in one place:- Flow link (scripted step) — splices another scripted flow’s steps in at that point. Keep a shared IVR tree or authentication sequence in its own flow and link to it; when the menu changes, you update it once.
- Preceded by (improv variant) — runs a scripted flow before the improv segment. Use it to deterministically navigate an IVR menu, then hand off to an improvised conversation. Improv has no fixed ending, so it can only come last — you can’t link a scripted flow after it.
Templating with variables
Variants carry key/value variables that are handed to the customer-side model, and text fields support{{variableName}} references:
{{persona.*}} prefix and resolve from the variant’s persona at runtime:
Generate flows with Ask Roark
You don’t have to author flows from scratch. The New flow page (/customer-flows/new) offers three Ask Roark starting points under “Generate”:
- From your calls — pick real production calls and let Ask Roark draft flows from them. This is the fastest route to representative coverage: the drafts reflect how customers actually talk to your agent.
- From a transcript — upload or paste a transcript from any source (another platform, a QA review, a bug report) and generate a flow from it.
- Describe what you want — describe the situation in plain language and Ask Roark drafts the flow for you.
Personas
Personas model who is calling — the voice and speech profile pinned to each flow variant. A good persona strategy tests your agent across a range of realistic caller profiles.Diversify voice and speech
Build a set of personas that vary:- Language and accent — battle-test your transcriber’s accuracy across accents (US, British, Indian, Spanish, and more) and languages
- Speech pace and response timing — slow, rambling talkers and quick, clipped ones ensure your agent neither interrupts customers nor times out waiting for them
- Clarity and disfluencies — vague or rambling callers with natural ums and false starts stress your agent’s understanding far more than clean studio speech
Background noise is no longer a persona property — it’s the variant’s Environment chip in the flow editor (Office, Coffee shop, Driving, Airport, and more). Vary it per variant to verify your endpointing holds up in non-ideal audio.
Test difficult customer types
Combine persona fields (base emotion, clarity) with a matching customer setup brief to build challenging callers:AI Skeptic
Base emotion Skeptical, plus a brief where the customer tests the agent with trick questions and asks for a human
Hostile Caller
Base emotion Frustrated, plus a brief with a rude, escalating customer — verify your agent stays polite and professional
Sensitive Situation
A brief describing a customer in a difficult moment (bereavement, financial hardship) — ensure your agent is empathetic and considerate
Rapid Switcher
Base emotion Distracted, clarity Rambling, plus a brief where the customer changes topics frequently
Plan configuration
A plan composes agent endpoints, attached flows (with a variant selection per attachment), metrics with Pass/Fail checks, and run settings. How you configure it depends on what you’re testing.Common patterns
Load testing
Load testing
Use the Load testing template rather than configuring this by hand. Its Volume panel exposes exactly the two knobs you need — Concurrent calls and Total iterations — plus the flow to test.
- Pick a flow whose happy path matches your target call duration
- Set total iterations to your target volume and concurrent calls to how many should hit the agent simultaneously
Adaptability across personas
Adaptability across personas
Test how your agent handles different voices, accents, and speech styles on the same conversation.
- Attach a single flow with the default variant selection (your happy path)
- Attach it multiple times with a different persona override per attachment, covering a wide spread of accents, paces, and base emotions
Instruction following
Instruction following
Agents are non-deterministic — verify they don’t go off-script or hit loopholes.
- Build flows with multiple edge cases: scripted branches for the paths you can enumerate, improv edge cases for the ones you can’t
- Write agent expectations for the behaviors that must hold on every variant, and additional expectations per edge case
- Focus edge cases on points where the agent might go on a tangent or fail to recover
Red teaming
Red teaming
Use the Red teaming template to test resilience against adversarial inputs. It sources flows carrying the Adversarial label from your library, or generates 3–10 adversarial edge cases for you at easy, medium, or hard difficulty — covering prompt injection attempts, PII extraction, and social engineering.Label your own hand-authored adversarial flows with the Adversarial system label so the template picks them up automatically.
Keeping simulations under control
Next Steps
Customer Flows
Author improv briefs and scripted graphs
Personas
Create diverse caller profiles
Templates
Start from a goal with preconfigured plans
Run Plans
Configure and execute simulation plans