Copied +55 (21) 960104492
Log In Free trial
Select region

How to create a message template

When you start a dialog with a client in the WhatsApp Business API, a 24-hour session opens. It opens when you send a message template and the client responds to it. When the client responds to the template, you can communicate with them in normal messages for 24 hours.

A template is a message that has been pre-created and approved by Facebook. A template can include text, image, video, document, buttons, and variable values. You can only initiate a dialog first by using a template.

Template Creation

1. Click on the «My business» tab.

2. Choose the desired line.

3. Click «Go to templates», under the connected WhatsApp Business API channel.

4. In the top right corner, click on the green square with the plus symbol.

The template creation window opens:

Filling template data:

  • Template name - It must be specified in the same language in which the template is created.
  • Item name - It should be written in English and should match the content of the text as much as possible. The text should be written only in lower-case (small) letters and without spaces - instead of spaces you can use the symbol "_". The maximum length of the text in the "Item name" field of the message template is 512 characters. The name must be unique, not similar to the names of the elements of other templates.
  • Title - Optional text that will be displayed in bold in the header of the template. The maximum number of characters is 60. Emojis cannot be used.
  • Content - This is the main text of the template that will be sent to the client.

The message should contain maximum 1024 symbols.

  • Signature - Optional text that will be displayed in the template in small font. The maximum number of characters is 60. Emojis cannot be used.
  • Example - In the "Example" field, duplicate the main text of the "Content" field and be sure to specify the approximate values for the variables. This is necessary for the moderation of the template by WhatsApp.

How to handle variables

Variables are in curly braces: two on the left and two on the right. Example: {{1}}, {{2}}, etc.
You can substitute names, addresses, product names, and any other data into the variables. The substitution takes place when the template is sent.

Example of a template:

Button adding

You can add a button with a link (URL), phone number (Phone Number), or quick reply (QUICK REPLY). 

  • URL – a user will follow a link by clicking the button;
  • Phone Number – a user will call the specified number by clicking the button;
  • QUICK REPLY – a user may select the offered answer option.

1) The URL can (but does not have to) be used with the Phone Number;
2) QUICK REPLY cannot be used with other button categories;
3) You cannot add more than one URL or Phone Number button. For example, if you've already added a URL button, you can't add another URL.

Button name - enter the text visible for a user. For example, «Go to the website». The maximum length of the text for the button is 20 characters.

Button value - Set the action that will happen when the button is clicked. For example, insert a link to the site so that when the client clicks, your page opens.

QUICK REPLY - If you have a bot set up, you can set a command for the bot in the QUICK REPLY buttons. For example, if you want to collect subscribers for the newsletter, use the command "/subscribe".

Category, type and language of the template

Select a template category - UTILITY, MARKETING or AUTHENTICATION.
Learn more about categories - WhatsApp Business API Template Examples.

Select a template type - Text, Image, Document, Video, Location.

If the template contains only text - select the type Text.

If the template contains an Image, Document, Video, or Location, select the appropriate Image, Document, Video or Location.

Add a "Sample File" for Image, Document, Video. This is needed to pass moderation. In the future, you will be able to send any files.

Template language - select the language in which the message is written. You cannot set the English language and write the message in French.

Reasons why WhatsApp can reject a template

  1. Misspelling and grammatical errors.
  2. Incorrectly formed variables.
  3. Parameters, the purpose of which is not clear from the context.
  4. The selected language does not match the template language or there are words from several languages in the message.
  5. Template content violates WhatsApp policy – more read here.

More recommendations

  1. If you want to send a message template in order to check connection to API, use the correct format. All other versions will be rejected.
    Message template title: test
    Text: Hello {{1}};
  2. Do not use services for URL shortening (such as bit.ly, tinyurl and goo.gl) since they hide the target IP address of the link.
  3. Domain in the URL should refer to your company.

List of all restrictions here.

Just as you press «Create», the template goes for moderation. Moderation may take up to 24 hours.

There are 3 types of templates in the list:

  • Approved – green
  • Rejected – red
  • Under moderation – blue

If your template is rejected, you need to recreate it with allowance for mistakes made. Do not forget to give a new name for an element.

If the template is accepted, you can send it to the mailing list.

Leave a request for integrator services