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:
- Show or hide content based on contact attributes - YOU ARE HERE
- Show or hide content based on transactional parameters
- Show or hide content based on repeatable content
Good to know
- If you have not already created your desired contact attributes, see this article to create your contact attributes before following the procedure in this article.
- Check our dedicated article to understand the differences between sections and content blocks and ensure you will apply display conditions to the right content.
- To ensure that your email's content is displayed correctly, test your email.
❓ 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:
- Select the content you want to show only to some recipients with specific contact attributes.
❗️ ImportantEnsure 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.
- From the side panel, open the Content visibility section and click + Add condition.
- In the Add display conditions popup, choose the conditions in which your content should display:
- From the top drop-down list, choose whether the content should be visible when only one or all conditions are true.
- 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. - 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. - 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. - Add one or more conditions if necessary by clicking + Add another condition.
- 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:
|
⏩ What's next?
- Show or hide content based on transactional parameters
- Show or hide content based on repeatable content
- Test your emails customized with Brevo Template Language
- Troubleshoot your emails customized with Brevo Template Language
🤔 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.