{"id":399,"date":"2013-01-17T14:38:30","date_gmt":"2013-01-17T22:38:30","guid":{"rendered":"https:\/\/directmailmac.com\/blog\/?p=399"},"modified":"2014-09-10T23:07:13","modified_gmt":"2014-09-11T06:07:13","slug":"smarter-mail-merge-tags","status":"publish","type":"post","link":"https:\/\/directmailmac.com\/blog\/2013\/01\/smarter-mail-merge-tags\/","title":{"rendered":"Smarter Mail-Merge Tags"},"content":{"rendered":"<p>Using mail-merge tags is an easy way to personalize your message for each recipient. You can personalize your emails with information like the recipient&#8217;s name, company name, or up to 15 other fields of your choosing. However, long-time and first-time users of Direct Mail may not be aware of some of the more powerful mail-merge features that were added in Direct Mail 3. In this blog post, we&#8217;ll talk about two ways to make your emails more dynamic and more personal.<\/p>\n<h3>Fallback Values<\/h3>\n<p>Let&#8217;s start with a simple example. Here&#8217;s a mail-merge tag being used in the greeting of a message:<\/p>\n<figure id=\"attachment_400\" aria-describedby=\"caption-attachment-400\" style=\"width: 352px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-400\" alt=\"The &quot;[first name]&quot; mail-merge tag being used in a greeting\" src=\"https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-simple.png\" width=\"352\" height=\"118\" srcset=\"https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-simple.png 352w, https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-simple-300x100.png 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><figcaption id=\"caption-attachment-400\" class=\"wp-caption-text\">The &#8220;[first name]&#8221; mail-merge tag being used in a greeting.<\/figcaption><\/figure>\n<p>But what if your mailing list doesn&#8217;t contain a first name for every recipient? That would mean that some people would see &#8220;Hello&#8221; and then just blank space where the name was supposed to go. We can use <em>fallback<\/em> values\u00a0to remedy this situation. Try this instead:<\/p>\n<figure id=\"attachment_401\" aria-describedby=\"caption-attachment-401\" style=\"width: 352px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-401\" alt=\"Use the &quot;fallback&quot; feature of a mail-merge tag to provide default values when merging.\" src=\"https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-fallback.png\" width=\"352\" height=\"118\" srcset=\"https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-fallback.png 352w, https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-fallback-300x100.png 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><figcaption id=\"caption-attachment-401\" class=\"wp-caption-text\">Use the &#8220;fallback&#8221; feature of a mail-merge tag to provide default values when merging.<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Now regardless of whether or not you have first name data for all the recipients in your list, the results will look great. Your recipients will either see &#8220;Hello Jonathan&#8221; (if that&#8217;s what you had listed as their first name in your mailing list) or &#8220;Hello Friend&#8221; (if you didn&#8217;t have their first name in your mailing list).<\/p>\n<p>This technique works with <a href=\"https:\/\/directmailmac.com\/support\/article\/173-how-do-i-personalize-my-message-with-mail-merge-tags\">all the mail-merge tags<\/a> available in Direct Mail. We recommend using the <a href=\"https:\/\/directmailmac.com\/support\/article\/186-how-do-i-preview-what-my-message-will-look-like-once-it-is-sent\">Preview window<\/a> to see ahead of time what your final, merged message will look like for each recipient in your list.<\/p>\n<h3>Conditionals<\/h3>\n<p>Conditionals take mail-merge tags one step further. They allow you to use if-else logic to create messages whose content changes depending on the recipient. For example, let&#8217;s imagine that I am sending out a reminder for an upcoming event where lunch will be served. I have already collected meal preferences for everyone on my mailing list and stored them in my mailing list under the column Custom 1. Here&#8217;s how I could use conditionals to include a special paragraph in my email for only those folks that prefer vegetarian meals:<\/p>\n<figure id=\"attachment_412\" aria-describedby=\"caption-attachment-412\" style=\"width: 352px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-412\" alt=\"We use conditional mail-merge tags to include a paragraph only for our vegetarian subscribers.\" src=\"https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-if.png\" width=\"352\" height=\"118\" srcset=\"https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-if.png 352w, https:\/\/directmailmac.com\/blog\/wp-content\/uploads\/2013\/01\/mmt-if-300x100.png 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><figcaption id=\"caption-attachment-412\" class=\"wp-caption-text\">We use conditional mail-merge tags to include a paragraph only for our vegetarian subscribers.<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Now only the recipients that have the word &#8220;Vegetarian&#8221; in the Custom 1 column in your mailing list will see the paragraph about the vegetarian meals. If you need even more advanced logic, you can use if\/else-if logic as well as other equality operators (=, !=, &gt;=, &lt;=, &gt;, and &lt;). Please see our <a href=\"https:\/\/directmailmac.com\/support\/article\/174-how-do-i-personalize-my-message-with-ifelse-logic\">support article<\/a> for more information.<\/p>\n<p>Conditional mail-merge tags are available under the &#8220;Conditionals&#8221; section of the mail-merge tag menu. As with fallback values, we recommend using the <a href=\"https:\/\/directmailmac.com\/support\/article\/186-how-do-i-preview-what-my-message-will-look-like-once-it-is-sent\">Preview window<\/a> to see what the results of your mail-merge will look like for each recipient in your list.<\/p>\n<h3>Conclusion<\/h3>\n<p>We hope the above examples have been helpful in understanding how mail-merge tag fallback values and conditionals can improve your emails. We have found that email campaigns that are personalized to the recipient tend to have far better open and click rates. For more information, please see the following two support articles:<\/p>\n<p><a href=\"https:\/\/directmailmac.com\/support\/article\/173-how-do-i-personalize-my-message-with-mail-merge-tags\">How do I personalize my message with mail-merge tags?<\/a><\/p>\n<p><a href=\"https:\/\/directmailmac.com\/support\/article\/174-how-do-i-personalize-my-message-with-ifelse-logic\">How do I personalize my message with if\/else logic?<\/p>\n<p><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using mail-merge tags is an easy way to personalize your message for each recipient. You can personalize your emails with information like the recipient&#8217;s name, company name, or up to 15 other fields of your&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,14],"tags":[],"class_list":["post-399","post","type-post","status-publish","format-standard","hentry","category-features","category-in-depth"],"_links":{"self":[{"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/posts\/399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/comments?post=399"}],"version-history":[{"count":14,"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/posts\/399\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/posts\/399\/revisions\/600"}],"wp:attachment":[{"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/media?parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/categories?post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/directmailmac.com\/blog\/wp-json\/wp\/v2\/tags?post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}