Add conditional display blocks

Overview

Conditional display blocks allow you to show or hide entire sections of your emails based on specific criteria such as device type, contact attributes, or segment membership. This enables you to create highly targeted, responsive campaigns that deliver the right content to the right audience without building multiple separate emails or campaigns.

What are Conditional Display Blocks?

Conditional display blocks are content sections in your email that only appear when certain conditions are met. Instead of showing the same content to everyone, you can customize what each recipient sees based on:

  • Device type: Mobile, desktop, tablet, or specific email clients

  • Contact attributes: Demographics, preferences, purchase history, loyalty status

  • Segment membership: Whether a contact belongs to specific segments

Benefits of Conditional Display Blocks

Enhanced relevance: Show only content that matters to each recipient

Better mobile experience: Optimize layouts and content for different screen sizes

Increased conversions: Display targeted offers based on customer profiles

Simplified workflow: Maintain one email template instead of multiple versions

Reduced email length: Show concise, relevant content instead of overwhelming recipients

Conditional Display Levels

You can apply conditional display on 3 levels:

  • Elements: Go to Display tab for any element to define the conditional display rules

  • Blocks: Go to Display tab for any section to define the conditional display rules

  • Sections: Go to Display tab for any section to define the conditional display rules

Device-Based Conditional Display

Show different content based on the device your recipient uses.

Mobile vs. Desktop Content

Select Mobile Only or Desktop Only to limit the visibility of a section, block or element to only mobile or desktop views. Once you update it, the preview will be updated to only show the section, block or element only for specific device preview.

Attribute-Based Conditional Display

Show or hide content based on contact attributes and their values.

Contact Attribute Conditions

Show content based on specific value of a contact attribute:

  • Select element, block or section and go to Display tab

  • Click on Edit condition to enter the display condition

In the Condition input box, you can type any condition based on contact attributes and click on Save Changes.

The following operators are supported:

  • == - equals

  • != - does not equal

  • > - greater than

  • < - less than

  • >= - greater than or equal to

  • <= - less than or equal to

  • or - logical or

  • and - logical and

Example: contact.attributes.firstName=="John" or contact.attributes.firstName=="Jane"

For example, to only show the discount image section to contacts who have their contact attribute average_order_value > 50 you can type the condition in following format

contact.attributes.average_order_value>50

where average_order_value is the internal name (not display name) of the contact attribute.

Multiple Attribute Conditions

Combine multiple conditions with AND/OR logic:

Show content to Gold members in California:

You can combine conditions using and such as

contact.attributes.membership_tier == "Gold" and contact.attributes.provinceCode == "CA"

Show content to Gold OR Platinum members:

You can combine conditions using or such as

contact.attributes.membership_tier == "Gold" or contact.attributes.membership_tier == "Platinum"

Event Property Conditions

If you are using your email in an event-triggered journey, you can also refer event properties of the trigger event for conditional display rules. For example,

event.properties.membership_tier == "Gold" or event.properties.membership_tier == "Platinum"

Segment membership conditions

You can also define a segment and show/hide an element, section or block based on if they are member of that segment

  • Go to Display tab of an element, section or block

  • Click on Edit condition

  • Click on Segment condition

  • Select the segment from the dropdown if you want to show this content only to that segment. It will pre-add a condition in the format contact.segments contains "874990d6-26c4-48f0-9dc6-42e9bd87f96c" using the segment ID.

  • Click on Save Changes.

Preview conditional blocks

Once you have added all the display condition rules, you can switch to the Preview tab and select a contact preview if the content will show or hide for them.

Last updated

Was this helpful?