Skip to main content

Show or hide blocks based on transactional parameters

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.

Before you start

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:

  1. Select the desired block.
  2. Click the eye icon to open the Block visibility popup.
    mceclip4.png
  3. Choose whether the block should be visible when one or all conditions are true.
  4. In the first drop-down menu, select transactional params.
  5. 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.
  6. Select the format of the parameter:
    • text
    • number
    • boolean
    • date
    • not needed
  7. Select an operator. The operators available depend on the format of the parameter (text, date, boolean, etc.).
  8. Enter or select the value of the condition.
  9. If necessary, add one or more conditions by clicking + Add more conditions.
  10. Click Insert conditions when you are done adding all conditions.2021-09-22_14-46-09.gif
💡 Good to know
When conditions are inserted, the eye icon turns green.

⏩ 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.

💬 Was this article helpful?

2 out of 5 found this helpful