Email Script (Velocity) My.Tokens Not Displaying Default Values | Community
Skip to main content
KCS_Integration
Level 2
July 8, 2019

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

  • July 8, 2019
  • 2 replies
  • 1927 views

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
Level 10
July 8, 2019

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.

Roxann_McGlump1
Level 5
July 9, 2019

Thanks, Sanford!