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

For example:  

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. 

Looking for info on conditional blocks and Groups? This is where you belong

Note

  • 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?
Thanks for submitting your feedback!
At this time, we are unable to reply to any responses, but we'll use this information to keep the site up-to-date.
Sorry, we were unable to submit your feedback. Please try again later. Thank you for your patience.

Related Articles