Sending Message Template Interactive
WhatsApp provides interactive message templates that clients can use to send messages with buttons included. The types of interactive buttons available are as follows:
1. Button – Quick Reply: This button can be filled with specific payloads. A suitable use case for this button is a yes or no question, where the recipient doesn't need to type a reply but only needs to press the button. Below is an example of a message using an interactive quick reply button template:

2. Button – Visit Website This button can be used if the business wants to send a message containing a URL link. The URL link can be either static or dynamic. Below is an example of a message using an interactive visit website template.

3. Button – Call Phone Number: This button can be used if a business wants customers to initiate a phone call triggered by this call button. Here is an example message using an interactive button template for calling a phone number.

Steps to Use Interactive Templates
To use interactive WhatsApp templates, users need to complete a few steps:
Request Interactive WhatsApp Template Users can request a template through the developer dashboard API. Please visit the website at OCA Indonesia Developer and register the template according to the needs of the interactive template you want to use.

Please wait until the request template status changes to "Approved".
Sample Payload Request: Dynamic Visit Website Button
{
"phone_number": "{{receipient_phone_number}}",
"message": {
"type": "template",
"template": {
"template_code_id": "{{fill_with_template_code}}",
"payload": [
// if your body message have dynamic variable you should fill this body section
{
"position": "body",
"parameters": [
{
"type": "text",
"text": "{{fill with your body parameter - Optional}}"
}
]
},
{
"position": "button",
"parameters": [
{
"sub_type": "url",
"index": "0",
"parameters": [
//this parameter will be added to your url path ex: https: //example.com/your-unique-id
{
"type": "text",
"text": "{{fill with your unique ID}}"
}
]
}
]
}
]
}
}
}
Sample Payload Request – Button Quick Reply
{
"phone_number": "{{receipient_phone_number}}",
"message": {
"type": "template",
"template": {
"template_code_id": "{{fill_with_template_code}}",
"payload": [
// if your body message have dynamic variable you should fill this body section
{
"position": "body",
"parameters": [
{
"type": "text",
"text": "{{fill with your body parameter - Optional}}"
}
]
},
{
"position": "button",
"parameters": [
{
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"text": "{{fill with you payload button ex: YES}}"
}
]
}
]
}
]
}
}
}
Last updated