WhatsApp lets you add buttons to message templates. There are two types of buttons: Quick replies and Call to action buttons. These buttons open up many opportunities for businesses worldwide to engage with their customers on WhatsApp, one of the most popular messaging applications.
Quick replies let businesses define buttons that users can tap to respond. When a Quick reply is tapped, a message containing the button text is sent in the conversation.
Call to action buttons trigger a phone call or open a website when tapped. Please note that at this time, WhatsApp does not support deeplinks.
To use buttons, you need to submit them as part of a message template to WhatsApp. Once approved, templates containing buttons can be sent by sending the message text in your API request.
To use buttons, you need to submit a template that contains the buttons. Go to the Twilio console, navigate to Programmable Messaging > Senders > WhatsApp Templates, and click the New message template button. Here, you need to submit a message template containing buttons. For more information, please see Sending Notifications with Templates.
Once your template with buttons has been approved, you can send buttons as part of your WhatsApp messages. To send a button, send a message that contains the body of the template. The buttons are automatically appended to the message.
For example, to send the buttons shown below, you need to send a message containing just the body: “Thank you for submitting your order. To finalize your payment, please tap below to call or visit our website.” The template will be sent, including the buttons.
|Call to action buttons||Quick reply button|
If you send a message with a body that matches two templates — one with buttons and one without — the template with buttons will be automatically chosen
When end-users tap on one of your Quick replies, this automatically triggers a message that is sent to your business with the button text. If you have a webhook configured for incoming messages to the WhatsApp sender that the Quick reply was sent to, then you can get the text of the button tapped in the
ButtonText parameter from the callback. For more information, please see Twilio’s Webhook Requests.
- Message templates with buttons incur standard template charges wherever applicable.
- Buttons are supported in Twilio Studio, Flex and Conversations API by sending a message with a text body that matches the corresponding template with buttons.