Customize your WhatsApp messages using transactional parameters

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. 

❗️ Important
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.

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
wa_transac-template_EN-US.png wa_transac-result_EN-US.png

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.
For all the elements within data, the placeholder will be: 

{{ params.parameterNAME }} where:

  • params corresponds to data and stays as is,
  • parameterNAME should be replaced with the data contained in data, such as coupon, id, currency...
wa_transac-attribute-placeholder_EN-US.png
❗️ Important
All hierarchy levels below data cannot be retrieved for WhatsApp templates. Only the first hierarchy level of transactional parameters' data can be processed for WhatsApp templates.  

In your automations track event logs, your parameter names will appear like this: 

wa_event-logs-transac-attributes_EN-US.png

Good to know

  • Only the first hierarchy level of transactional parameters' data can be processed for WhatsApp templates:
    wa_transac-attribute-placeholder-not2nd-level_EN-US copy.png
  • 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.
  • 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:

  1. Create a WhatsApp template and access the design step. 
  2. Add text to the Body of your message and place your cursor where you want your transactional parameter to appear in the text. 
  3. Click Variable 👤. The Insert a variable side panel opens. 
  4. In the Attribute drop-down list, enter params.parameterNAME where parameterNAME 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.
  5. 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. 
  6. In the Value if empty field, enter a default value to insert if your parameters attribute is empty.
  7. Click Save.
    wa_create-insert-transac-param_EN-US.png
  8. Continue to design your WhatsApp template and submit it for approval. 
❗️ Important
To prevent your WhatsApp campaign from being rejected:
- 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.

💬 Was this article helpful?

0 out of 4 found this helpful