{"id":1118,"date":"2011-02-28T04:28:26","date_gmt":"2011-02-28T04:28:26","guid":{"rendered":"http:\/\/bme2.flywheelsites.com\/blog\/merge-tags-for-conditional-formatting\/"},"modified":"2020-06-05T20:23:04","modified_gmt":"2020-06-05T20:23:04","slug":"merge-tags-for-conditional-formatting","status":"publish","type":"post","link":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/","title":{"rendered":"HTML Tips &#038; Tricks &#8211; Merge Tags for Conditional Formatting"},"content":{"rendered":"<div>\n<p>Want to send multiple recipients the same newsletter but with unique content for each one? No problem. With the following HTML tags you can specify which information goes where and how you want to codify the destinations.<\/p>\n<p>You can use the following codes to create emails with variable content based on individual contact details. The recipient can see uniquely created emails based on their name, email, state or any other custom field.<\/p>\n<\/div>\n<div style=\"border: 1px dashed #999999; background-color: #f0f0f0; padding: 10px; font-size: 13px;\">\n<p><strong>[if:<em>fieldname<\/em>=<em>value<\/em>]<\/strong><br \/>\nThis will evaluate the value of the field and proceed if there is a match. The field refers to the name of the column<\/p>\n<p><strong>[elseif: <em>fieldname<\/em>=<em>value<\/em>]<\/strong><br \/>\nThis will provide the alternative content if the given condition is satisfied.<\/p>\n<p><strong>[else]<\/strong><br \/>\nThis will provide an alternative content, in case the above conditions fail.<\/p>\n<p><strong>[endif]<\/strong><br \/>\nThis is to mark the end of the conditional statements.<\/p>\n<\/div>\n<p><u>For example:<\/u><\/p>\n<p>If you want to add an additional message for recipients who are from California (based on the State column in their contact list), you can create the following construct:<\/p>\n<div style=\"border: 1px dashed #999999; background-color: #f0f0f0; padding: 10px; font-size: 13px;\">\n<p><b>[if:State=CA]<\/b><\/p>\n<p>We have a meeting on February 24th.<\/p>\n<p><b>[endif]<\/b><\/p>\n<\/div>\n<p>If you want to add an additional message for recipients who are from California and a different one for contacts from Texas (based on the State column in their contact list), you can create the following construct:<\/p>\n<div style=\"border: 1px dashed #999999; background-color: #f0f0f0; padding: 10px; font-size: 13px;\">\n<p><b>[if:State=CA]<\/b><\/p>\n<p>We have a meeting on February 24th.<br \/>\n<b><br \/>\n[elseif:State=TX]<\/b><\/p>\n<p>We have a meeting on February 28th.<\/p>\n<p><b>[endif]<\/b><\/p>\n<\/div>\n<p>If you want to add an additional message for recipients who are from California (based on the State column in their contact list) and another for all others, you can create the following construct:<\/p>\n<div style=\"border: 1px dashed #999999; background-color: #f0f0f0; padding: 10px; font-size: 13px;\">\n<p><b>[if:State=CA]<\/b><\/p>\n<p>We have a meeting on February 24th.<br \/>\n<b><br \/>\n[else]<\/b><\/p>\n<p>We have a meeting on February 28th.<\/p>\n<p><b>[endif]<\/b><\/p>\n<\/div>\n<p>If you want to add an additional message for recipients who are from California and a separate one for contacts from Texas (based on the State column in their contact list) <i>and<\/i> a separate one for all others, you can create the following construct<\/p>\n<div style=\"border: 1px dashed #999999; background-color: #f0f0f0; padding: 10px; font-size: 13px;\">\n<p><b>[if:State=CA]<\/b><\/p>\n<p>We have a meeting on February 24th.<\/p>\n<p><b>[elseif:State=TX]<\/b><\/p>\n<p>We have a meeting on February 28th.<\/p>\n<p><b>[else]<\/b><\/p>\n<p>We have no meetings this month.<\/p>\n<p><b>[endif]<\/b><\/p>\n<\/div>\n<p>To see all the merge tags available in Benchmark Email, <a href=\"https:\/\/benchmarkemail.com\/blog\/merge-tags-available-in-benchmark-email\/\">click here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to send multiple recipients the same newsletter but with unique content for each one? No problem. With the following HTML tags you can specify which information goes where and how you want to codify the destinations. You can use the following codes to create emails with variable content based on individual contact details. The&hellip;<\/p>\n","protected":false},"author":44,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[2171],"tags":[],"class_list":["post-1118","post","type-post","status-publish","format-standard","hentry","category-beyond"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTML Tips &amp; Tricks - Merge Tags for Conditional Formatting - in<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML Tips &amp; Tricks - Merge Tags for Conditional Formatting - in\" \/>\n<meta property=\"og:description\" content=\"Want to send multiple recipients the same newsletter but with unique content for each one? No problem. With the following HTML tags you can specify which information goes where and how you want to codify the destinations. You can use the following codes to create emails with variable content based on individual contact details. The&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/\" \/>\n<meta property=\"og:site_name\" content=\"in\" \/>\n<meta property=\"article:published_time\" content=\"2011-02-28T04:28:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-05T20:23:04+00:00\" \/>\n<meta name=\"author\" content=\"Benchmark Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benchmark Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/\"},\"author\":{\"name\":\"Benchmark Team\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#\\\/schema\\\/person\\\/bb441e78bfef71cd3c31f51bbbbc627d\"},\"headline\":\"HTML Tips &#038; Tricks &#8211; Merge Tags for Conditional Formatting\",\"datePublished\":\"2011-02-28T04:28:26+00:00\",\"dateModified\":\"2020-06-05T20:23:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/\"},\"wordCount\":384,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#organization\"},\"articleSection\":[\"Beyond\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/\",\"url\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/\",\"name\":\"HTML Tips & Tricks - Merge Tags for Conditional Formatting - in\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#website\"},\"datePublished\":\"2011-02-28T04:28:26+00:00\",\"dateModified\":\"2020-06-05T20:23:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/merge-tags-for-conditional-formatting\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML Tips &#038; Tricks &#8211; Merge Tags for Conditional Formatting\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#website\",\"url\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/\",\"name\":\"in\",\"description\":\"Email Marketing Software\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#organization\",\"name\":\"Benchmark Internet Group, LLC\",\"url\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/benchmarkemail.com\\\/in\\\/wp-content\\\/uploads\\\/sites\\\/11\\\/2019\\\/09\\\/benchmark-logo.svg\",\"contentUrl\":\"https:\\\/\\\/benchmarkemail.com\\\/in\\\/wp-content\\\/uploads\\\/sites\\\/11\\\/2019\\\/09\\\/benchmark-logo.svg\",\"width\":1,\"height\":1,\"caption\":\"Benchmark Internet Group, LLC\"},\"image\":{\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/#\\\/schema\\\/person\\\/bb441e78bfef71cd3c31f51bbbbc627d\",\"name\":\"Benchmark Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7cad2eb67e1b5399c3fc91a36587b732111adaecc965daecca556ef6a03c5041?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7cad2eb67e1b5399c3fc91a36587b732111adaecc965daecca556ef6a03c5041?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7cad2eb67e1b5399c3fc91a36587b732111adaecc965daecca556ef6a03c5041?s=96&d=mm&r=g\",\"caption\":\"Benchmark Team\"},\"url\":\"https:\\\/\\\/www.benchmarkemail.com\\\/in\\\/author\\\/benchmarkteam\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML Tips & Tricks - Merge Tags for Conditional Formatting - in","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"HTML Tips & Tricks - Merge Tags for Conditional Formatting - in","og_description":"Want to send multiple recipients the same newsletter but with unique content for each one? No problem. With the following HTML tags you can specify which information goes where and how you want to codify the destinations. You can use the following codes to create emails with variable content based on individual contact details. The&hellip;","og_url":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/","og_site_name":"in","article_published_time":"2011-02-28T04:28:26+00:00","article_modified_time":"2020-06-05T20:23:04+00:00","author":"Benchmark Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Benchmark Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/#article","isPartOf":{"@id":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/"},"author":{"name":"Benchmark Team","@id":"https:\/\/www.benchmarkemail.com\/in\/#\/schema\/person\/bb441e78bfef71cd3c31f51bbbbc627d"},"headline":"HTML Tips &#038; Tricks &#8211; Merge Tags for Conditional Formatting","datePublished":"2011-02-28T04:28:26+00:00","dateModified":"2020-06-05T20:23:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/"},"wordCount":384,"commentCount":0,"publisher":{"@id":"https:\/\/www.benchmarkemail.com\/in\/#organization"},"articleSection":["Beyond"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/","url":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/","name":"HTML Tips & Tricks - Merge Tags for Conditional Formatting - in","isPartOf":{"@id":"https:\/\/www.benchmarkemail.com\/in\/#website"},"datePublished":"2011-02-28T04:28:26+00:00","dateModified":"2020-06-05T20:23:04+00:00","breadcrumb":{"@id":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.benchmarkemail.com\/in\/merge-tags-for-conditional-formatting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.benchmarkemail.com\/in\/"},{"@type":"ListItem","position":2,"name":"HTML Tips &#038; Tricks &#8211; Merge Tags for Conditional Formatting"}]},{"@type":"WebSite","@id":"https:\/\/www.benchmarkemail.com\/in\/#website","url":"https:\/\/www.benchmarkemail.com\/in\/","name":"in","description":"Email Marketing Software","publisher":{"@id":"https:\/\/www.benchmarkemail.com\/in\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.benchmarkemail.com\/in\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.benchmarkemail.com\/in\/#organization","name":"Benchmark Internet Group, LLC","url":"https:\/\/www.benchmarkemail.com\/in\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.benchmarkemail.com\/in\/#\/schema\/logo\/image\/","url":"https:\/\/benchmarkemail.com\/in\/wp-content\/uploads\/sites\/11\/2019\/09\/benchmark-logo.svg","contentUrl":"https:\/\/benchmarkemail.com\/in\/wp-content\/uploads\/sites\/11\/2019\/09\/benchmark-logo.svg","width":1,"height":1,"caption":"Benchmark Internet Group, LLC"},"image":{"@id":"https:\/\/www.benchmarkemail.com\/in\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.benchmarkemail.com\/in\/#\/schema\/person\/bb441e78bfef71cd3c31f51bbbbc627d","name":"Benchmark Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7cad2eb67e1b5399c3fc91a36587b732111adaecc965daecca556ef6a03c5041?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7cad2eb67e1b5399c3fc91a36587b732111adaecc965daecca556ef6a03c5041?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7cad2eb67e1b5399c3fc91a36587b732111adaecc965daecca556ef6a03c5041?s=96&d=mm&r=g","caption":"Benchmark Team"},"url":"https:\/\/www.benchmarkemail.com\/in\/author\/benchmarkteam\/"}]}},"_links":{"self":[{"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/posts\/1118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/comments?post=1118"}],"version-history":[{"count":0,"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/posts\/1118\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/media?parent=1118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/categories?post=1118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benchmarkemail.com\/in\/wp-json\/wp\/v2\/tags?post=1118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}