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.
Solved! Go to Solution.
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.
It's fantastically easy to do this using Velocity (email scripting).
If you don't want to do Velocity, a custom field will work. You can upload a sheet with the codes or special link.
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.
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.