Use tokens inside of tokens (nested tokens) | Community
Skip to main content
February 10, 2017
New

Use tokens inside of tokens (nested tokens)

  • February 10, 2017
  • 3 replies
  • 2144 views

It would be nice to be able to use a token inside of another token.  For example- I may have a token called "event description" that would include the event name, date, time, URL, etc.  that I have already tokenized.  By using these tokens inside of this other token, it would allow me to do less overall updating when cloning the campaign. 

3 replies

Dan_Stevens_
Level 10
February 10, 2017

Existing idea:

In fact, here's the grandaddy of ideas around tokens:

SanfordWhiteman
Level 10
February 10, 2017

Dupe like Dan said... also note that Velocity (email script) tokens can in fact be nested, or more precisely, share internal variables.

So in your example:

----BEGIN TOKEN 1----

#set( $eventDescription = {

"name" : "blah",

"date": "2017-02-15"

} )

----END TOKEN 1----

----BEGIN TOKEN 2----

${eventDescription.name} ## references the data from the other token

----END TOKEN 2----

Some mind-blowing stuff can be done with this.

February 10, 2017

Thanks!  That is good to know!

February 6, 2020
No text available