Skip to main content
Solved

Personalized Email Salution


Forum|alt.badge.img+3

Hi all. 

I currently need some help tp personalize my emails. Who can help me?

I have a wellcome message in which I want to personalize the salution in case, I have the data/properties. I tried the following, but it dosen’t work: Can someone please tell me, what’s wrong?

{% if person|lookup:'Anrede' == 'Frau' %} Liebe {{ first_name }} {% elif %} {% person|lookup:'Anrede' == 'Mann' %} Lieber {{ first_name }} {% else %} Liebe Freunde von THEO & EMMA {% endif %}

Thanks in advance!! 

Best answer by alex.hong

Hi @bitmap,
I believe this text is appearing because you might be previewing the template within the template builder and not from within a campaign or flow. This code will not show up when placed in a campaign or a flow. When you are previewing a template from the template library - that is expected behavior. We have encoded our preview text within every template created. 

If you pull your template into a Campaign or Flow and preview from there, that code will not appear. Can you confirm if this is true or not?

 

Thank you,

Alex

View original
Did this topic or the replies in the thread help you find an answer to your question?

6 replies

alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • August 24, 2022

Hi @bitmap,

Welcome to the Community.

I believe you are looking to add dynamic syntax to your emails. I think that this help article, another help article, and this community post would be good places to start:

 

Hope that helped,

Alex


Forum|alt.badge.img+3
  • Author
  • Contributor I
  • 4 replies
  • August 25, 2022

Thank you Alex,

But I want an „extra“ dynamic syntax for the „Hey“ in your example. In Germen I want to use „Liebe“ {{ first_name }} if its a woman and „Lieber“ {{ first_name }}if its a Man. And as an default, I want to use a generic salution in case I haven‘t got the name: „Liebe Freunde von …“

Can you help me how to do this? Thanks.


Forum|alt.badge.img+3
  • Author
  • Contributor I
  • 4 replies
  • August 25, 2022

Hi @alex.hong 

Tried this if/else but when I sent a test mail, I only get the default text: Any Idea? Thanks

 

{% if person|lookup:'Frau' %} Liebe {{ first_name }},

{% elif person|lookup:'Mann' %} Lieber {{ first_name }},

{% else %} Liebe Freundin, lieber Freund von THEO & EMMA,

{% endif %}


alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • August 25, 2022

Hi @bitmap,

I think that would depend on if you have a property on user’s accounts that can be used to switch the type of text block that is shown. If you are not seeing the syntax working, I would make sure you are using a test profile that has a first name or something to look up.

 

Thanks,

Alex


Forum|alt.badge.img+3
  • Author
  • Contributor I
  • 4 replies
  • August 26, 2022

Hi @alex.hong 

thank you. Yes, I have a testprofils with the properties mentioned in the if/else code.

Anrede: Frau / Mann
Firstname: xxx

But … In preview mode, I only get the default, i mean the “else” text. Is there something wrong with the code? 

Thanks!


alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • Answer
  • August 26, 2022

Hi @bitmap,
I believe this text is appearing because you might be previewing the template within the template builder and not from within a campaign or flow. This code will not show up when placed in a campaign or a flow. When you are previewing a template from the template library - that is expected behavior. We have encoded our preview text within every template created. 

If you pull your template into a Campaign or Flow and preview from there, that code will not appear. Can you confirm if this is true or not?

 

Thank you,

Alex