Can I use a {{my.customtoken}} in an email script? | Community
Skip to main content
New Participant
June 29, 2021
Solved

Can I use a {{my.customtoken}} in an email script?

  • June 29, 2021
  • 2 replies
  • 1843 views

Is it possible to include custom tokens in an email script token? For example, I have a custom token that is manually updated at program level called {{my.Event_Start_Time}} and I want to be able to reference this in an email script token so that I can do {{my.Event_Start_Time}} + 1hr.

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

Well, since Marketo doesn’t support time-only tokens, this must be just a Text {{my.token}}.

 

So why can’t it be a Velocity {{my.token}} instead? Just maintain it as:

#set( $Event_Start_Time = "12:34" )

or

#define( $Event_Start_Time ) 12:34 #end

 

Should be easy to not mess that up.

2 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
June 29, 2021

Well, since Marketo doesn’t support time-only tokens, this must be just a Text {{my.token}}.

 

So why can’t it be a Velocity {{my.token}} instead? Just maintain it as:

#set( $Event_Start_Time = "12:34" )

or

#define( $Event_Start_Time ) 12:34 #end

 

Should be easy to not mess that up.

New Participant
June 29, 2021

Quick answer- no.  But, you might be able to pass through a value to multiple email scripts using a macro. https://velocity.apache.org/engine/1.7/user-guide.html#velocimacros

 

This is likely overkill for what you are trying to do, but it might be worth it if you had many email script tokens that were dependent on that time token.