opportunity tokens

Stephanie_Chmie
Level 2

opportunity tokens

I am new to opportunities. I send an introduction email to the outside partner who is working a lead. It currently pulls lead.tokens. I want it to either pull tokens from opportunities or contacts. Any advice on how or where to do this? 

Once the lead is converted I don't want it to pull info from the lead b/c it might be outdated. 

11 REPLIES 11
SanfordWhiteman
Level 10 - Community Moderator

Re: opportunity tokens

You use Velocity tokens to output Opportunity data (as you would with Custom Object data).

Stephanie_Chmie
Level 2

Re: opportunity tokens

now for the stupid question.  What is and where do I find Velocity Script? 

Stephanie_Chmie
Level 2

Re: opportunity tokens

Ok, nevermind that question, I have the script up but how/what do I add to it? 

SanfordWhiteman
Level 10 - Community Moderator

Re: opportunity tokens

That's a very, very wide open question.

Script tokens are written in Velocity Template Language. I write extensively on tips and tricks for Velocity (see https://blog.teknkl.com/tag/velocity) but it's not not overnight thing. You're going to need to take some time to learn.

Stephanie_Chmie
Level 2

Re: opportunity tokens

If Opportunities and Contacts are Marketo and they claim to have the best salesforce integration then why aren't the fields available for tokens like all of the lead fields are. 

SanfordWhiteman
Level 10 - Community Moderator

Re: opportunity tokens

Everything you could possibly want to do with Opportunities (and with Salesforce COs), you can.

Remember that Opportunities are many-to-one (they're even more complex than that, given the Oppty Contact Role relationship). Therefore, there could never be a single token that represents "an" Oppty field, as because that field has different values across Oppty records. The syntax would have to change drastically beyond {{object.property}} -- in essence that extended syntax, and much more, is what you get w/Velocity.

Stephanie_Chmie
Level 2

Re: opportunity tokens

So If I want to send an email with info on the contact associated with the lead how would I go about doing that? 

SanfordWhiteman
Level 10 - Community Moderator

Re: opportunity tokens

"info on the contact associated with the lead" -- I don't understand.

Stephanie_Chmie
Level 2

Re: opportunity tokens

sorry I want to send an email with the contact information of the primary contact associated with an opportunity.