Skip to main content
KCS_Integration
Level 2
Jul 8, 2019 6:15 PM UTC

Email Script (Velocity) My.Tokens Not Displaying Default Values

Issue

Issue Description
Velocity scripted tokens are not displaying the default value in the asset if the information required for the token is not in the database.

 

 


Solution

Issue Resolution

Email Script tokens are not designed to work with the {{my.token:default=Some Value}} syntax, which is for simple tokens.

Rather, you must output the default value within the code (using #if/#else, $display.alt or any other conditions) then include just {{my.token}} in the email.

Examples can be found here: https://developers.marketo.com/email-scripting/


This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
User Group Leader
User Group Leader
Jul 8, 2019 6:15 PM UTC

Methinks the title would be better as:

Email Script (Velocity) my.tokens not displaying default values

And a touchup to the content:

Email Script tokens are not designed to work with the {{my.token:default=Some Value}} syntax, which is for simple tokens.

Rather, you must output the default value within the code (using #if/#else, $display.alt or any other conditions) then include just {{my.token}} in the email.

Translate
Roxann_McGlump1
Level 5
Jul 9, 2019 9:24 PM UTC

Thanks, Sanford! 

Translate