Lists, Lead Scoring & Workflows

geopartin
Membre

Personalization Tokens

Can you use a different property as the default value in a token string?

 

ex.

{{ personalization_token("contact.zip", "{{ personalization_token("contact.city", "your town") }}") }}

0 Votes
2 Réponses
himanshurauthan
Leader d'opinion | Partenaire solutions Elite
Leader d'opinion | Partenaire solutions Elite

Personalization Tokens

Hi @geopartin
 
No, you can not use function or variable as a second parameter. Even some of the filters like default, will also not work in this case as that accepts the second parameter as a string not variable.
 
But here is a solution for your requirement, that you might use -
 
{% set zip = personalization_token("contact.city") %} {% set city = personalization_token("contact.city", "Your Town") %}
<p>Your City {% if zip is string_containing "contact.city" %} {{ city }} {% else %} {{ zip }} {% endif %}</p>
 
Cheers,
Digital Marketing & Inbound Expert In Growth Hacking Technology
webdew
Guide | Partenaire solutions Diamond
Guide | Partenaire solutions Diamond

Personalization Tokens

Hi @geopartin ,

Can you please provide us more insight of the issue and what ypu want to achieve here?

Best Regards.