Skip to content

Simulate a flow

Walk a flow as a pretend customer on a clock you control — reply, tap buttons, skip ahead — and see every message it would send, without sending anything.

A simulation runs your draft for a pretend customer, on a clock you set, and sends nothing. Every message the flow would send appears as a chat bubble marked Not sent — simulation, and every other step — a tag, a hand-over, a call to your system — is listed with what it would have done. No customer, contact or conversation is touched, and nothing is counted on your bill.

Use it to check a flow before you publish it, including branches that are hard to reach for real, like "we're closed on Sunday night". To try a flow on a real phone, use a test run instead.

Start a simulation

  1. Open the flow and click Simulate, beside the Canvas and Outline switch. The draft is saved first.
  2. Set up the pretend customer:
    • Name: what {{contact.name}} reads.
    • Writing for the first time: tick it to play a new customer, so the Welcome rung applies.
    • Add a contact field for anything your flow reads from {{contact.…}} or a condition.
    • Their first message, for a flow that starts on a customer message. Empty, it's one of the trigger's keywords, or "hi".
  3. If the flow keeps values for the whole chat, fill in Whole-chat values at the start: what an earlier flow in the chat would have left, one field per variable, in its type (a List or Object in JSON). Empty is "not set". Only the simulation's own copy is used.
  4. Choose Where and when: the WhatsApp number (its business hours apply) and the Starting time. Times are in the number's business-hours time zone, which the dialog names, for example Sunday 22:00 (Asia/Kolkata), so Sunday night is Sunday night where your customers are. Sunday 22:00 and Monday 10:00 set a typical closed and open time. A number with no business hours uses your own time zone.
  5. Optionally, under Calls to your systems, give an HTTP request step A made-up response: a status code and a body, starting from 200 OK, 404 Not found or 500 Server error. The step's real exits and mapping run on it, and the dialog shows which exit it would leave by and what each variable would be set to. As usual succeeds with no values. A step with exits by status code always takes a made-up response, 200 until you change it. The made-up bodies in one simulation must stay under 48 KB together.
  6. Optionally, under What happens at…, pick an outcome a simulation can't know, such as a send being refused or no agent being free, to walk that branch. As usual takes the normal one.
  7. Click Start simulation.

If the flow only starts while you're closed (or open) and the time you chose is the other, the dialog says so: "This flow only starts while you're closed, and at that time the number is open." Pick another time and start again.

Use the simulation

The simulation page shows What the customer would see beside Steps the flow took.

  • Reply as the customer: when the flow is waiting for an answer, type it and click Send as customer, or tap one of the buttons or list rows in the flow's last message.
  • Skip ahead: the simulation has its own clock, shown at the top. +5 min and +1 h move it on. While the number is closed at the simulated time, To next opening jumps to when it opens, for example "To next opening (Mon 09:00)"; it isn't shown while the number is open, or for a number with no business hours. When the flow is waiting for a delay, a button takes you straight to when it continues. The clock only moves forward.
  • Each step in Steps the flow took that set variables lists them, such as Set plan (whole chat).
  • Whole-chat values now, under the steps, shows the chat's values as the simulation has them: the ones it started with and every one the flow set since.
  • End stops the simulation. Back to the draft returns to the builder.

When the flow finishes, the page says so. Start another simulation from the builder to try something else.

Still need help?

Write to us at [email protected] and tell us what you were trying to do. Already a customer? Sign in to IconEngage — the same articles are under Help in the app.