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.

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?