SOLVED

Velocity Token Value pull in

Go to solution
freeza
Level 3

Hello,

How can I pull in the values from my Velocity Token. 

##check if HUG Event Choice is Chicago HUG
#if(${lead.HUG Event Choice} == "Seattle HUG: UserTesting Hacks (4/7 10 am Pacific)")
#set($event.title = "Seattle UserTesting Hacks HUG Event")
#set($event.date = "Thursday, April 7th at 10 AM PT")
#set($event.destination = "<a href="https://usertesting.zoom.us/j/98148200405?pwd=K0d3SFFJWFpvY1FMN2RQWWMvSXkvUT09" style="color: #315CFD; text-decoration: underline;" target="_blank">Remotely via Zoom</a>")
##check if HUG Event Choice is London HUG

………….

#end

for something like this. In the email if I want the event.title

how can I pull that field into the email?

is it something similar to this? ${{my.HUGEventChoice_event.title}}

My token name is {{my.HUGEventChoice}}

3 ACCEPTED SOLUTIONS
Jo_Pitts1
Level 10 - Community Advisor

@freeza ,

getting out in front of the link question that'll be coming next.  Do it like this.  You don't need to replicate the styles, html etc. etc. etc.

 

#set( $allEventDetails = {
  "Seattle HUG: UserTesting Hacks (4/7 10 am Pacific)" : {
    "title":"Seattle UserTesting Hacks HUG Event",
    "date":"Thursday, April 7th at 10 AM PT",
    "destination":"usertesting.zoom.us/j/98148200405?pwd=K0d3SFFJWFpvY1FMN2RQWWMvSXkvUT09"
  },
  "London HUG: UserTesting Hacks (4/12 2 pm GMT)" : {
    "title":"London UserTesting Hacks HUG Event",
    "date":"Tuesday, April 12th at 2 PM GMT",
    "destination":"usertesting.zoom.us/j/97207484508?pwd=dHRyakZ2c2orQ1FMM28vMk5aMU80QT09"
  },
  "Chicago HUG: UserTesting Hacks (4/19 10 am Central)" : {
    "title":"Chicago UserTesting Hacks HUG Event",
    "date":"Tuesday, April 19th at 10 AM CT",
    "destination":"usertesting.zoom.us/j/97012930463?pwd=d2h0TGc4cXZYaTJ2ZWdDUGpCNkUxdz09"
},
"Texas HUG: UserTesting Hacks (4/28 10 am Central)" : {
    "title":"Texas UserTesting Hacks HUG Event",
    "date":"Thursday, April 28th at 10 AM CT",
    "destination":"usertesting.zoom.us/j/94723137214?pwd=ZzZuNkZlWG1SM3M1VE80a3ZvdmZyUT09"
}
}
)
#set( $aEvent = $allEventDetails[$lead.hUGEventChoice]) 

<p>Title:${aEvent.title}</p>
<p><b>When:</b>${aEvent.when}</p>
<p><b>Where:</b><a href="https://${aEvent.where}" style="color: #315CFD; text-decoration: underline;" target="_blank">Remotely via Zoom</a></p>

 

That should be getting pretty close to what you need

View solution in original post

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

You will need to create a separate velocity token to do that (i.e. just display the title), add that token in the subject line and you should be good to go! You'll be able to reference data set in the variable in your original token!

View solution in original post

Jo_Pitts1
Level 10 - Community Advisor

Yep.  Just create a very simple token that has in it

${aEvent.title}

And pop that in the subject.  Fortunately, Marketo does the body processing before the subject line processing, so the variable is all nicely set for use.

View solution in original post

31 REPLIES 31