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
freeza
Level 3

Great! I tested out and everything is working as expected. Thank you so much for your help! Really appreciate it.

 

 

Jo_Pitts1
Level 10 - Community Advisor

Fathima,

I'm super pleased you got it all working.

Can you mark my solution as correct please?

Cheers

Jo

freeza
Level 3

Okay, Thank you for that. This is my first time using Velocity that's why.

I was able to solve the issue.

 

How can I go about adding the Links now?

SanfordWhiteman
Level 10 - Community Moderator

Please use the syntax highlighter so it's readable, thanks.

Jo_Pitts1
Level 10 - Community Advisor

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?

SanfordWhiteman
Level 10 - Community Moderator

@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.

freeza
Level 3

Thank You, if could restore and post it here please. It would be a big help.

Jo_Pitts1
Level 10 - Community Advisor

Thanks.  It covered (I think) most of the things you'd have raised 🙂

SanfordWhiteman
Level 10 - Community Moderator

Sorry, can’t retrieve it. Maybe you moved it somewhere weird?

Jo_Pitts1
Level 10 - Community Advisor

Not sure how I'd even do that.  Maybe I'll find out soon 🙂

freeza
Level 3

Thank You!