Skip to main content

Templates

6 minutes read                                                                                                               Beginner

HSM (Highly Structured Message) templates are pre-approved messages by Whatsapp which are used to send to the users when their session window is closed (i.e after 24hours of inactive conversation). These templates ensure compliance with WhatsApp's guidelines and allow NGO's to send notifications, customer support messages and alerts with placeholders for personalized information.


Prerequisites


HSM Template Creation & Approval Submission

  1. Login to Glific and click on the Quick tools-->Templates option from left panel
image
  1. Click on + CREATE button from the top right corner of Templates page.
Screenshot 2024-03-06 at 2 47 56 PM

  1. Add A New HSM Template page opens up.
Screenshot 2024-07-01 at 4 57 35 PM

  1. Fill in the following details in the form.
    1. Language - Select the language from the dropdown you want in your HSM template message.
    2. Translate existing HSM - Select this if the HSM template you're trying to apply is a language variant of an existing HSM template in a different langauge
    3. Element Name - Provide a title for WABA namespace for the HSM template. Incase the translate existing HSM is selected, this field becomes a drop down. From the list select the element name of the HSM template for which the language variant is being applied
    4. Title - Enter the name you want for your HSM Template as it would appear in Glific (It should be what use case does this template serves eg. OTP, Optin, Activity Preference).
    5. Is Active- the check box is by default checked. Keep it checked.
    6. Message - Type the message you want to send to users in this HSM template.
    7. Add Variable - Click on add variable if you'd like to insert a variable values (ex- preferred names, locations, any other value being captured in flow or contact variables). This provides further fields below to enter a sample value for the variables.
    8. Category - Select the most relevant category from the dropdown. Ex. Utility or Marketing
    9. Attachment type - An image, video or document can be sent as an attachment with the HSM template.
    10. Attachment URL - Provide an example referece to the attachment that will be sent (for more info please follow : https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines)

Buttons in HSM Template

You can use Add Buttons checkbox to use buttons in HSM templates.

image

Note:- Phone numbers without country code (for example Exotel numbers) will be added in HSM as an Call to actions option. As a workaround, you can add these numbers in the body of the message.

Screenshot 2024-07-01 at 5 13 14 PM

How to use Dynamic URLs in Buttons

Add a variable like {{1}} at the end of the URL and add it to the Call to Action option

image

Attachments in HSM Template

The below fields (Attachment Type & URL) are optional. it needs to be filled only if an attachment is required to be sent in the HSM template to the beneficiary.

The attachment URL is the sample URL, the exact attachment URL could be added while configuring the HSM template in the flow.

  1. Attachment Type - Select the attachment type if you wish to send an attachment in your HSM template message Ex. Image, Audio, Video, etc...
  2. Attachment URL- Paste the attachment URL ( public URL) from the GCS bucket. Refer How to upload files on GCS? to copy public URL from GCS

Notice a simulator available in the form, as you will fill in the details of the HSM template, it will start previewing the message. Simulator helps you to get an idea about how the message will look like when the contact receives it.

image
  1. As discussed above, click on SUBMIT FOR APPROVAL button to send the HSM template for approval.
Screenshot 2024-03-06 at 2 57 02 PM
  1. Generally it takes a maximum of 2 mins to 48 hours to get approval from WhatsApp.
  2. Try clicking in the Sync button on the HSM list page, after a couple of minutes to see the change in status of HSM from Pending to either Approved or Rejected
  3. Once you get your message approved, you can start sending it to your contacts. Verify that the Status of your message has turned Approved from the Templates page
image

How to use HSM Templates in your flows

Common messages used in flow are session messages, which are open to send only within the 24 hours of users sending a message. If beneficiary responds within 24 hours, the session remains active. After 24 hours NGO users cannot send messages on chat bot to the beneficiary, until they send some message from their WhatsApp.

Remaining hours of session messages expiry can be checked from contact list under search section in left pane.

image

WhatsApp provides HSM templates which can be sent after the 24 hours. These templates needs to be approved from WhatsApp before they can be used in the conversation. Please refer HSM Templates to know more how to create HSM templates in Glific.

You can use approved HSM templates in your flow, to send to multiple users automatically.

1 . Select Send Message action type in the node.

2 . Click on WhatsApp tab

image

3 . Select the HSM template you want to send from the dropdown list. Refer HSM Templates to know more about how to create HSM templates.

image

4 . Select the variable names to replace in the HSM template.

image

5 . Click on Ok button.

6 . Now when the flow will be executed this HSM template message will be send to the contact and will not expire in 24 hours.

image


Sending HSM Template to Contacts

Go to Chat window and to the particular contact to whom you want to send message. Click on upward arrow in the message box and click on the Templates tab there. You will see the message in the list of approved template messages. Select the message and send it to your contact.

image

Multi-lingual HSM templates

Glific has added a support to apply HSM messages for multiple templates by obtaining approval under the same element name. When the templates are already approved, simply add it in the default language, and other languages will be automatically tagged since the element name remains consistent.

Example

  1. Create a template in English and get it approved.
  2. Create a template in another language like - Hindi. Use the same title.
  3. Now when adding the template in flow, you can add English template in default language flow. If contact selects a different language (Hindi), then the Hindi version of HSM will be send to the contact. It chooses the language specific HSM automatically based on the selection of language by the end-user.

English

image

Hindi

image

Bulk Apply HSM Templates

Multiple templates can also be applied by using Bulk Apply HSM templates using Google Sheet

  1. Open this sample Google Sheet

  2. Click on File and then Make a copy to create a copy of the sheet image

  3. Fill in details for templates in rows. Here's what each column represent in the sheet

    1. Language: Select the language from the dropdown you want in your HSM template message. Title: Enter the name you want for your HSM Template as it would appear in Glific (It should be what use case does this template serve eg. OTP, Optin, Activity Preference).
    2. Message: Type the message you want to send to users in this HSM template. You can use Variables and interactive actions in your message. Follow the syntax below in your message.
      1. Variable format - {{1}}
      2. Button format - [Button text, Value] (where value can be URL or phone number)
    3. Sample Message: Replace the variables in the message content with actual values to show a complete message.
    4. Element Name: The name of a template that is unique for a WABAs namespace.
    5. Category: The category of HSM template. Values can be either UTILITY, MARKETING or AUTHENTICATION.
    6. Attachment Type: The Attachment type of template can be either image, video or document
    7. Attachment URL: The Attachment URL should be public URL of a file that follows these facebook guidelines
    8. Has Buttons: If the template has buttons, change the value from dropdown to TRUE else FALSE
    9. Button Type: Button Type can be either CALL_TO_ACTION or QUICK_REPLY
    10. CTA Button 1 Type: When button type is CALL_TO_ACTION this can be either Phone Number or URL
    11. CTA Button 1 Title: Text that would appear in button e.g. Call us here
    12. CTA Button 1 Value: Value of button e.g. Phone number
    13. CTA Button 2 Type: When button type is CALL_TO_ACTION this can be either Phone Number or URL
    14. CTA Button 2 Title: Text that would appear in button e.g. Visit us here
    15. CTA Button 2 Value: Value of button e.g. https://glific.org/
    16. Quick Reply 1 Title: Add Text that would appear on first button when button type is QUICK_REPLY
    17. Quick Reply 2 Title: Add Text that would appear on second button when button type is QUICK_REPLY
    18. Quick Reply 3 Title: Add Text that would appear on third button when button type is QUICK_REPLY
  4. Click on File -> Download -> Comma Separated Values(.csv) to download sheet in csv format

image


  1. Go to Templates screen, click on BULK APPLY and choose the downloaded csv file.
Screenshot 2024-03-06 at 3 08 02 PM
  1. Templates will be applied and will create a new CSV file with the status of each template.

image


HSM templates limit

By default, there is a limit of 250 HSM templates per phone number. If incase more HSM templates are required, then you need to submit a request to WhatsApp to increase the limit.



Suggestions to get the HSM template approved

  1. Avoid doing - Hi, here are the activities for today. We hope you complete them by the end of the day and submit them.
  2. Instead do - Hi @nameofperson, following are the activities we have assigned for you and we hope you can complete them and submit them by the end of the day. Thank you.
  3. Keeping the messages personal and interactive with an old beneficiary helps in the approval of the HSM template.
  4. GCS attachments link should be public and working for the beneficiary to access it.
  5. Use absolute URL in HSM text. Short URLs don't work and the template got rejected with an error message "Invalid format"
  6. Emojis are not allowed in HSM buttons. If you add emojis the template will be rejected.
  7. GIFs are not allowed in HSM attachments. If you add Gifs as an attachment, it will be rejected.

Sync the HSM messages from Gupshup-

  1. Sometimes it takes time to sync from Gupshup to Glific. To sync it instantly sync, click on Sync HSM at the top of the page,
image

How to check the reason for HSM rejection.

1 . Log in to Gupshup (https://www.gupshup.io/).


2 . Click on the setting Icon of your app.

image


3 . Click on manage templates button .

image


4 . Scroll down to the template you want to check. on the right top corner, check the section Rejected by WhatsApp.

image


If there are further any queries about the template getting rejected. Please check the below link to know some of the possible reasons why the HSM template must have gotten rejected.

https://developers.facebook.com/docs/whatsapp/message-templates/guidelines/

Note - The HSM templates need to be in one language. Do not mix the languages in one template (Ex. words of both English and Hindi language should not be in one HSM template).


Tags

HSM, HSM Messages, Template, Template Messages, Bulk Messages, Bulk HSM Upload, Bulk Applying of HSM Messages