WhatsApp Flows
This functionality allows you to construct well-defined business messaging interactions. With Flows, a business can create and configure customized messages with interactive features that provide customers with a structured communication path. Meta details that "you can use Flows to book appointments, browse products, collect customer feedback, get new sales leads, or anything else where structured communication is more natural or comfortable for your customers."
The above image was provided by Meta.
The overall process of creating and configuring a Flows workflow and sending a Flows message is described below:
- To provision a particular Flows workflow (that is, screens, layouts, routing, etc.), you need to work with Sinch Professional Services. For any questions regarding the Sinch Professional Services team, please contact your Sinch account manager.
- If the particular Flows workflow requires an intermediary exchange of the data (for example, sending login credentials, choice options selections, etc.), it may be necessary to create a data channel. To do so, you must create a REST endpoint that receives and answers the exchange data from Meta. You will also need to contact Sinch Professional Services.
- After the Sinch Professional Services team provisions a Flows workflow, your business can initiate the workflow by sending a customer a mobile terminated (MT) interactive message containing the Flows CTA (Call to Action). You must use a channel specific message to access this Flows functionality.
- Depending on the requirements of the Flows workflow, a data exchange might take place between Meta and your data channel REST endpoint.
- When the Flows workflow runs successfully, Sinch will receive the MO message that completes the whole process.
In order to send a flow
message, you must use the channel_specific_message
feature of the Conversation API.
Sending a flow
message
When specifying a flow
message (that is, a message that contains CTA for initiating Flows workflow), you must use the channel_specific_message
feature.
Below is an example of a channel specific message payload:
{
"app_id": "{{YOUR_APP_ID}}",
"recipient": {
"contact_id": "{{PARTICULAR_CONTACT_ID}}"
},
"message": {
"channel_specific_message": {
"WHATSAPP": {
"message_type": "FLOWS",
"message": {
"header": { "type": "text", "text": "Flow message header" },
"body": { "text": "Flow message body" },
"footer": { "text": "Flow message footer" },
"flow_id": "843024380947952",
"flow_token": "1",
"flow_mode": "draft",
"flow_cta": "testing",
"flow_action": "navigate",
"flow_action_payload": {
"screen": "WELCOME_SCREEN",
"data": {
"name": "John Doe"
}
}
}
}
}
}
}
Note:
For information on all possible parameters related to this type of message, see the channel specific message documentation.
Once the flow
message is sent, the recipient will be able to initiate the Flows workflow by invoking CTA button and then engaging with the interactions defined in the workflow.