Show or hide content based on contact attributes

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

Good to know

❓ How contact attributes influence the display of specific content to different recipients?

Contact attributes allow you to display specific content (image, title, text, section etc.) based on what you know about your recipient and have saved in your Brevo 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 customers' favorite color and gender, but we don't know any details about our contacts who haven't purchased yet. Our email will promote a yoga pants sale, and we will personalize the content depending on whether our contacts are customers or not. 

Show specific content to different recipients based on their contact attributes

By default, each content is visible to all recipients. However, if you want to display content only to specific recipients based on their contact attributes, 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.
  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. By default, contact attributes are already selected. From the third drop-down list, select the contact attribute that will set the display of your content.
      In our example, we will choose the attribute CUSTOMER
    3. Select the operator for your condition.
      In our example, we will select = equals because we want to display our content only to recipients with the contact attribute CUSTOMER set to Yes.
    4. Enter or select the value of your condition.
      If the contact attribute is of text type, ensure it is written as in your contact normal attributes list. For example, if your attribute is called BLUE, write BLUE in the text field and not Blue.
    5. Add one or more conditions if necessary by clicking + Add another condition.
    6. Click Add condition when you are done adding all conditions.

Congratulations! 🎉 You have applied display conditions. In our above example, the headline will be shown if the contact is an existing customer. When conditions are inserted, the content border turns green and features a slashed eye icon. Click it if you need to edit your condition.

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:

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

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

4 out of 11 found this helpful