Whatsapp Templates

Support Window (User Initiated Conversation)

Each time an end user sends a message to a WhatsApp Business Account, the business has a 24 hour “support window” to reply to the end user with a message. Enterprises are free to personalize and design the communication without any approval needed. Support windows are applicable for customer service, feedback, surveys, and more.
Below you can see some examples of templated messages :

547 592 597 702 627 787 762

How to Create Message Templates

WhatsApp message templates are specific message formats that businesses use to send out notifications, alerts, and customer care messages to people who have opted-in to receive them. These may include appointment reminders, shipping information, issue resolutions, payment updates, and more.

When creating a message template, you must add the following:

  • Name: A message template name can only contain #lowercase alphanumeric characters# and underscores ( ). No other characters or spaces are allowed. The name of a template must match ^[a-z][a-z_0-9]+$, so start with lower case letter and consist only of lower case letters, numbers and .

  • Type: Select the appropriate template type from. The template type must fall under one of the template type options, e.g. appointment update, issue resolution, payment update, etc.

  • Translations: All message template translations must be provided by you in the format below. The element name will be the same for all translations. When sending a message template from the WhatsApp Business API, you will specify the language you would like the message template to be displayed in by using the language field.

  • Variables: The correct format for variables is this string: {{#}}, where # represents the variable index. Note: variables must begin at {{1}}.

Formatting

WhatsApp allows for basic formatting in message templates. To format a message or a part of a message, use the formatting symbols described in this table.

FormattingDescriptionSymbolExample
Italic textItalicize your message with an underscore on both sides of the text._Welcome to Routee
Bold textPlace an asterisk on both sides of the text.*Your balance is EUR 19.90
Struck through textTo strike through your message, place a tilde on both sides of the text.~This is better!
Monospace text / codePlace three backticks on both sides of the text.```print 'Hello World';

In general a template can consist of the following three components:

Header

The header of your Message Template is optional and can be either a text (up to 60 characters), a media type (image/video/document), or location. In case of a text up to one variable is supported. The variable is indicated by {{1}}. Message Templates generally allow dynamic content for the header. This means, all you have to do at this point is to declare the type of dynamic content you intend to send. This allows you to define the content at a later stage when sending a template message. There is no need to upload an image / video / file / location when creating the Message Template, as these should be uploaded on your server. WhatsApp will only review the text in your Message Template.

Body

Simple text, that can contain newlines, emojis or urls and variables.
Variables are indicated by {{n}}, n sequential natural number without repetition.
A variable counts as 1 character for the length.

The body is limited to 1024 characters. Note this limit is applied also to the hydrated template, when a footer, header or buttons are used. A hydrated template is a template on which the variable replacements are applied.
The body must be present and not empty.

Footer

Text based footer up to 60 characters.

Interactive Buttons

Interactive Buttons are a great way to give users a direct way to react to your message. You can choose to select ‘Quick Reply’ or ‘Call to Action’.

Quick Replies

Quick Replies are typically used if you wish to give your users the choice between 1–3 possible answers. The user then simply needs to tap one of the quick replies to answer to your message.

Call to Actions

A Call to Action can be either an URL or phone number. For example, a direct link to your website / app, or the phone number to call your business. URLs can be either static or have a dynamic parameter at the end of the URL. Dynamic URLs can have one variable at the end of the URL, e.g. https://www.domain.com/my-url-{{1}}

Example requests

{
  "name": "body_only",
  "category": "ACCOUNT_UPDATE",
  "localizations": [
    {
      "language": "en",
      "components": [
        {
          "type": "BODY",
          "text": "Hello {{1}}!"
        }
      ]
    },
    {
      "language": "fr",
      "components": [
        {
          "type": "BODY",
          "text": "Bonjour {{1}}!"
        }
      ]
    }
  ]
}
{
  "name": "body_and_footer",
  "category": "ACCOUNT_UPDATE",
  "localizations": [
    {
      "language": "en",
      "components": [
        {
          "type": "BODY",
          "text": "Hello {{1}}!"
        },
        {
          "type": "FOOTER",
          "text": "Your demo team"
        }
      ]
    }
  ]
}
{
  "name": "body_and_text_header",
  "category": "ACCOUNT_UPDATE",
  "localizations": [
    {
      "language": "en",
      "components": [
        {
          "type": "HEADER",
          "format": "TEXT",
          "text": "Hello {{1}}"
        },
        {
          "type": "BODY",
          "text": "This is an example of a text based header"
        }
      ]
    }
  ]
}
{
  "name": "body_and_media_header",
  "category": "ACCOUNT_UPDATE",
  "localizations": [
    {
      "language": "en",
      "components": [
        {
          "type": "HEADER",
          "format": "IMAGE"
        },
        {
          "type": "BODY",
          "text": "The format could be as well DOCUMENT"
        }
      ]
    }
  ]
}

You can add up to 3 quick reply buttons.#

{
  "name": "quick_reply_buttons",
  "category": "ACCOUNT_UPDATE",
  "localizations": [
    {
      "language": "en",
      "components": [
        {
          "type": "BODY",
          "text": "Quick reply buttons are possible as well"
        },
        {
          "type": "BUTTONS",
          "buttons": [
            {
              "type" : "QUICK_REPLY",
              "text" : "Cool!"
            },
            {
              "type" : "QUICK_REPLY",
              "text" : "Nice!"
            }
          ]
        }
      ]
    }
  ]
}

You can use either one url or one phone number or both types here.#

{
  "name": "body_and_text_header",
  "category": "ACCOUNT_UPDATE",
  "localizations": [
    {
      "language": "en",
      "components": [
        {
          "type": "BODY",
          "text": "Quick reply buttons are possible as well"
        },
        {
          "type": "BUTTONS",
          "buttons": [
            {
              "type" : "PHONE_NUMBER",
              "text" : "Support",
              "phoneNumber" : "+1231312313"
            },
            {
              "type" : "URL",
              "text" : "Your documents",
              "url" : "https://www.example.com/{{1}}"
            }
          ]
        }
      ]
    }
  ]
}