Articles on: Message Templates

Personalize Templates using Variables

You can personalize your Message Templates using variables and send customer-specific data in the message when sending your Notifications.



Variables (also known as merge tags) works in a little different way in case of message templates in WhatsApp Cloud API from how it usually works at other places like email templates.

In case of WhatsApp, it’s a two step process:

Step 1 – Create Message Template



You need to first create a Message Template with your content and you need to put variable placeholders like {{ 1 }}, {{ 2 }}, {{ 3 }} and so on wherever you want the dynamic content to come. Note that the actual mapping of customer data with the variables do not happen during this step.

To learn how to create message templates, you can checkout our article here.

Step 2 – Create Notification and do variable mapping



After you get your message template approved, the next step is to create a Notification where you need to first select this Message Template.

After you select the template you get the option to map those variables ({{ 1 }}. {{ 2 }}, {{ 3 }} and so on) with actual data like First Name, Last Name, Phone Number, custom contact attributes, data fields from trigger (in case of transactional notifications) and so on under the Value column.

You can also add Fallback Value for each variable for cases when data from the actual Value field might come empty. For such cases the system will take value from the Fallback Value column.



If you’re coming from email marketing background, this process might look different from how it’s usually done. But as the template is sent to WhatsApp for approval, this is how they’ve made it to simplify the process.

Updated on: 12/07/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!