HSM templates in the WhatsApp Business API

What are HSM templates?

HSM (Highly Structured Message) templates are pre-agreed with Meta standard messages that businesses can use to start communicating with customers via the WhatsApp Business API. Messages can include appointment reminders, delivery information, payment updates, etc.

Templates are created and approved via WhatsApp Manager.

A template can include a header (text or attachments: images, videos, PDFs), body text with the ability to add variables, a footer, and buttons.


A 24-hour window for communication

WhatsApp Business uses 24-hour sessions for messaging.

When a customer sends a message to your number, a 24-hour window opens during which you can write free-form messages to users.

Outside of the 24-hour customer service window, you can only send HSM-approved templates. As soon as a customer replies to a template message, a new 24-hour window for communication opens.

Using HSM templates allows you to initiate a dialogue even with customers who have not yet written to the company.


Sending an HSM template from NovaTalks

To send an HSM template from NovaTalks, in the message sending panel, enter the text in the appropriate markup consisting of several lines:

  • @HSM@ - a label that informs the system that an HSM template is being sent.

  • template_name|language - the name of the template in lowercase with lowercase underscore and the language code. They must be the same as in the Meta template builder.

  • Template variables - names of the template variables (if exists).

If the template contains an attachment, it must be attached to the message.

Features of adding variables:

  • If several variables are used in a template, each variable must be written on a new line in the sequence specified in the template.

  • If the template contains a button that contains a variable, the value of this variable must be added to the markup.

  • If the template contains variables and they are not specified in the message, the template will not be sent.

  • If the template contains a Copy Code button, the code must be specified twice in the markup of the message to be sent from NovaTalks: as a variable value in the body text and as a variable value for the button.

  • You can substitute NovaTalks variables. To do this, enter two double curly brackets {{ in the corresponding line, after which a list of available variables will appear.

After sending the template, the text and other elements from the template registered in WhatsApp Manager will be added to the message that will be sent to the client.

The NovaTalks user will see it as a markup in the message history window in Conversation.

Before sending the template, make sure that the message does not contain any extra spaces or characters and that it follows the structure. Otherwise, it will not be delivered.

For convenience, we recommend adding the HSM template structure to Canned responces.


Examples of HSM templates

HSM template without variables and attachments

Setting up a template in Meta:

Marking up a template for submission to NovaTalks

The message that the client will receive:

HSM template with variables in the main text

Setting up a template in Meta:

Marking up a template for submission to NovaTalks:

The message that the client will receive:

HSM template using the NovaTalks variable

Setting up a template in Meta:

Marking up a template for submission to NovaTalks:

The message that the client will receive:

HSM template with a Button

Setting up a template in Meta:

Marking up a template for submission to NovaTalks:

The message that the client will receive:

HSM template with variables in the Header, Body and Button

Setting up a template in Meta:

Marking up a template for submission to NovaTalks:

The message that the client will receive:

HSM template with attachment

Setting up a template in Meta:

Marking up a template for submission to NovaTalks:

The message that the client will receive:

HSM Authentication template

Setting up a template in Meta:

Marking up a template for submission to NovaTalks:

The message that the client will receive:

Last updated