Dynamic Content

Personalize your campaigns by conditionally displaying content, based on custom field values in your subscriber lists, or on membership in your lists and segments.

For more information and examples, read our Dynamic Content Guide

[if]
If a specified custom field equals a specific value, display some content

[elseif]
Or else if a specified custom field has a specific value, display some other content

[else]
If there is no match in either scenario, display alternative content

IF Provided [if:condition]

If a specified custom field contains any value, display some content.

Example Use

<p>Check out our new products[if:CustomerType] as a customer, you will receive a discount[endif].</p>

Above: The code to include in your HTML templates

IF Equals [if:condition=X]

If a specified custom field equals a specific value, display some content.

Example Use

<p>Visit our store[if:CustomerType=VIP] - as a VIP, you can receive 25% off...[endif].</p>

Above: The code to include in your HTML templates

IF Member Of [ifmemberof:"List One","List Two|Segment"]

If a subscriber is in any of the given lists or segments, display some content. You can put multiple list and segment names in this condition, separated by commas. They will be interpreted as OR statements.

That is - [ifmemberof:"List One","List Two|Segment"] will be interpreted as: if the recipient is a member of the list called "List One" OR is a member of the segment called "Segment" in the list "List Two"

Example Use

<p>Visit our store[ifmemberof:"My list|VIP segment"] - as a VIP, you can receive 25% off...[endif].</p>

Above: The code to include in your HTML templates

IF/ELSE [if:condition=X]...[else]...

If a specified custom field equals a specific value, display some content, otherwise display alternative content.

Example Use

<p>Visit our store[if:CustomerType=VIP] - as a VIP, you can receive 25% off...[else] and make sure you become a VIP for future discounts..[endif].</p>

Above: The code to include in your HTML templates

IF/ELSEIF/ELSE [if]...[elseif]...[else]...

If a specified custom field equals a specific value, display some content, or else if a specified custom field has a specific value, display some other content. If there is no match in either scenario, display alternative content.

Example Use

<p>Visit our store[if:CustomerType=VIP] - as a VIP, you can receive 25% off..[elseif:CustomerType=Vendor] - as a friend, you'll get 30% off..[else]and make sure you become a VIP for future discounts..[endif].</p>

Above: The code to include in your HTML templates