MailChimp Help Center
LiveChat

MailChimp offers Webinars to help you get started. Sign up for the next session.

results

Frequently Asked Question

How do conditional (smart) *|MERGE|* tags work?-

Category:  All  ›  Campaigns-  ›  Personalization or *|MERGE|* tags-
 Print Article   |    Email Link
Answer

Smart/Dynamic Merge Tags

"Smart/Dynamic Merge Tags" will allow you to create dynamic content conditions based on recipient data . You can build messages that present content that is unique to each recipient. Also you can handle fields that you want to populate with list data and handle cases where not all recipients have a required merge value. For example, you may want to set a greeting, "Dear *|FNAME|*," but know not all of your recipients have a name value in your list. Or you may want folks that live in Texas to see a different promotion then those that live in Georgia. Smart/Dynamic *|MERGE|* tags will allow you to handle situations such as these.

Simple Stuff (Content display formatting)

*|TITLE:MERGE|* will upper-case the first letter of each word of the field, so that *|TITLE:FNAME|* *|TITLE:LNAME|* will convert "roGEr WATERS" into "Roger Waters"

*|UPPER:MERGE|* will upper-case all the letters in the field

*|LOWER:MERGE|* lower-cases all the letters

*|HTML:MERGE|* will print the field without escaping. So if you merge in HTML code like, <b>Bananas!</b> it'll actually render like: Bananas! in your email.

Groups (Display content based on interest group preferences)

(interested in one group Test)

*|INTERESTED:Pizza,Pie|*
This will only show up if they're interested in pizza or pie
*|END:INTERESTED|*


(interested in Multiple Groups Test)

*|INTERESTED:Pizza,Pie|*
*|INTERESTED:Pizza|*
This will only show up if they're interested in pizza
*|END:INTERESTED|*
*|INTERESTED:Pie|*
This will only show up if they're interested in pie
*|END:INTERESTED|*
*|ELSE:|*
This will show if recipient isn't associated with an interest
*|END:INTERESTED|*

Note: the interested block right now can only do OR, not AND conditions.

A/B Splits (displaying content based on group affiliation)

*|GROUP:A|*
This will only show for group A
*|END:GROUP|*

Advanced Stuff: Conditions

Our dynamic merge tags support traditional IF and IF ELSE logic conditions. For example:

*|IF:FOO|* (FOO = merge value you want to test against)
value to display
*|END:IF|*

or

*|IF:FOO|* (FOO = merge value you want to test against)
value to display
*|ELSE:|*
alternative value to display
*|END:IF|*

Here is a specific example where you can show default values in place of missing data, such as the greeting example mentioned in the introduction paragraph.

Dear *|IF:FNAME|*
*|FNAME|*
*|ELSE:|*
something else, like Sirs for example
*|END:IF|*

Note: in the above example the *|IF:MERGE|* condition needs to be updated to reflect the merge fleid you are testing against. In this case we were looking for a first name value FNAME.

Another example, a sporting goods store could send a holiday promotion to its entire list, but swap out the offer by the recipient's state:

*|IF:STATE=CA|*
Save 20% on surf boards!
*|END:IF|*
*|IF:STATE=GA|*
Save 20% on Mountain Bikes!
*|END:IF|*
*|IF:STATE=FL|*
Save 40% on water skis!
*|END:IF|*
*|IF:STATE=CO|*
Save 50% on ski gear
*|END:IF|*

More advanced conditions can be done like:

*|IF:MERGE != Bob|*
Your name's not Bob!
*|END:IF|*

There's also:
*|IFNOT:MERGE|* to do negative conditions.

Click here for even more advanced merge tags.

***NOTE: conditional merge tags are not available for RSS to email campaigns.

How to user Conditional Merge tags for for announcing winners/prizes.

Last Update: Jan 11, 2010
Related Entries
Relevance
Resource
Article Name
FAQ
Do MERGE Tags work in plain-text emails?-
FAQ
Where can I find my list's *|MERGE|* tags?-
FAQ
How do my Twitter Merge Tags work on campaign archives or sent campaigns?-
FAQ
Twitter Merge Tag Cheatsheet!-
FAQ
Can I use merge tags in the signup forms?-
FAQ
Can you automatically fix capitalization in my list date when I personalize a campaign?-
FAQ
Personalizing Your Campaigns (adding names and more!)-
FAQ
Can I change the format that my merge tag outputs?-
FAQ
How do I test to see if my Merge tags are working correctly?-

Live Assistance
Click here to submit your question via our email system.
Feedback
Please let us know what you think about this article.
Required items indicated with *
 
Document Rank : * Poor     Excellent
Comments, suggestions? :


© 2001-2009. MailChimp is a product of The Rocket Science Group, LLCEmail Us or Live Chat