Brevo allows you to design email templates and campaigns that display unique content elements to different recipients depending on the conditions you set.
We have divided this topic into 3 articles. In this first article, we will explain how to show or hide content based on transactional parameters.
- Show or hide content based on contact attributes
- Show or hide content based on transactional parameters - YOU ARE HERE
- Show or hide content based on repeatable content
Before you start
- If you are not familiar with transactional parameters, please refer to our dedicated article: Customize your emails using transactional parameters.
- Check our dedicated article to understand the differences between sections and content blocks and ensure you will apply display conditions to the right content.
- To ensure that your email's content is displayed correctly, test your email.
❓ How transactional parameters influence the display of specific content to different recipients?
Transactional parameters allow you to display specific content (image, title, text, section etc.) based on your contacts' behavior on your website or in your emails.
Transactional parameters are variables that are not saved in your Brevo contacts list but rather are passed as a component of your API call or retrieved through an Automation workflow triggered by an event to send a transactional email.
Let's imagine that we want to create a purchase receipt email template with a promotional block about an upcoming event that will be displayed based on our contacts' behavior:
- If they didn't purchase any tickets, display a basic event promotion,
- If they purchased 1 ticket, display a thank-you note for 1 person and suggest inviting a friend,
- If they purchased 2 or more tickets, display a thank-you note for a group and suggest purchasing a table.
Show specific content to different recipients based on transactional parameters
By default, each content is visible to all recipients. However, if you want to display content only to specific recipients based on transactional parameters, you have to apply display conditions. Recipients with different or empty contact attributes cannot see this content.
To apply display conditions:
- Select the content you want to show only to some recipients with specific contact attributes.
❗️ ImportantEnsure you have selected the right content. For example, if you want to show a text block only to some recipients, ensure you selected only the block and not the entire section in which it is contained. To learn more, check our dedicated article Differences between sections and content blocks.
- From the side panel, open the Content visibility section and click + Add condition.
- In the Add display conditions popup, choose the conditions in which your content should display:
- From the top drop-down list, choose whether the content should be visible when only one or all conditions are true.
- From the first drop-down, select transactional params.
- In the key field, enter your parameter name. For example, to insert a number of guests for an event where the parameter is
{{ params.RSVP }}
, simply enter RSVP as your parameter name.
To learn where to find your parameter, check our dedicated article Customize your emails using transactional parameters. - Select the format of your parameter: text, number, boolean, date, or not needed.
- Select the operator for your condition.
In our example, we will select = equals because we want to display our content based on the number of purchased tickets. - Enter or select the value of your condition.
In our example, we want to display our basic event promotion to recipients who did not purchase tickets, so we will enter 0. - Add one or more conditions if necessary by clicking + Add another condition.
- Click Add condition when you are done adding all conditions.
Congratulations! 🎉 You have applied display conditions. When conditions are inserted, the content border turns green and features a slashed eye icon. Click it if you need to edit your condition.
⏩ What's next?
- Show or hide content based on contact attributes
- Show or hide content based on repeatable content
- Customize your emails with "IF" conditions
- Test your emails customized with Brevo Template Language
- Troubleshoot your emails customized with Brevo Template Language
🤔 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.