Brevo allows you to design email templates and campaigns that display unique content elements to different recipient depending on the conditions you set.
We have divided this topic in 3 articles. In this second article, we will explain how to show or hide blocks of content based on transactional parameters.
- Show or hide blocks based on contact attributes
- Show or hide blocks based on transactional parameters - YOU ARE HERE
- Show or hide blocks based on repeatable blocks
Before you start
- If you are not familiar with transactional parameters, please refer to our dedicated article: Customize your emails using transactional parameters.
Display specific content to different recipients based on transactional parameters
Transactional parameters allow you to display a specific block (image, title, text, etc.) based on your contacts' behavior on your website or with your emails.
Transactional parameters are variables which 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 ticket, 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.
Personalize your email based on transactional parameters
Display specific content to different recipients based on transactional parameters. The procedure is different according to the editor you're using:
By default, each layout or content block is visible to all recipients. If you want to add conditions to only display a layout or content block to specific recipients based on transactional parameters:
- Select the desired block.
- Click the eye icon to open the Block visibility popup.
- Choose whether the block should be visible when one or all conditions are true.
- In the first drop-down menu, 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.
Note: if you don't know where to find your parameter, please refer to Customize your emails using transactional parameters to learn how to find it. - Select the format of the parameter:
- text
- number
- boolean
- date
- not needed
- Select an operator. The operators available depend on the format of the parameter (text, date, boolean, etc.).
- Enter or select the value of the condition.
- If necessary, add one or more conditions by clicking + Add more conditions.
- Click Insert conditions when you are done adding all conditions.
⏩ What's next?
- Show or hide blocks based on contact attributes
- Show or hide blocks based on repeatable blocks
- 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.