How to use Variables in Message Template
Learn how to use variables in the message template on DoubleTick. Dynamically introduce user information like names, contact details, date, time and much more.
Last updated
Learn how to use variables in the message template on DoubleTick. Dynamically introduce user information like names, contact details, date, time and much more.
Last updated
WhatsApp Business API supports various variables that can be used to personalize messages and interactions with users. These variables allow businesses to dynamically insert user-specific information into their messages.
Some common variables include: 👇
{{1}}, {{2}}, {{3}}, etc.: These are placeholders for dynamic content. They can be used to insert variables such as user's name, order number, transaction amount, etc.
{{contact.name}}: Inserts the name of the contact.
{{contact.phone}}: Inserts the phone number of the contact.
{{contact.id}}: Inserts the unique ID of the contact.
{{datetime}}: Inserts the date and time of the message.
{{message.content}}: Inserts the content of the message.
{{company.name}}: Inserts the name of the business.
{{company.phone}}: Inserts the phone number of the business.
{{company.address}}: Inserts the address of the business.
These variables can be used within message templates or dynamic message content to provide personalized experiences for users.
Before submitting a template, it's crucial to include sample variables, if you've added variables within the message content.
Sample variables allow WhatsApp to understand how the message will appear with dynamic content inserted, ensuring that the template is correctly formatted and personalized for users.
For example, if you have a message template that includes the variable {{contact.name}} to insert the contact's name, you should provide a sample variable like "John" or "Jane" to demonstrate how the message will look with the actual contact's name inserted.