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}}
Solved! Go to Solution.
@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
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!
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.
I wrote a really long reply to this when it was in the wrong board.
Now I can't find it.
@freeza , did you delete your original, and re-create it in the product discussion board?
@Jo_Pitts1 wrote:
I wrote a really long reply to this when it was in the wrong board.
Now I can't find it.
@freeza , did you delete your original, and re-create it in the product discussion board?
Jo, I moved it, but your response wasn’t there (anymore) even on the other board. I’ll see if I can restore it.
Thanks. It covered (I think) most of the things you'd have raised 🙂
Thank You!
Sorry, can’t retrieve it. Maybe you moved it somewhere weird?
Not sure how I'd even do that. Maybe I'll find out soon 🙂
Thank You, if could restore and post it here please. It would be a big help.
OK.. so a shorter version of what I wrote before (to save @SanfordWhiteman from having to find and restore my earlier reply)
so, my first comment originally was for you to use the code highlighter, but I see that's happened.
Then:
Cheers
Jo
Does this look good?
##check if HUG Event Choice is Seattle HUG
#if($(lead.hUGEventChoice.equals("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>")
........
#end