Lists, Lead Scoring & Workflows

geopartin
Member

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 Upvotes
2 Replies 2
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

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 | Diamond Partner
Guide | Diamond Partner

Personalization Tokens

Hi @geopartin ,

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

Best Regards.