Using display conditions in the Drag & Drop Editor (Classic)

To use this feature, your default settings must be set to use the Sendinblue Template Language. Reference this guide to check or update your settings. 


The display conditions option lets you design email templates and campaigns that display unique content elements to the recipient depending on the conditions you set. 

Display conditions may be applied to an entire content block in the Drag & Drop Editor (Classic) and may be triggered based on three possible options: 

  1. a contact attribute - information you have saved in SendinBlue about your contacts for use in email campaigns, automation emails, or transactional emails
  2. params - these are the transactional parameter(s) that you pass via an API call to send a campaign or a transactional email
  3. a dynamic list variable - may be used only when the dynamic list option is also enabled for a specific design block in your campaign or transactional email 

Before getting started 

If you have not already created your desired contact attributes, use this guide to create the attributes before adding display conditions in your email.  

If you would like to use display conditions in your transactional emails, familiarize yourself with our API (v3) call for sending an email template. (You may also send a campaign designed in the Drag & Drop editor via the API.) 

Display conditions based on contact attributes

Display conditions allow you to display a specific design 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 a few of our contacts' attributes: 

  • whether they are an existing customer (Boolean attribute)
  • favorite color (text attribute)
  • 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'll personalize the content using the data available for each contact.

Personalize an email headline 

In this example, the headline is personalized based on whether or not the contact is an existing customer.

Since we have saved this information as a Boolean attribute (the attribute should state one of two options: Yes or No), we have included two unique blocks and configured them so that one appears when the "CUSTOMER" attribute is Yes and a second for when this attribute is No. This ensures all recipients will see a single headline block.conditional-display-01_EN.png

Personalize an email image 

We will personalize the image based on two contact attributes: favorite color and gender. To ensure all recipients see an image, it's important to consider the available possibilities for each of our attributes: 

Favorite color: 

  • Blue
  • Green
  • Yellow
  • Pink


  • Male
  • Female
  • Unknown

We know that blue is the most popular color shirt we sell, so we'll focus our personalization efforts on this color shirt in our image block. We will configure display conditions for these design blocks: 

  • Simple blue shirt: displayed to anyone whose attributes for favorite color is blue and whose gender is unknown
  • Blue shirt worn by a male: displayed to anyone whose attributes for favorite color is blue and whose gender is male
  • Blue shirt worn by a female: displayed to anyone whose attributes for favorite color is blue and whose gender is female
  • Multi-color collection of shirts: displayed to anyone whose attribute for favorite color is not blue


Personalize a call-to-action button 

Finally, we will personalize the call-to-action button based on the recipient's favorite color. 

We will include two buttons: one when the recipient's favorite color is known and another when it is not known. 

To create the first button, click on the button text, click the Personalize dropdown list, and select the attribute for favorite color. SendinBlue will now automatically insert the name of their favorite color in the button text like this: 

"Shop blue t-shirts", "Shop green" t-shirts", etc. 

We will enable display conditions for the second button and configure it so that this button will display if the contact's favorite color does not equal any of our attribute options.

For example, favorite color does not equal: blue, green, yellow, pink. This block will be displayed when the color does not equal blue, AND does not equal green, AND does not equal pink, etc.

Now, we have a generic "Shope sale t-shirts" button as a fallback.


Good to know: To test your personalizations, simply send a test email to a contact for whom you would like to preview the personalized email.


Display conditions based on a transactional parameter 

Transactional parameters are variables which are not saved in your SendinBlue contact list but rather are passed as a component of your API call to send a transactional email.  

Display conditions may be used to modify an email template based on one of its transactional parameters when it is sent via our API v3.

Transactional parameters contain two elements (as shown below) and when they are passed via the API are structured as: 

{{ params.parameterNAME }}

parameterNAME is your transactional parameter name, formatted and cased exactly as you pass it via the API.

Good to know: View our API documentation about sending a transactional email here and learn more about transactional parameters here.


Transactional emails each serve a specific business purpose and also present an opportunity to reach your most engaged contacts with an additional marketing message (get inspiration on our blog here).

Let's continue our example of the online t-shirt store and say that we want to update our purchase receipt email template with a promotional block about an upcoming event. 

In the email template, we can enable display conditions and select settings in the first field. 

In the second field (variable name), enter only the "parameterNAME" given to your transactional parameter.

For example, to insert a number of guests for an event where the parameter is

{{ params.RSVP }}

simply enter RSVP as the variable name.  


Configure the remaining fields according to your needs. In our example, we'll 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 for single ticket purchase, suggest inviting a friend
  • RSVP for 2 tickets - thank for group purchase, suggest purchasing a table  


Display conditions based on a dynamic list variable

When using the dynamic list option for a design block in your email campaign or template, you may choose to display (or not display) this block when conditions within the dynamic list are met. 

This is very useful when you only want to display a list if the list contains your desirable elements.


As an e-commerce vendor, you may wish to send an email confirming when items in an order have shipped that includes the option to separately list any items on back order.


To create the above email, we would first configure a dynamic list (as shown in this guide) and then enable the Display conditions option for Dynamic list variable

In the Key name field, enter the name of the key you wish to display the block based on. In our example, we have passed a key called "shipped" and when the template detects the value for this key is "yes", it will display the block list out all shipped products. 


Next, we made a second block to display a list of back-ordered products, if any exist.

In the Key name field for our example, we have used the same key (called "shipped") and when the template detects the value for this key is "no", it will display the block list all products that will ship later. 


Good to know: This option is powered by the IF and FOR tags available in the New Template Language. To learn more about this functionality, check out this overview guide


If you are unfamiliar with the elements in a FOR tag, this color-coded reference may help you correctly place each element in your email campaign or template. 


To create the example email above, we passed the following in our API v3 call to send a transactional email.



Saving your email

Email design blocks containing dynamic content, such as dynamic lists or display conditions are marked with a code symbol in the top-left corner of the block.


When saving your email campaign or template, the icon will turn red if a dynamic content option is enabled but is missing required information.


To correct it, simply complete the empty fields and save again.