Customize your WhatsApp templates using transactional parameters that contain event-specific data. This will allow you to send WhatsApp messages containing your customer's order total amount, gate number at the airport, or promotional code, for example.
About transactional parameters for WhatsApp templates
What are transactional parameters?
Your transactional parameters contain information about the events tracked on your website or provided by your API. For example, the events can be order_completed or gate_changed, each containing specific data about your client. You can customize your WhatsApp messages using transactional parameters by inserting dynamic placeholders (or merge tags).
Transactional parameters placeholders are tags that pull event-specific information into your WhatsApp messages. Transactional parameters placeholders are automatically replaced by the personalized information for each recipient at the time your WhatsApp message is sent via an API call or an automation.
WhatsApp template | Result in the recipient's WhatsApp |
Which transactional parameter placeholders can be used for WhatsApp templates, and how are they structured?
Transactional parameter placeholders are structured as {{ params.parameterNAME }}, e.g. {{ params.total }}. To retrieve your parameterName, check your automations track event logs or API call:
Structure of transactional parameter placeholders for WhatsApp templates: {{ params.parameterNAME }} |
|
At the first level of the hierarchy, we have data. {{ params.parameterNAME }} where:
|
In your automations track event logs, your parameter names will appear like this:
Good to know
- Only the first hierarchy level of transactional parameters' data can be processed for WhatsApp templates. To learn more, check our dedicated section in this article.
- Only WhatsApp messages sent through an automation triggered by an event or through an API call to send transactional WhatsApp messages can be customized using transactional parameters.
- You will be charged at the rate of a utility WhatsApp message.
- Since the data to replace the transactional parameter placeholder is replaced at the moment of the sending, only the last triggered event will be displayed in the WhatsApp message. For example, if a customer purchases several times in a row on your website and you want to retrieve their order number, only the last order number triggered before the sending will replace the transactional parameter placeholder.
- Your existing transactional parameters manually created for email campaigns or passed through plugins cannot be used for WhatsApp templates. You need to (re)create them from the WhatsApp template editor using the data from your automations track event logs or API call.
- Transactional parameters for WhatsApp messages are not saved in our database and have to be created for every WhatsApp templates.
- Each transactional parameter for WhatsApp templates has to and can only be created from the WhatsApp template editor as explained below.
Create and insert transactional attributes in WhatsApp templates
To help you understand how to customize a WhatsApp template using transactional parameters, we created a use case for illustration purposes that you can easily adapt to your needs. We want to display the total price of our customer's order in the WhatsApp message. We will use the parameter names listed in the example above for reference:
- Create a WhatsApp template of Utility type, and access the design step.
- Add text to the Body of your message and place your cursor where you want your transactional parameter to appear in the text.
- Click Variable 👤. The Insert a variable side panel opens.
- In the Attribute drop-down list, enter
params.parameterNAME
whereparameterNAME
should be replaced by your transactional parameter name as it is passed via the API or as it appears in your event logs. In this example,params.total_after_coupon
. -
Click Create "
params.total_after_coupon
" in the drop-down. Your transactional parameter is automatically created and selected as a transactional attribute in the list. - In the Value if empty field, enter a default value to insert if your parameters attribute is empty.
- Click Save.
- Continue to design your WhatsApp template and submit it for approval.
- Never add variable parameters at the beginning or end of your body text,
- Never use only variables in the body,
- Never put two variables next to each other, or
- Never insert a variable that contains special characters such as #, $, or %.
Congratulations! 🎉 Once your WhatsApp template is approved by Meta, you can use it in your automations. Your transactional parameter will be replaced by the data it contains. To learn more, check our dedicated article Send WhatsApp messages through an automation.
⏭️ What's next?
🤔 Have a question?
If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.
If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo expert partner.