ZyanDocs

Writing the call workflow

Turn a call into ordered stages with objectives, required slots, turn and time budgets, exit criteria and fallbacks — and know when supervision actually applies.

Most people write a voice agent's script as one long instruction and then wonder why the call wanders. The Workflow section fixes that by making the call an ordered set of stages, each with a job to do, a budget to do it in, and a defined way out. It is the difference between a prompt and a script.

Before you start

You need an editable draft version of an agent and the voice edit permission. Published and archived versions are read-only — use Edit as new draft first.

Set the call goal first

Open the agent version, expand Agent configurationWorkflow, and fill the two fields at the top before you add a single stage.

Call goal is the overall objective — the one thing the call exists to achieve. Approved next steps is the list of calls-to-action the agent is allowed to offer, one per line. The placeholder shows the shape:

Schedule a meeting
Request a callback
End politely

Anything not on that list is not on the table. That is the point of the field: it is a closed set, not a suggestion.

Add the stages

Click Add workflow stage

A new stage appears with the first unused stage name already selected. That is a convenience, not a guess at what you want — check it.

Pick the Stage

The ten stage names are fixed. Pick the one that matches what this part of the call is doing.

Write the Objective

A new stage starts with Define what this stage should accomplish. Replace it with one sentence about what must be true when this stage ends.

List the Required slots

Comma-separated facts the agent must collect before it may leave the stage. The placeholder is need, timeline.

Set Maximum turns and Maximum seconds

The budget. Turns default to 4 (range 1–50); seconds default to 120 (range 5–1800).

Write Exit criteria and Fallback behavior

What signals the stage is done, and what to do when it cannot be done.

Use Remove stage to delete one.

The ten stages

They run in this order, and the names describe what each is for:

StageWhat it is for
Introduction and disclosureGreeting, who is calling, and the AI disclosure
Permission to continueAsking whether now is a good time
DiscoveryUnderstanding the situation
QualificationEstablishing whether this is a fit
Value alignmentConnecting what they need to what you offer
Objection handlingAnswering the pushback
Call to actionOffering one of the approved next steps
Booking or transferActually booking, or handing to a person
ConfirmationReading back what was agreed
Wrap upClosing the call cleanly

You do not need all ten. A callback-confirmation call might be four. A cold discovery call might be eight.

Settings reference

SettingWhat it changesDefault
Call goalThe overall objective of the call. Written once, applies across every stage.
Approved next stepsThe calls-to-action the agent may offer, one per line. A closed list.
StageWhich of the ten fixed stages this row is. Adding a stage auto-picks the first unused name.
ObjectiveWhat this stage must accomplish.Define what this stage should accomplish.
Required slotsComma-separated facts the agent must collect before leaving the stage.
Maximum turnsTurn budget for the stage. Range 1 to 50.4
Maximum secondsTime budget for the stage. Range 5 to 1800.120
Exit criteriaWhat signals the stage is complete and the agent may move on.
Fallback behaviorWhat to do when the stage cannot complete inside its budget.Move on politely without inventing information.

Budgets are the part people get wrong

A stage's Maximum turns and Maximum seconds are a budget, not a target. Four turns is enough to ask a question, hear an answer, ask a follow-up and acknowledge it. If a discovery stage needs twelve turns, the objective is probably two objectives wearing one coat — split it.

The Fallback behavior matters more than it looks. It is what the agent does when the budget runs out with a required slot still empty. The default — Move on politely without inventing information — is the right instinct: the failure mode you are guarding against is an agent that invents the answer rather than admit it did not get one.

Write exit criteria as observable facts

“The person has said a rough timeframe” is testable. “The person is engaged” is not. The agent has to decide the stage is done using only what was said on the call.

When stage supervision actually applies

This is the part that surprises people. Writing stages always shapes the composed prompt, but deterministic stage supervision — the runtime actually enforcing the turn and time budgets, the listen-first timing, the interruption handling, the bounded memory and the silence policy — only happens when Workflow-supervised voice runtime is switched on in SettingsVoice & Telephony.

Off by default

Workflow-supervised voice runtime defaults to off, and the row only appears when the runtime settings are available in your environment. With it off, your stages still guide the agent through the prompt, but nothing forces a stage to end at four turns. Turn it on before you rely on the budgets, and it applies to new calls only.

Troubleshooting

SymptomCauseFix
A stage you added has the wrong nameAdding a stage auto-selects the first unused stage nameChange the Stage select on that row
The agent ignores a stage's turn budgetWorkflow-supervised voice runtime is off for the workspaceTurn it on in Settings → Voice & Telephony; it applies to new calls
The agent invents an answer when it runs out of turnsFallback behavior was rewritten to push harderRestore a fallback that moves on without inventing information
Validation fails against Workflow when you publishA stage is missing a required field, or a budget is outside its rangeThe error names the field — fix it and validate again
The agent offers something you never approvedIt is not in Approved next steps, but the persona or objective implies itKeep the offer in the approved list and out of free-text fields