Show or hide content based on transactional parameters

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.

Before you start

❓ 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: 

  1. Select the content you want to show only to some recipients with specific contact attributes.
    ❗️ Important
    Ensure 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.
  2. From the side panel, open the Content visibility section and click + Add condition.dde_access-visibility-transac_EN-US.png
  3. In the Add display conditions popup, choose the conditions in which your content should display:
    1. From the top drop-down list, choose whether the content should be visible when only one or all conditions are true.
    2. From the first drop-down, select transactional params.
    3. 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.
    4. Select the format of your parameter: text, number, boolean, date, or not needed. 
    5. 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.
    6. 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
    7. Add one or more conditions if necessary by clicking + Add another condition.
    8. Click Add condition when you are done adding all conditions.2021-09-22_14-46-09.gif

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?

🤔 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?

3 out of 11 found this helpful