Email Marketing Tool

HeatherThompson
Participant

if/then empty/populated statement for personalization token

Résolue

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.

 

0 Votes
1 Solution acceptée
HeatherThompson
Solution
Participant

if/then empty/populated statement for personalization token

Résolue

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.

Voir la solution dans l'envoi d'origine

3 Réponses
Mike_Eastwood
Conseiller clé | Partenaire solutions Gold
Conseiller clé | Partenaire solutions Gold

if/then empty/populated statement for personalization token

Résolue

Hi @HeatherThompson 

 

Could you use Smart Content in your email? Add everyone that has been to Japan to a list and show them different panels.

 

Alternately, a custom module could solve this easily (depending on how geeky you are)... but that would require some custom code.

 

Have fun

Mike

 

p.s. thank you for the mention @kvlschaefer 

 

 

HeatherThompson
Solution
Participant

if/then empty/populated statement for personalization token

Résolue

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.

kvlschaefer
Gestionnaire de communauté
Gestionnaire de communauté

if/then empty/populated statement for personalization token

Résolue

Hi @HeatherThompson,

 

Thanks for reaching out, and for your feedback! 

 

I would like to invite our subject matter experts to this conversation. 

Hi @Teun@Mike_Eastwood@ChrisoKlepke - Do you have any recommendations on creating an if/then statement for personalization tokens for @HeatherThompson?

Thank you!

 

Best,

Kristen


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !