Show or hide blocks based on transactional parameters

Sendinblue 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 Sendinblue 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

The procedure is different according to the editor you're using. Display specific content to different recipients based on transactional parameters:

Using the Drag & Drop Editor (Classic)

mceclip2.png

Using the New Drag & Drop Editor

mceclip0.png

Personalize your email in the Drag & Drop Editor (Classic)

By default, each design block is visible to all recipients. If you want to add conditions to only display a design block to specific recipients:

  1. Select the desired block
  2. Click the pencil icon to open the block settings
  3. Enable the Conditional display option
  4. In the first drop-down list, select 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. Configure the remaining fields according to your needs. In our example, we use a numeric format for the RSVP parameter and display unique promotional blocks based on these conditions: 
    • RSVP for 0 tickets - basic event promotion  
    • RSVP for 1 ticket - thank customer for single ticket purchase, suggest inviting a friend
    • RSVP for 2 tickets - thank customer for group purchase, suggest purchasing a table  

GIF_5_NEW.gif

Personalize your email in the New Drag & Drop Editor

❗️ Important
We can activate the New Drag & Drop Editor on demand for your account.

The Show or hide block option is only available to use based on contact attributes in the New Drag & Drop Editor.

However, you can still manage the visibility of blocks based on transactional parameters by manually inserting the if tag in your email template. To learn more about how to use the if tag in an email template to hide or display a block, refer to our dedicated article: Customize your emails with "IF" conditions.

⏩ What's next?