Display conditions work with attributes only, not tags
Conditional rows are driven by contact attributes (custom fields), never by tags or interests. To show or hide a row for certain contacts, you must first create an attribute, add its values to your contacts, then build your condition on that attribute. A condition written against a tag will not work.
What this does
A display condition shows or hides a row in your email depending on the data you hold on each contact. The content is chosen per recipient from a contact attribute, for example a language, country, or plan attribute, so each person sees the row that fits them. This is what makes an email feel personalized.
Why it matters
Personalized content lifts engagement: people interact more with a message that speaks to them. Showing the right row to the right contact (and hiding the rest) builds stronger relationships and better results, without sending separate campaigns to each segment.
Before you start: create your attribute
Because display conditions read attributes only, set the attribute up first:
-
Create the attribute on your contact list. See adding attributes to your list.
-
Make sure your contacts have a value in that attribute (for example,
language=en_US). A contact with no value won't match a condition.
Tags and interests won't work here
If your list only separates people with tags or interests, a display condition can't read them. Turn the distinction you need into an attribute first, then condition on that attribute.
Add a display condition to a row
-
Open the campaign in the email designer.
-
In the Rows section, drag a row into your content and select it.
-
In the row properties, select Add Condition. The Edit display condition dialog opens.
-
Fill in the condition (see Writing the condition below), then click Save.
-
Preview it with the eye icon, and pick an attribute value in Preview mode to see the row show or hide.
The saved condition appears in the row properties menu.
Writing the condition
The Edit display condition dialog has four fields:
- Name: a short label for you, for example English.
- Description: an optional note about what the condition does.
- Before: the opening tag that starts the condition. This is where you reference the attribute and the value(s) to match.
- After: the closing tag, always
[ENDIF].
You write the condition as code. Reference the attribute by its name in backticks, compare it with =, put text values in double quotes, and combine several values with OR (or narrow with AND).
Example: show a row only to contacts whose language attribute is en_US or en.
Code
Everything in the row between the Before and After tags is shown only when the condition is true. For contacts who don't match, the row is hidden, so add a separate row (or condition) with fallback content if they should still see something.
Troubleshooting
My condition using a tag or interest does nothing
- This is expected. Display conditions read attributes only. Create an attribute that holds the value you need, populate it on your contacts, and condition on that attribute instead.
The row is hidden for everyone
- Check that your contacts actually have a value in the attribute, and that it matches the condition exactly (
en_USis not the same asEN_USoren). - Confirm the attribute name in the Before tag matches the attribute name on your list, spelled exactly, inside backticks.
The row shows for the wrong contacts
- Review your logic:
ORwidens the match,ANDnarrows it. - Make sure the value in quotes matches what's stored on the contact.
Some contacts see a blank space
- A hidden row leaves nothing in its place. Provide fallback content in a separate row for contacts who don't match the condition.
Related articles
- Adding attributes to your list - Create the fields conditions read
- Using dynamic content - More conditional content
- Adding merge tags to a campaign - Insert attribute values inline
- Creating dynamic segments - Target by attribute