Conditional merge tag blocks, also known as smart and dynamic merge tag blocks, allow you to create dynamic content conditions based on subscriber data.
Below, we walk through how conditional merge tag blocks function and provide some examples of how they can be used.
Our conditional blocks support traditional IF, ELSE, and ELSEIF logic, as well as the following operators:
- =equal to
- !=does not equal to
- >greater than
- <less than
- >=greater than or equal to
- <=less than or equal to
It is also possible to use IFNOT for negative conditions. For example:
More advanced conditions can be done, such as:
With conditional blocks, you can:
- Present content that is unique to each recipient.
- Show default values in place of missing data. For example, you may want to have a greeting like "Hello *|FNAME|*," but you know that not all of your recipients have an FNAME value in your list.
- Let folks that live in Texas see a different promotion than those who live in Georgia or other states.
- Display information based on age.
- Offer different levels of coupons based on purchase activity. The order of this code is important to ensure that a subscriber does not meet multiple conditional blocks.
- Hide or show parts of your content on campaign archives.
- Use conditional blocks for announcing winners/prizes.
- Request information from subscribers with incomplete data:
Looking for info on conditional blocks and Groups? This is where you belong.
- When using > greater than and other numerical comparisons, we recommend using number fields in your MailChimp list for the most consistent results. If using a text field that includes a non-numberical value, such as a period or a comma, the results may not appear as expected.
- AND conditions and OR conditions cannot be used for values. For example, in the conditional *|IF:FOO OR BAR|*, the entire string, "FOO OR BAR," would be matched against rather than treating OR as a separate statement.
- If your conditional merge tag block is not working as expected, check the syntax of the tags as well as the data in your list for any typos or extra spaces. Additionally, check for any unclosed conditional tags.
|Was this article helpful?||
|What can we do to improve your experience with articles like this?|
At this time, we are unable to reply to any responses, but we'll use this information to keep the site up-to-date.