Content Types - Call-to-Action Buttons

Call-to-action buttons allow your customer to call a phone number or visit a website (e.g., payment link, tracking link, more information) at the touch of a button.

A template can have a maximum of two call-to-action buttons and a maximum of one of each type (“call phone number” and “visit website”).

Benefits and use cases include

  • Escalation: if a case cannot be resolved within the WhatsApp thread, you can direct the user to call a human service agent. 
  • Online process assistance: if the customer needs to access a specific web page, e.g., an incident form, a button can get them exactly where they need to continue the case. 
  • Online shopping assistance: direct a customer to the product in question to view options and/or complete a purchase.
image_wa_conversation_rounded_borders_interactive_buttons_cta_2_message_0.35x

When submitting your Message Template, the parameters of the buttons are subject to WhatsApp’s Message Template approval. Once submitted, the content and parameters cannot be changed. 

URLs in Call-to-Action buttons can either be static or dynamic. If you want to use dynamic URLs, you will need to provide the static part of your URL with a variable when submitting your Message Template. You can then append the suffix variable when sending your Message Template.

Dynamic URL example:

https://your-business.com/static_part_of_the_url/{{1}}

Call-to-Action types

API Request for Call-to-Action Buttons

When sending a Message Template with Interactive Buttons, you will need to ensure that the " index" matches the button’s position in your Message Template.

For example, if the URL button is placed in the second position, the index must be set to "1".

curl –XPOST https://api.tyntec.com/conversations/v3/messages\
  -H 'Content-Type: application/json' \
  -H 'apikey: <API KEY>' \
  -d '{
    "from" : "{{whatsAppBusinessNumber}}",
    "to" : "{{receiverPhoneNumber}}",
    "channel" : "whatsapp",
    "content" : {
        "contentType" : "template",
        "template" : {
            "templateId" : "{{whatsAppTemplateName}}",
            "templateLanguage" : "{{whatsAppTemplateLanguage}}",
            "components" : {
                "body" : [
                    {
                        "type": "text",
                        "text": "User"
                    },
                    {
                        "type": "text",
                        "text": "Additional Variable"
                    }
                ],
                "button" : [
                    {
                        "type" : "url",
                        "index": 1,
                        "text" : "test"
                    }
                ]
            }
        }
    }
}'