Re: Lead.Id as a Token

Anonymous
Not applicable

Lead.Id as a Token

I'd like to use Lead.Id in a webhook call that will do some work outside of marketo, update the lead record custom field, and then push the lead record into a campaign.  However I'm not seeing this field exposed as a token.  I could use email address but there is a chance of duplicates and updating the wrong lead record.  How are others handling this edge case?    

Tags (2)
20 REPLIES 20
SanfordWhiteman
Level 10 - Community Moderator

Re: Lead.Id as a Token

It's just {{Lead.Id}} -- you seem to already know this!

Anonymous
Not applicable

Re: Lead.Id as a Token

I haven't tested that but the documentation does not list that token and neither does the GUI when you go to insert a token, but I'll give it a go

SanfordWhiteman
Level 10 - Community Moderator

Re: Lead.Id as a Token

It works, it's just not officially documented outside of Community posts.

Anonymous
Not applicable

Re: Lead.Id as a Token

I'm trying to use this {{lead.id}} but I'm not getting any value. Do I need to make some mapping form SF fields to marketo lead fields to access this as a token value? Thanks.

SanfordWhiteman
Level 10 - Community Moderator

Re: Lead.Id as a Token

This is a Marketo-side field that always exists.

In what context are you trying to use the token?

Anonymous
Not applicable

Re: Lead.Id as a Token

In an email template to embed a link that will contain a unique identifier so that I can lookup the lead record (via rest api) when the user clicks on the link (I dont want to expose the users email for security and am looking for an id i can use to uniquely identify the lead in marketo). For example: 
<a href="http://marketing.com/Subscription.html?lid={{Lead.Id}}">Click to unsubscribe</a>

SanfordWhiteman
Level 10 - Community Moderator

Re: Lead.Id as a Token

I'd worry far more about the DoS vulnerability of your architecture than about showing the lead their own email address.

But anyway, that token should work. Are you sending real emails or samples?

Anonymous
Not applicable

Re: Lead.Id as a Token

I'm testing right now, so I've only tried samples via the Email Template "Send Sample Email". This method doesn't show a value for the lead id that gets generated from the token. Thanks.

SanfordWhiteman
Level 10 - Community Moderator

Re: Lead.Id as a Token

Always send real emails when testing tokenized content.