Different Link depending on lead owner | Community
Skip to main content
Paul_Johnson
Level 4
January 25, 2017
Solved

Different Link depending on lead owner

  • January 25, 2017
  • 3 replies
  • 2279 views

Hello! Hoping to find a solution to this: I am needing to create a link in an email that is different depending on who owns the lead the email is going to. Anyone know the best way to do this?

The only thing I can think of is creating a custom field being the link and then creating a smart campaign that puts that link in the custom field when a lead is assigned to a lead.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Just so Paul doesn't do it the hard way, here's the VTL :

#set( $linksByLeadOwner = {

  "sandy@whiteman.com" : "http://example.com/sandy",

  "josh@hill.com" : "http://example.com/josh",

  "*" : "http://example.com/defaultpage"

})

#set( $link = $linksByLeadOwner[$lead.Lead_Owner_Email_Address] )

#if ( !$link )

  #set( $link = $linksByLeadOwner['*'] )

#end

<a href="$link">Click here y'all</a>##

Note the use of the * property as the wildcard (used if the lead owner email address isn't in the set of known links).

And remember to check off Lead Owner Email Address on the right side of the script token editor.

3 replies

SanfordWhiteman
Level 10
January 25, 2017

It's fantastically easy to do this using Velocity (email scripting).

Josh_Hill13
Level 10
January 26, 2017

If you don't want to do Velocity, a custom field will work. You can upload a sheet with the codes or special link.

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
January 26, 2017

Just so Paul doesn't do it the hard way, here's the VTL :

#set( $linksByLeadOwner = {

  "sandy@whiteman.com" : "http://example.com/sandy",

  "josh@hill.com" : "http://example.com/josh",

  "*" : "http://example.com/defaultpage"

})

#set( $link = $linksByLeadOwner[$lead.Lead_Owner_Email_Address] )

#if ( !$link )

  #set( $link = $linksByLeadOwner['*'] )

#end

<a href="$link">Click here y'all</a>##

Note the use of the * property as the wildcard (used if the lead owner email address isn't in the set of known links).

And remember to check off Lead Owner Email Address on the right side of the script token editor.

Level 3
January 26, 2017

If the lead owner list is not too large, what about dynamic content?

Make a segmentation by lead owner. Then the section with the special link (or the entire email) can be dynamic.