Solved

Personalized Email Salution

  • 24 August 2022
  • 6 replies
  • 318 views

Badge +2

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!! 

icon

Best answer by alex.hong 26 August 2022, 22:02

View original

6 replies

Userlevel 7
Badge +58

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

Badge +2

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.

Badge +2

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 %}

Userlevel 7
Badge +58

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

Badge +2

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!

Userlevel 7
Badge +58

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

Reply