Hello,
Ive read the article “Use conditionals in messages” from Klaviyo and wrote an if statement trying to use the given information but when I want to send a test to myself, there is an error message saying: “There is an error in your email content.<br />The "lookup" filter requires 2 arguments, but 1 was given”
Here is my code, its very simple:
{% if person|lookup:“title“ == „female“ %}
Sehr geehrte Frau {{ person|lookup:'last_name' }}
{% elif person|lookup:“title“ == „male“ %}
Sehr geehrter Herr {{ person|lookup:'last_name' }}
{% else %}
Sehr geehrte Damen und Herren,
{% endif %}
The Gender of our customers is set through the property “title”. So I want our female customers to be adressed as madam and the male customers as sir (Sehr geehrte Frau is German for dear madam).
An other example of code that is similar, but works, is this:
{{ person|lookup:'Salutation' }} {{ person|lookup:'title' }} {{ person|lookup:'last_name' }}
So if I use person|lookup:'title' it works. But when im using it inside an if statement, it doesn't…
What am I doing wrong?
Best regards!