customizing email language for better personalization

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered
Is there a way to use the personalization tag only if that field is populated and a fallback text if it isn't?

For example could I use, "First Name, did you know cats are better than dogs?" and if they don't have a first name in the database replace it with "Did you know that cats are better than dogs?" In other words, I don't want a placeholder for the personalization, I want to omit. Is there a code that I could use?
Photo of Mandate Media

Mandate Media

  • 33 Posts
  • 11 Reply Likes

Posted 4 years ago

  • 0
  • 1
Photo of Emily Hollingsworth

Emily Hollingsworth, Alum

  • 2203 Posts
  • 158 Reply Likes
Official Response
Hi again! After further digging with the product team, I learned that our dynamic content feature actually fits the bill here! You can use dynamic content tags to send varying versions of content in your mailing based on conditions you set. Here's an example:

[% if member:name_first != "" %]

[% member:name_first default="" %], did you know cats are better than dogs?

[% else %]

Did you know cats are better than dogs?

[% endif %]

Dynamic content checks to see if the name field is empty. If it's not empty and a name exists, the text with the personalization tag displays. 

If the field is empty, the generic text displays. 

You can read more about dynamic content here in our Resource Center. Let me know if you have any questions!