Sending WhatsApp Flow
The system supports launching WhatsApp Flow scenarios via outbound messages. Flow lets you collect user data (registration, course sign-up, application, form, etc.) directly inside WhatsApp without redirecting to an external site.
The system supports two types of outbound messages:
Important: to send a Flow scenario it must be published. More on creating and publishing a scenario here.
Launching a Flow via template message
When to use:
The user has not messaged yet (no 24-hour window);
You need to initiate the conversation;
You need to send a registration form / application / survey;
You need to start lead generation.
Creating a template with a Flow button
Create the template via addTemplate. See the method and creation example in the API Documentation.
Sending the template with a Flow button
Wait for the created template to be approved by WhatsApp. After approval, send the template via sendTemplate. See the method and send example in the API Documentation.
Sending a template with a FLOW-type button
Example of sending a template with a flow-type button :
{
"type": "button",
"sub_type": "flow",
"index": "0"
}Example of sending a template with a flow-type button including flow_token and flow_action_data.
Use flow_action_data to pass initial input data into the flow
{
"type": "button",
"sub_type": "flow",
"index": "0",
"parameters": [
{
"type": "action",
"action": {
"flow_token": "flow_demo_00001",
"flow_action_data": {
"fname": "Anna",
"lname": "Stakina",
"age": "30"
}
}
}
]
}flow_token
Optional parameter
Flow token generated by the business, used as an identifier.
flow_action_data
Optional parameter
JSON object with data for the first screen
Receive the message when the Flow is completed successfully
Once the client finishes the form and submits — you will receive a notification via webhook. If message saving is enabled — this inbound message with the saved Flow parameters will be stored in the messages method.
The client’s response opens the 24-hour window for further communication or extends it.
Launching a Flow via service (free) message
If the user has already messaged and the window is active:
Flow can be sent as an interactive message
No template required
No prior text moderation required
Sending a message with a Flow button
Send the Flow scenario via sendFlow without prior WhatsApp approval. See the method and send example in the API Documentation.
Last updated