How Flows Run
How a flow starts, what it knows about the contact, how errors, timeouts and limits work, and how to test
A flow runs for one contact in one conversation. This page explains what starts a run, what ends it and what to expect when something goes wrong.
How a Run Starts
A run starts in one of three ways.
- A trigger fires. A contact writes, a visitor opens your widget, a schedule or a webhook arrives. See Triggers.
- An operator starts it. In a chat, open the actions menu and choose Flow. The list shows your published flows and has Search flows.... The running flow shows Active, and choosing it stops the run. The menu is hidden when the chat can no longer be automated, for example past the 24-hour window on a channel that uses the 7-day human agent window.
- A flow starts it. A Sub-flow card runs another flow.
A run always uses the published version, never the draft. See Version History.
What the Run Knows
When a run starts, Wexio loads the contact's profile, the conversation, your organisation and the time into variables. Cards add their own results as they run, such as a contact's answer to a Question.
Waiting for the Contact
A card that needs a reply, such as Question or Buttons, pauses the run. When the contact replies, the run continues from that card. The run ends when it reaches a card with no outgoing connection, or when a limit below stops it.
The conversation shows a short note for each stage: Flow started, Flow completed, Flow timed out, Flow cancelled and Flow loop detected. A sub-flow has the same notes with Sub-flow in front.
Limits
| Limit | Value | What happens |
|---|---|---|
| Execution timeout | 120 minutes by default. 0 means no timeout. The most you can set is 1440. | The run ends and the conversation shows Flow timed out. Set it in Flow Settings. |
| Cards between two replies | 100 | The run stops with an error and the conversation shows Flow loop detected. |
| AI Agent turns | 50 unless you set another number in the card | The AI Agent stops and the flow follows its Error output. |
The 100-card counter starts again each time the run starts and each time it resumes after a reply. A flow that loops back to an earlier card without waiting for the contact reaches the limit quickly. Put a Question or a Wait inside any loop you build on purpose.
A Sub-flow has no timeout of its own. It uses the timeout of the flow it runs. When it times out, the conversation shows Sub-flow timed out, and the parent continues on the card's timeout output, then its error output, then from where it paused.
When a Card Fails
Some cards have an error output you can connect to a recovery path. Connect it to a message, an Assign Operator card or any other card.
| Card | Error output |
|---|---|
| AI Text, AI Classification, AI Text to Speech, AI Agent | Error |
| API Call | A timeout output and an Error output |
| CRM | On Error, only when Run in background is off |
| Sub-flow | An error output and a timeout output |
| Assign Operator | A path for when no operator is available |
When a card fails and its error output is not connected, the flow ends with an error. It does not skip to the next card. Connect the error output on every card whose failure matters.
With Run in background on, a card lets the flow continue at once and its errors are not routed.
Strict Mode
Strict mode keeps a contact on the flow's path. It is off by default. See Flow Settings.
Operations
Each card that runs costs operations, counted against your plan. See Operations Cost.
Testing a Flow
The editor has no test run and no run log, and flows have no dry-run mode. A flow you start from a chat runs for real: messages go to the contact, contact fields and CRM records update, and operations are charged. The same is true for a preview chat in the widget, which is a real conversation.
To try a flow safely, limit it to one channel in Flow Settings, publish it, and start it from a chat of your own. Watch the conversation timeline, then fix the draft.
Related
- Flows - the list, plan limits and the draft and published states.
- Triggers - what starts a run.
- Flow Settings - timeout, strict mode and channels.
- Flow Cards - every card and its cost.