Sending WhatsApp Interactive Buttons
Last updated
Last updated
Currently this feature is available only through API.
WhatsApp recently introduced interactive buttons for WhatsApp Templates (HSM) and this allows businesses to send up to 3 quick replies and 1 Website & 1 Phone number as Call to Action along with the Text, Image, Document & Video Templates
Below examples show the different type of interactive buttons available with WhatsApp Templates;
Quick replies can have up to 3 buttons and can be used with text, image, document, video templates
With the help of Call to Action businesses can redirect the user to a URL or Dial a Phone Number and it has two types of buttons as shown below;
URL
Phone Number
URL
URL allows you to dynamically pass a variable at the end of the URL like https://pickyassist.com/app/buttons/{{1}} and this helps you to redirect the users to a website or order tracking page appending the order reference number or any other values.
Phone Number
This helps users to take action by clicking the button and it will dial the phone number.
Please note except the URL Dynamic variable you are not allowed to change the button text once the template is approved, i.e you need to provide all the button text and call to action URL & Contact number while requesting the templates.
Maximum 20 characters are allowed in the button name and no emoji support, you need to request the button name while requesting the template and it’s not possible to change while sending the messages
This is a new variable “payload” available in the Push API & Webhook in order track the quick reply button clicks, i.e when you send a message with interactive buttons and when the user clicked the button you will get the payload passed by you in the webhook , you can pass separate payload for each button to make the user reply tracking easier.
Please note passing payload is only supported for sending WhatsApp templates with Quick Replies
Payload needs to be passed as per the position of the approved quick replies buttons.
Below are the API Variables related only to the interactive templates, for a complete list of API Variables please refer here
Variable Name | Type | Description |
payload | array | You can pass a custom payload like a reference number for each button in the quick replies, this is an array and optional This payload will return in the Webhook when the user click on the button It's possible to pass dynamic payload for each number separately while sending messages, refer the example below |
interactive_globalbuttons | array | This is applicable only for the Call to Action URL and used for sending dynamic variables that should be replaced in the dynamic URL button. Mandatory if button type is url and interactive_buttons is empty. If the URL variable is dynamic in nature (personalise for each number) then you need to pass the dynamic value against each number through interactive_buttons |
interactive_buttons | array | This is applicable only for the Call to Action URL and used for sending dynamic variables that should be replaced in the dynamic URL button. This is used to pass personalised variable for each number dynamically and this is optional if interactive_globalbuttons is not empty |
You can use the quick reply along with Text, Image, Document & Video Templates, need to request the template accordingly
Please mind the payload value position in the array as it should be in the same order as how your buttons appears in the messages. You can pass payload dynamically for each number or can pass static payload for all messages in the push. To pass dynamically include the *payload* inside the data array, to globally use pass the payload outside the data array
It's possible to pass dynamic variable for the Call to Action URL for each number. For Dynamic use "interactive_buttons" array inside the data and for global use "interactive_globalbuttons"
It's possible to pass a dynamic variable for the Call to Action URL for each number or can pass a static value for all numbers in a push. For Dynamic use "interactive_buttons" array inside the data and for global use "interactive_globalbuttons"
You can use the *msg_id* to get the message context in the webhook if the user replies to your messages using quoted reply;
No, you are allowed to use only approved templates on your WhatsApp Official Number, once the quick reply buttons are approved by WhatsApp it's not possible to change the button name or its position, however while sending the message you will have the option to pass your own custom payload for each button and the same will be pushed back to your server when the user clicks on the buttons. Read More
The base url can't be changed once its approved however you will have an option to dynamically pass the value through variable like https://pickyassist.com/t/{{1}}
can be replaced with https://pickyassist.com/t/order-id12334565
No, you can't use the existing templates with buttons however you can request a new template with the same message body along with the quick replies or call to action button as per your business requirements.
Yes, Buttons can be used with all type of template types i.e Text, Image, Video & Document (PDF)
No, the cost is the same for the template messages as per the designation country.
You can request new templates using the WhatsApp Template Request API, currently it's not possible to request the template from our platform, you can also use our Postman Collection to ease this process.
Yes, if the 24 hours session window is active against the user then you will able to send the WhatsApp Interaction button and it won't be billed as per the destination country charges still counted as session messages and billed as per your plan.
While sending a message you will have the option to pass a custom payload for each button and when the user clicked on the button you will get the payload you passed along with the message context id. Read More
No, button order can't be changed while sending messages, so please make sure that you have passed the correct position while requesting a template.
No, when a user clicks on the call to action button it redirects the user either into a webpage or dials a number as per the button type they clicked, so it's not possible to get the click reports for Call to Action button type.
No, once the button is approved it's not possible to change the value in the Call to Action Phone number button, so please request a new template with a new number.
No, only one button type can be passed through a single message.
You can request upto 3 buttons and each button name can have upto 20 characters with no emoji support.
In the Call to Action you can pass upto 2 buttons i.e URL & Phone number.
No, only one URL button is allowed in a template however if you use you can add a phone number button as well.
The number which you set for the button will be dialed from the user phone.
No, it's not possible to dynamically hide buttons.
Yes, you can pass button name in any language WhatsApp supports in templates, make sure your select the correct language while requesting the templates.
When a user is interacting with a quick reply once the user clicked the clicked button becomes inactive which preventing users from clicking it again however for Call to Actions URL & Phone Number buttons can be clicked anytime and buttons won't get disabled.
Yes, they can forward but the buttons will not be sent when forwarding i.e only body text will be sent.
Yes, buttons will display in WhatsApp Web / Desktop App as well.
Still, Questions feel free to send an email to support@pickyassist.com