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?
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:
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 …“
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.
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?