Skip to main content

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​

NeedWhere
Basic Bot Flow skillsBuild Your First Bot Flow
Published WhatsApp FlowWhatsApp Flows
Contact fields (optional)Contact Fields
WhatsApp connectedConnect WhatsApp

Path at a glance​

  1. Publish the WhatsApp Flow
  2. Open the Bot Flow editor
  3. Add Send WhatsApp Flow
  4. Save answers to contact
  5. Add Condition
  6. Assign Agent on a path
  7. 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​

  1. Add a step type Send WhatsApp Flow.
  2. Choose the published Flow.
  3. 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:

  1. Map each Flow answer to a Contact field (or — skip —).
  2. 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:

ControlBehaviour
Variable NameDropdown of that Flow’s answer fields (not a free-form custom name)
Expected ValuesMulti-select for choice fields; text for free-text
MatchAny 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​

  1. Trigger the bot (keyword or Start Bot Flow from chat).
  2. Complete the WhatsApp Flow as the customer.
  3. Confirm the FLOW / Submitted bubble, contact Fields, and the correct Condition branch (agent vs other path).

Quick paths​

PathBuild
A. Flow → agent alwaysSend WhatsApp Flow → Assign Agent
B. Flow → save fields → agentSame + Save answers to contact
C. Flow → branch → agent / endSend WhatsApp Flow → Condition → Assign Agent / End
D. Flow → webhook → agentSend WhatsApp Flow → Send to Webhook → Assign Agent