Sep 14, 202211:27 AM - edited Sep 14, 202211:32 AM
Participant
if/then empty/populated statement for personalization token
SOLVE
Hi,
I want to do an if/then statement in-email where if the data field is populated it displays the personalization token plus some characters, and if it's empty it displays nothing.
The extra characters are what complicates it for me, because i can't put it straight into the personalization token.
something like {% if deal.destination =='' %} Reise {% if deal.destination =='not empty' %} {{ personalization_token('deal.destination', ' ') }}-Reise {% endif %}
It's been about 18 months since I last coded an if/then statement, so I'm a little rusty.
For context, in German, "your trip" is "Ihre Reise", but if you're saying "Your Japan trip" it's "Ihre Japan-Reise" with the hyphen. So if I just use the destination personalization token and it's empty for that contact, it will show "-Reise" which will look grammatically incorrect.
Sep 19, 20228:33 AM - edited Sep 19, 20228:39 AM
Participant
if/then empty/populated statement for personalization token
SOLVE
thanks Mike, the Smart Content option wouldn't work because the field I'm using as a reference isn't one of the options. The custom module might work but I think it would take me the guts of a week to decipher the instructions! thanks anyway.
The IT team in my company have directed me to the HS Developer Docs about inline if/then statements and I think that's going to be where i find my solution.
Sep 19, 20228:33 AM - edited Sep 19, 20228:39 AM
Participant
if/then empty/populated statement for personalization token
SOLVE
thanks Mike, the Smart Content option wouldn't work because the field I'm using as a reference isn't one of the options. The custom module might work but I think it would take me the guts of a week to decipher the instructions! thanks anyway.
The IT team in my company have directed me to the HS Developer Docs about inline if/then statements and I think that's going to be where i find my solution.