Bot Flow with WhatsApp Flow and Branching
Extend a Bot Flow so the bot sends a published WhatsApp Flow (Meta form), stores answers on the contact, then Conditions on those answers before Assign Agent.
Requires a Published WhatsApp Flow — G3.
Before you start
| Need | Where |
|---|---|
| Basic Bot Flow skills | Build Your First Bot Flow |
| Published WhatsApp Flow | WhatsApp Flows |
| Contact fields (optional) | Contact Fields |
| WhatsApp connected | Connect WhatsApp |
Path at a glance
- Publish the WhatsApp Flow
- Open the Bot Flow editor
- Add Send WhatsApp Flow
- Save answers to contact
- Add Condition
- Assign Agent on a path
- Test
1. Publish the WhatsApp Flow
Create and Publish under Broadcasts → Flows. Only published Flows appear in the bot step.
2. Open the Bot Flow editor
Settings → Bot Flows or Automations → WhatsApp → create or edit a flow.
3. Add Send WhatsApp Flow
- Add a step type Send WhatsApp Flow.
- Choose the published Flow.
- Place it after a customer has written (the step waits for submitted answers before continuing).
Under Preview, Answer variables lists fields from Flows in this bot ({{FieldName}} and choice option ids). The panel starts collapsed — expand to copy variables into Message or Condition steps.
4. Save answers to contact
On the Send WhatsApp Flow step, under Save answers to contact:
- Map each Flow answer to a Contact field (or — skip —).
- Optionally + Create new field… → New contact field (Name, editable Key, Type text, optional Sensitive) → Create field. Cancel creates nothing; nothing is auto-created from the Meta answer name.
Campaign / inbox Form sends can also map answers on the Forms detail page (Save answers to contact) — that mapping is Form-owned. Live bot wait still uses this step’s mapping. See Contact Fields end-to-end (G14).
5. Add Condition
Add a Condition step after Send WhatsApp Flow:
| Control | Behaviour |
|---|---|
| Variable Name | Dropdown of that Flow’s answer fields (not a free-form custom name) |
| Expected Values | Multi-select for choice fields; text for free-text |
| Match | Any value (OR) or All values (AND) |
| Next Step (If True/False) | Step ids such as step_4 |
Use the Flow map (Expand) so true/false paths are clear. Add an End after a branch that should stop.
6. Assign Agent on a path
On the path that needs a human, add Assign Agent (terminal on the map). Optional Set Contact Field or Send to Webhook on either branch — G11.
Save with Create Bot Flow / Update Bot Flow. Set keyword or Default Bot Flow as in G8.
7. Test
- Trigger the bot (keyword or Start Bot Flow from chat).
- Complete the WhatsApp Flow as the customer.
- Confirm the FLOW / Submitted bubble, contact Fields, and the correct Condition branch (agent vs other path).
Quick paths
| Path | Build |
|---|---|
| A. Flow → agent always | Send WhatsApp Flow → Assign Agent |
| B. Flow → save fields → agent | Same + Save answers to contact |
| C. Flow → branch → agent / end | Send WhatsApp Flow → Condition → Assign Agent / End |
| D. Flow → webhook → agent | Send WhatsApp Flow → Send to Webhook → Assign Agent |