Skip to content

Commit 6a63cc2

Browse files
authored
Merge pull request #422 from glific/HSM-Template.md
Update and rename 06. Templates.md to 06. HSM Templates.md
2 parents 843d927 + 9855034 commit 6a63cc2

File tree

1 file changed

+139
-82
lines changed

1 file changed

+139
-82
lines changed

docs/4. Product Features/06. Templates.md renamed to docs/4. Product Features/06. HSM Templates.md

Lines changed: 139 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
1-
> ### **6 minutes read                                                                                                               `Beginner`**
21

3-
**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.**
2+
<h3>
3+
<table>
4+
<tr>
5+
<td><b>10 minutes read</b></td>
6+
<td style={{ paddingLeft: '40px' }}><b>Level: Beginner</b></td>
7+
<td style={{ paddingLeft: '40px' }}><b>Last Updated: October 2025</b></td>
8+
</tr>
9+
</table>
10+
</h3>
11+
12+
13+
**HSM (Highly Structured Message) templates are pre-approved message formats required for sending outbound messages to contacts outside the 24-hour WhatsApp session window.
14+
These templates help ensure compliance with WhatsApp’s policies and are commonly used to send notifications, alerts, or support messages.
15+
Templates can include placeholders for personalized content and are essential for initiating conversations once the 24- hour session window has expired.**
416

517
---
618

7-
## Prerequisites
19+
Session Window - A session window refers to the 24-hour period following a user's initial interaction with your business on WhatsApp. During this time, you can send unlimited messages to the user without additional costs. If the user doesn't respond within that window, you must wait for them to initiate contact again or use a pre-approved message template to reach out.This mechanism ensures that businesses can engage with users promptly while maintaining compliance with Meta's messaging policies.
20+
21+
## When to Use HSM Templates:
22+
23+
**Use them for:**
24+
25+
- For initiating conversation with the contacts after the 24-hour session window is closed, such as sending reminders or important follow-ups.
826

9-
- [Flow Variables](https://glific.github.io/docs/docs/category/flow-variables)
10-
- [Glific Simulator](https://glific.github.io/docs/docs/Product%20Features/Others/All%20product%20features/#simulator)
27+
28+
- For broadcasting standardized updates, like activity schedules, weather alerts, crop advisories, appointment confirmations, service announcements,programs and events
1129

1230
---
1331

@@ -19,7 +37,8 @@
1937
<br />
2038
2. Click on `+ CREATE` button from the top right corner of Templates page.
2139

22-
<img width="1275" alt="Screenshot 2024-03-06 at 2 47 56 PM" src="https://github.com/glific/docs/assets/122982753/41ae94bf-8bea-4473-ac9b-f6f8638ca94a"/>
40+
<img width="537" height="312" alt="image" src="https://github.com/user-attachments/assets/05d5ef7d-41c4-4bbf-8368-1e425d0880ff" />
41+
2342
<br />
2443
<br />
2544

@@ -31,68 +50,134 @@
3150
<br />
3251

3352
4. Fill in the following details in the form.
34-
1. `Language` - Select the language from the dropdown you want in your HSM template message.
35-
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
36-
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
37-
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).
38-
5. `Is Active`- the check box is by default checked. Keep it checked.
39-
6. `Message` - Type the message you want to send to users in this HSM template.
40-
7. `Footer` - Add the message which you want to act like a subtext
41-
8. `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.
42-
9. `Category` - Select the most relevant category from the dropdown. Ex. Utility or Marketing
43-
10. `Attachment type` - An image, video or document can be sent as an attachment with the HSM template.
44-
11. `Attachment URL` - Provide an example referece to the attachment that will be sent
45-
(for more info please follow : https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines)
4653

47-
---
54+
a.`Is Active`- the check box is by default checked. Keep it checked.
55+
56+
b. `Language` - Select the preferred language from the dropdown to ensure the template gets approved in that specific language.
4857

49-
## Buttons in HSM Template
58+
<img width="517" height="216" alt="image" src="https://github.com/user-attachments/assets/fc0e56bd-a743-4b04-91e4-378e351fb2b9" />
5059

51-
You can use `Add Buttons` checkbox to use buttons in HSM templates.
60+
c. `Translate existing HSM` - Select this if the HSM template you are trying to apply has a language variant of an existing HSM template in a different language. If not then no need to enable it.
61+
62+
d. `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.
63+
64+
e. `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,
65+
Activity Preference).
66+
67+
<img width="410" height="337" alt="image" src="https://github.com/user-attachments/assets/9e45eae4-6a92-4058-8083-9963e380afe9" />
68+
_(Ensure Title and Template Name are not identical to avoid mapping issues.)_
5269

53-
<img width="467" alt="image" src="https://github.com/glific/docs/assets/122982753/2fa202d1-5d6c-4f3c-b3dc-bbf2231bba95"/>
5470

55-
<br />
56-
**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.
71+
f. `Message` - Type the message you want to send to users in this HSM template.
5772

58-
<img width="503" alt="Screenshot 2024-07-01 at 5 13 14 PM" src="https://github.com/glific/docs/assets/141305477/09ec727f-46bf-4242-a95a-caebb6763491"/>
73+
g. `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.
5974

60-
### How to use Dynamic URLs in Buttons
75+
<img width="401" height="360" alt="image" src="https://github.com/user-attachments/assets/aa9960c3-1d6c-4e75-9c60-71598eccf293" />
6176

62-
Add a variable like \{\{1\}\} at the end of the URL and add it to the **Call to Action** option
77+
78+
h. `Footer` - Add the message which you want to act like a subtext.
6379

64-
<img width="484" alt="image" src="https://github.com/glific/docs/assets/122982753/6f730ad0-0e98-41b0-a4be-36d9d5d3ea9b"/>
80+
i. `Add Buttons` - You can use `Add Buttons` checkbox to use buttons in HSM templates.
81+
82+
- Quick Replies is selected by default which allows to add 3 buttons to the message
6583

66-
<br />
84+
<img width="511" height="375" alt="image" src="https://github.com/user-attachments/assets/37d8050b-2a3d-420c-8c90-f9910eca6994" />
6785

68-
---
86+
- Call to action buttons: Add a Call to Action (CTA) button in an HSM (template) message when the recipient is expected to take a specific action directly from the message.
6987

70-
## Attachments in HSM Template
88+
<img width="506" height="387" alt="image" src="https://github.com/user-attachments/assets/460cf615-e772-41ce-a837-babddce2e5e7" />
7189

72-
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.
90+
- There are two main options:
7391

74-
The attachment URL is the sample URL, the exact attachment URL could be added while [configuring the HSM template in the flow](https://glific.github.io/docs/docs/Flows/Flow%20Actions/How%20to%20use%20HSM%20template%20messages%20in%20your%20flows/).
92+
- **Phone number** and **URL**.
93+
94+
- **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.
7595

76-
1. `Attachment Type` - Select the attachment type if you wish to send an attachment in your HSM template message Ex. Image, Audio, Video, etc...
77-
2. `Attachment URL`- Paste the attachment URL ( public URL) from the GCS bucket. Refer [How to upload files on GCS?](https://glific.github.io/docs/docs/Integrations/How%20to%20upload%20files%20on%20GCS/) to copy public URL from GCS
96+
- If selected **URL**, must choose between **Static** and **Dynamic** links.
97+
98+
Here's a simple explanation with examples:
7899

79-
<br />
80-
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.
100+
**Static URL**
101+
102+
- A Static URL is a fixed link. It will be the same for everyone who receives the message.
103+
104+
- Use it when the link doesn't change.
105+
106+
107+
**Example:**
108+
109+
- Sending a message about online training. The requirement is that all users visit the same registration page.
110+
Button Title: Register Now
111+
112+
- Button Value: https://myngo.org/register
113+
114+
- All users will see the button “Register Now” and clicking it will take them to https://xxxxx.org/register.
115+
116+
**Dynamic URL**
117+
118+
- A Dynamic URL changes for each user. Personalize the link by adding contact-specific data (like name, ID, or custom fields).
119+
120+
- Use it when the link includes unique details per user.
121+
122+
123+
**Example:**
124+
125+
- Send a personalized health report to each user.
126+
- Button Title: View Report.
127+
- Button Value: https://xxxx.org/report/{{1}}
128+
129+
- Sample Suffi- x: 12345 (so the full link becomes https://xxxx.org/report/12345)
130+
131+
- When sent, `{{1}}` will be replaced by the user's specific ID, like 12345 or abc678.
132+
133+
134+
<img width="503" alt="Screenshot 2024-07-01 at 5 13 14 PM" src="https://github.com/glific/docs/assets/141305477/09ec727f-46bf-4242-a95a-caebb6763491"/>
135+
136+
137+
j. `Category` - Select the most relevant category from the dropdown. Ex. Utility or Marketing.
138+
139+
- Utility: Used for transactional messages to keep your customers in the loop with essential order updates, shipping status, about their accounts, orders, appointment reminders, and important alerts.
140+
141+
- Marketing: Elevate your brand by sending promotional content, announcing new products, and offering special deals to captivate your audience. For instance, promotional messages, including special offers, product launches, and loyalty programs
142+
143+
144+
k. `Attachment type` - Select the attachment type to send an attachment in your HSM template message Ex. Image, Audio, Video, etc.
145+
146+
l. `Attachment URL` - Paste the attachment URL ( public URL) from the GCS bucket. Refer [Upload files on GCS](https://glific.github.io/docs/docs/Pre%20Onboarding/GCS%20Setup/Upload%20files%20on%20GCS/#upload-media-files-in-the-gcs-bucket)
147+
Note - 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.For more info please check [this]( https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines)
148+
149+
Notice a simulator available in the form, as you will fill in the details of the HSM template, it will start previewing the message.
150+
Simulator helps you to get an idea about how the message will look like when the contact receives it.
81151

82152
<img width="365" alt="image" src="https://github.com/glific/docs/assets/122982753/b9aee8df-29bd-41cf-bdcb-1742ffabd6c7"/>
83153
<br />
84-
1. As discussed above, click on `SUBMIT FOR APPROVAL` button to send the HSM template for approval.
85154

86-
<img width="468" alt="Screenshot 2024-03-06 at 2 57 02 PM" src="https://github.com/glific/docs/assets/122982753/a2c7928f-0b97-4231-bb25-48afa8a50796"/>
87-
<br />
155+
m. `Tag`s - Add tags if required, not a mandatory step.
88156

89-
2. Generally it takes a maximum of 2 mins to 48 hours to get approval from WhatsApp.
90-
3. 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`
91-
4. 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
157+
n. Click on `Submit for Approval`,
158+
- Click on 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`
159+
160+
<img width="507" height="121" alt="image" src="https://github.com/user-attachments/assets/3430e9d6-b348-49be-abdf-816997754279" />
161+
162+
Generally it takes a maximum of `2 mins to 48 hours` to get approval from WhatsApp.
163+
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
92164

93165
<img width="1243" alt="image" src="https://github.com/glific/docs/assets/122982753/e14e89c0-b8fe-439d-9a84-03679790d858"/>
94166
<br />
95167

168+
## What if My Template Is Rejected?
169+
170+
- Rejected templates cannot be edited and re‑submitted.
171+
172+
- A new template must be created to replace the rejected one.
173+
174+
175+
## Can I Edit a Template After Approval?
176+
177+
- No, WhatsApp approval is immutable.
178+
179+
- To make changes, create and submit a new template.
180+
96181
---
97182

98183
## How to use HSM Templates in your flows
@@ -109,7 +194,7 @@ You can use approved HSM templates in your flow, to send to multiple users autom
109194

110195
1 . Select `Send Message` action type in the node.
111196

112-
2 . Click on `WhatsApp` tab
197+
2 . Click on `HSM Template` tab
113198

114199
![image](https://user-images.githubusercontent.com/32592458/218255870-dea659b0-421f-4383-a65f-9dbdd500eb00.png)
115200

@@ -145,7 +230,7 @@ When the templates are already approved, simply add it in the default language,
145230

146231
Steps 1: Create and Approve English Template
147232

148-
1. Click Create Template.
233+
1. Click `Create Template.`
149234
2. Fill in the template in English, with a unique element name.
150235
3. Choose category (e.g., Utility, Marketing).
151236
4. Submit the template for approval.
@@ -157,13 +242,15 @@ Steps 1: Create and Approve English Template
157242

158243
Step 2: Create the Template in Another Language (e.g., Hindi)
159244

160-
1. Click “Create Template.”
161-
2. Select “Language Variant” from the drop-down.
245+
1. Click `Create Template.`
246+
247+
2. Select `Language Variant` from the drop-down.
162248

163249
<img width="519" alt="image" src="https://github.com/user-attachments/assets/918237e0-6b73-42fc-b7a2-33bc4803e542"/>
164250

165251
3. Choose the target language (e.g., Hindi).
166-
4. Important: Check the “Translate existing HSM” box.
252+
253+
4. Important: Check the `Translate existing HSM` box.
167254

168255
<img width="519" alt="image" src="https://github.com/user-attachments/assets/29300f35-8e13-4e3a-a8bd-8d0d8bc54028"/>
169256

@@ -172,8 +259,11 @@ Step 2: Create the Template in Another Language (e.g., Hindi)
172259
_This reveals a dropdown of element names from already approved HSM templates._
173260

174261
5. Select the same element name as the English template (e.g., multi_lingual_hsm_test).
262+
175263
6. Alternatively, Enter the same Element Name as the approved English version. (_This links both templates under the same template family_)
264+
176265
7. Input the translated version of the HSM message in Hindi
266+
177267
8. Submit for approval.
178268

179269
**Hindi**
@@ -183,6 +273,7 @@ Step 2: Create the Template in Another Language (e.g., Hindi)
183273
Step 3: Repeat for Other Languages (Optional)
184274

185275
1. Follow Step 2 for additional languages (e.g., Marathi, Kannada, Tamil).
276+
186277
2. Always ensure:
187278
Same element name
188279
Accurate translation
@@ -259,41 +350,7 @@ By default, there is a **limit of 250 HSM templates per phone number**. If incas
259350
1. **GIFs are not allowed** in HSM attachments. If you add Gifs as an attachment, it will be rejected.
260351
<br />
261352

262-
## Sync the HSM messages from Gupshup-
263-
264-
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,
265-
266-
<img width="1290" alt="image" src="https://github.com/glific/docs/assets/122982753/5c3459a8-8f59-443d-a0f7-94c08d562c34"/>
267-
<br />
268-
269-
## How to check the reason for HSM rejection.
270-
271-
1 . Log in to Gupshup ([https://www.gupshup.io/](https://www.gupshup.io/)).
272-
<br />
273-
274-
2 . Click on the `setting` Icon of your app.
275-
276-
![image](https://user-images.githubusercontent.com/32592458/212646256-0c2b8344-fd51-4799-9864-ba3bdd7aa782.png)
277-
<br />
278-
279-
3 . Click on `manage templates` button .
280-
281-
![image](https://user-images.githubusercontent.com/32592458/212646283-dd377e27-519d-428f-8cdd-9355b53a9480.png)
282-
<br />
283-
284-
4 . Scroll down to the template you want to check. on the right top corner, check the section `Rejected by WhatsApp`.
285-
286-
![image](https://user-images.githubusercontent.com/32592458/212646394-dbc4f9ef-3014-4f8d-807f-fc97064bf37f.png)
287-
<br />
288-
289-
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.
290-
291-
[https://developers.facebook.com/docs/whatsapp/message-templates/guidelines/](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines/)
292-
293353
**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).
294354

295355
---
296356

297-
## Tags
298-
299-
HSM, HSM Messages, Template, Template Messages, Bulk Messages, Bulk HSM Upload, Bulk Applying of HSM Messages

0 commit comments

Comments
 (0)