SOLVED

Different Link depending on lead owner

Go to solution
Highlighted
Level 5

Different Link depending on lead owner

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Different Link depending on lead owner

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.

2017-01-25 21_34_43-vtleditor.png

View solution in original post

4 REPLIES 4
Highlighted
Level 10 - Community Moderator

Re: Different Link depending on lead owner

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

Highlighted
Level 10 - Champion Alumni

Re: Different Link depending on lead owner

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

Highlighted
Level 10 - Community Moderator

Re: Different Link depending on lead owner

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.

2017-01-25 21_34_43-vtleditor.png

View solution in original post

Highlighted

Re: Different Link depending on lead owner

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.