Show or hide blocks based on contact attributes

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 first article, we will explain how to show or hide blocks of content based on contact attributes:

Good to know

Display specific content to different recipients based on contact attributes

Contact attributes allow you to display a specific block (image, title, text, etc.) based on what you know about your recipient and have saved in your Sendinblue contact attributes. 

For example, let's say we have an online t-shirt store and want to send a personalized email campaign based on some of our contacts attributes:

  • Whether they are an existing customer or not (Boolean attribute)
  • Their favorite color (text attribute)
  • Their gender (category attribute)

Let's imagine that we know our customer's favorite color and their gender, but we don't know any details about our contacts who have not purchased yet. Our email will promote a t-shirt sale, and we will personalize the content using the data available for each contact.

Personalize your emails based on contact attributes

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

Using the Drag & Drop Editor (Classic)

mceclip0.png

Using the New Drag & Drop Editor

mceclip0.png

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

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

By default, all blocks are visible to recipients. If you want to add conditions to only display a 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 Contact attributes
  5. In the second drop-down list, select the contact attribute you want to base your condition on
  6. In the third-drop down list, select the operator you want to use in your condition
  7. In the Value field, enter the contact attribute value you want to use as your condition
  8. To go further, add AND or OR conditions to create more complex display conditions.
    GIF_1.gif

In our example, we personalized the image in our email based on our favorite color and gender contact attributes:

  • Image of a simple blue t-shirt: displayed to anyone whose attributes for favorite color is blue and whose gender is unknown
  • Image of a blue t-shirt worn by a male: displayed to anyone whose attributes for favorite color is blue and whose gender is male
  • Image of a blue t-shirt worn by a female: displayed to anyone whose attributes for favorite color is blue and whose gender is female
  • Image of a multicolor collection of t-shirts: displayed to anyone whose attribute for favorite color is not blue

Personalize your email in the New Drag & Drop Editor

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 contact attributes:

  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 drop-down menu, select contact attributes.
  5. Select a contact attribute.
  6. Select an operator. The operators available depend on the format of the contact attribute (text, date, boolean, etc.).
  7. Enter or select the value of the condition.
  8. If necessary, add one or more conditions by clicking + Add more conditions.
  9. Click Insert conditions when you are done adding all conditions.
    mceclip0.png

In our above example, the headline will be shown if the contact is an existing customer.

To go further, we could even include a second block with a different headline and configure it to appear when the contact is not an existing customer:

mceclip0.png
  1. Shown only to recipients who are existing customers
  2. Shown only to recipients who are not existing customers

💡 Good to know
When conditions are inserted, the eye icon turns green.

⏩ What's next?