Skip to main content

WhatsApp Flows

WhatsApp Flows allow you to create interactive, multi-step experiences directly within WhatsApp. Build forms, surveys, appointment booking, and other structured interactions.

note

WhatsApp Flows is a newer feature and requires WABA approval. Contact your Exotel account manager for setup.

Send Flow Message​

POST /v2/accounts/<account_sid>/messages

Request Body​

{
"whatsapp": {
"messages": [{
"from": "your_waba_number",
"to": "+919876543210",
"content": {
"type": "interactive",
"interactive": {
"type": "flow",
"header": {
"type": "text",
"text": "Book an Appointment"
},
"body": {
"text": "Schedule your consultation with our team."
},
"footer": {
"text": "Tap the button to proceed"
},
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "your_flow_token",
"flow_id": "flow_abc123",
"flow_cta": "Book Now",
"flow_action": "navigate",
"flow_action_payload": {
"screen": "APPOINTMENT_FORM",
"data": {
"customer_name": "John Doe",
"available_slots": ["10:00 AM", "2:00 PM", "4:00 PM"]
}
}
}
}
}
}
}]
}
}

Parameters​

ParameterTypeRequiredDescription
flow_idStringYesUnique Flow identifier from WABA
flow_ctaStringYesButton text (max 20 chars)
flow_actionStringYesnavigate or data_exchange
flow_tokenStringYesYour flow authentication token
flow_message_versionStringYesFlow version (currently "3")
flow_action_payloadObjectNoInitial data to pass to the flow

Response​

{
"response": {
"code": 200,
"status": "success",
"data": {
"message_id": "msg_flow_001",
"status": "sent"
}
}
}

Flow Response Webhook​

When a user completes a flow, you receive the collected data:

{
"event": "flow_response",
"message_id": "msg_flow_001",
"from": "+919876543210",
"flow_id": "flow_abc123",
"flow_token": "your_flow_token",
"response_json": {
"appointment_date": "2024-06-20",
"appointment_time": "2:00 PM",
"reason": "Product consultation",
"preferred_language": "English"
},
"timestamp": "2024-06-15T10:40:00.000Z"
}

Flow Types​

TypeDescriptionUse Case
FormCollect structured dataLead capture, registrations
SurveyMultiple choice questionsCustomer feedback, NPS
AppointmentDate/time selectionBooking, scheduling
Product CatalogBrowse and select itemsOrder placement
CustomBuild any multi-screen flowComplex workflows

Flow Actions​

ActionDescription
navigateOpen the flow on a specific screen
data_exchangeSend/receive data without opening a screen

HTTP Status Codes​

CodeDescription
200Success
400Bad Request — Invalid flow parameters
401Unauthorized
403Flows not enabled on WABA
404Flow ID not found