How to design and publish SMS template.
Handlebarsjs
language. You can check how the message will look in the preview section on the right side.
The SMS template has 3 parts:
Live
or Rejected
. Once the version goes Live
, you can use the template to send to your users.
Field | Description |
---|---|
Message Type | There are 3 types of message - (1) Transactional- Service implicit or Informative messages which are triggered corresponding to a user’s action either done at the time of sending the message or based on past data. All other OTPs other than bank OTPs also fall in this category. e.g.- delivery updates, E-commerce website OTPs etc. (2) Promotional- All the marketing related messages where we have not taken any explicit consent from the user. e.g.- messages sent to promote or sell a product (3) Engagement- Service Explicit or Engagement messages which are triggered to re-engage the users back to platform like promoting new features and offers. e.g.- new feature promotion, discount offer messages to existing customers etc. |
Header | Header should be registered with DLT. Separate headers would be there for all the message types |
Body | SMS template added here should follow DLT template guidelines. Click here to view all DLT guidelines |
Declaring Variables in the global 'Mock data' button:
Using variables in the templates:
handlebarsjs
to add variables in the template. As a general rule, all the variables have to be entered within double curly brackets: {{variable\_name}}
If you have declared the variables and added sample data in the global Mock data
button, then they will come as auto-suggestions when you type a curly bracket {
. This will remove the chances of error like variable mismatch at the time of template rendering.Note that you will be able to enter a variable name even when you have not declared it inside the Variables
button. To manually enter the variable name, follow the handlerbarsjs guide here.Below are some examples of how to enter variables in the template design. For illustration, we are using the same sample variable names that we declared in the Templates
section:{{var1.var2.var3}}
. Eg. to refer to city in the example above, you need to enter {{event.location.city}}
{{event.[first name]}}
{{var1.[index].var2}}
. Eg. to refer to product_name
of the first element of the array array
, enter {{array.[0].product_name}}