Send a Flow
On this page, we will explore the different ways of sending a Flow to users.Prerequisites
You will need to verify your business and maintain a high message quality.Postman Collection
All the API requests mentioned below are documented in the Flows API postman collection which you can use to make API requests and generate code in different languages.Business Initiated Messages
To send a business initiated message with a Flow, you can create and send a message template with a WhatsApp Flow attached to it. We introduced a new button type called FLOW. Use this type to specify the Flow to be sent with the message template. To send a Flow message template you need to:- Create a message template with a Flow
- Send a message template with a Flow
Create a message template with a Flow
You can quickly build a Flow in the playground and pass the Flow JSON in the message template creation request. Or you can specify the ID or name of an already published Flow. Below is an example request to create a message template with a Flow, see this page for full reference:Sample request
| buttons object Parameters | Description |
|---|---|
type string | Required. Button type. Default value is FLOW |
text string | Required. Button label text. 25 characters maximum. |
flow_id string | Required. The unique ID of the Flow. Cannot be used if flow_name or flow_json parameters are provided. Only one of these parameters is required. |
flow_name string | Required. The name of the Flow. Supported in Cloud API only. The Flow ID is stored in the message template, not the name, so changing the Flow name will not affect existing message templates. Cannot be used if flow_id or flow_json parameters are provided. Only one of these parameters is required. |
flow_json string | Required. The Flow JSON encoded as string with escaping. The Flow JSON specifies the content of the Flow. Supported in Cloud API only. Cannot be used if flow_id or flow_name parameters are provided. Only one of these parameters is required. |
flow_action string | Default value is navigate. Either navigate or data_exchange. |
nagivate_screen string | The unique ID of the Screen in the Flow. Default value is FIRST_ENTRY_SCREEN. Optional if flow_action is navigate. |
Sample Response
Send template with Flow
Ensure that your template passes all required reviews so thatstatus is APPROVED instead of PENDING.
Now you can send a message template with a Flow using the request below
Sample request
Sample Response
User-Initiated Conversations
You are able to send your WhatsApp Flow once you have created it. You can send a Message with a Flow in a user-initiated conversation using a Message with a Call To Action (CTA). You send this message either through the On-Prem client or Cloud API with information specific to the Flow. The Flow is triggered when the user taps the CTA button. Go here to read more about message types, limits, and timing. As mentioned earlier, a message with a Flow is not much different from other types of messages. It uses the existing APIs, which are described on the following pages:- Cloud API Interactive Messages documentation page describes how to send Interactive Messages with the Cloud API.
- On-Premises Interactive Object documentation page describes sending messages with On-Premise client.
flow with the following properties.
Interactive message parameters for Cloud API
(See On-Premises Interactive Object documentation for On-Premise client parameters.)| Parameter | Description | ||
|---|---|---|---|
interactiveobject | The interactive message configuration | ||
↳type(required) string | Value must be "flow". | ||
↳action(required) object | Parameter | Description | |
| --- | --- | ||
name(required) string | Value must be "flow". | ||
parametersobject | |||
↳flow_message_version(required) string | Value must be "3". | ||
↳flow_cta(required) string | Text on the CTA button. For example: “Signup” CTA text length is advised to be 30 characters or less (no emoji). | ||
↳flow_id(required) string | Unique ID of the Flow provided by WhatsApp. Cannot be used with the flow_name parameter. Only one of these parameters is required. | ||
↳flow_name(required) string | The name of the Flow that you created. Supported in Cloud API only. Changing the Flow name will require updating this parameter to match the new name. Cannot be used with the flow_id parameter. Only one of these parameters is required. | ||
↳modestring | The Flow can be in either draft or published mode*.(Default value: published) | ||
↳flow_tokenstring | Flow token that is generated by the business to serve as an identifier. (Default value: 'unused') | ||
↳flow_actionstring | navigate or data_exchange.(Default value: navigate) | ||
↳flow_action_payloadstring | Optional if flow_action is navigate. Should be omitted otherwise. |
| Parameter | Description | ||
|---|---|---|---|
screenstring | The ID of the screen displayed first. It needs to be an entry screen**. (Default value: FIRST_ENTRY_SCREEN) | ||
dataobject | Optional input data for the first Screen of the Flow. If provided, this must be a non-empty object. (Default value: null) |

