SOLVED

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

Go to solution
dannylearmont
Level 1

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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

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.

View solution in original post

2 REPLIES 2
Phillip_Wild
Level 10

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

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. 

SanfordWhiteman
Level 10 - Community Moderator

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

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.