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:
- Show or hide blocks based on contact attributes - YOU ARE HERE
- Show or hide blocks based on transactional parameters
- Show or hide blocks based on repeatable blocks
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.
- To make sure that the content of your email is displayed correctly, test your email.
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:
|
|
[New design] Drag & Drop Editor |
[Classic design] 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:
- Select the desired block.
- Click the eye icon to open the Block visibility popup.
- Choose whether the block should be visible when one or all conditions are true.
- In the drop-down menu, select contact attributes.
- Select a contact attribute.
- Select an operator. The operators available depend on the format of the contact attribute (text, date, boolean, etc.).
- Enter or select the value of the condition.
- If necessary, add one or more conditions by clicking + Add more conditions.
- Click Insert conditions when you are done adding all conditions.
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:
![]() |
|
By default, all blocks are visible to recipients. If you want to add conditions to only display a block to specific recipients:
- Select the desired block
- Click the pencil icon to open the block settings
- Enable the Conditional display option
- In the first drop-down list, select Contact attributes
- In the second drop-down list, select the contact attribute you want to base your condition on
- In the third-drop down list, select the operator you want to use in your condition
- In the Value field, enter the contact attribute value you want to use as your condition
- To go further, add AND or OR conditions to create more complex display conditions.
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.
⏩ What's next?
- Show or hide blocks based on transactional parameters
- Show or hide blocks based on repeatable blocks
- Test your emails customized with Sendinblue Template Language
- Troubleshoot your emails customized with Sendinblue 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.