SOLVED

Re: Dynamically Change Email Link Based on Lead Owner

Go to solution
Jarom_Hulon
Level 2

Dynamically Change Email Link Based on Lead Owner

Hi everyone,

We are wanting to dynamically change a calendar link in an email based on the lead owner. Do you have any suggestions on the best way to go about this?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamically Change Email Link Based on Lead Owner

That's a syntax error. You want:

#if( $lead.Lead_Owner__c == "Mark Heldt" )

<a href="https://calendly.com/mheldt">HERE</a>

#end

Also, please use syntax highlighting when posting code.

pastedImage_3.png

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamically Change Email Link Based on Lead Owner

This is a standard use for a Velocity (Email Script) token. If you search my responses for "velocity" you'll see several examples of content switching based on owner.

Jarom_Hulon
Level 2

Re: Dynamically Change Email Link Based on Lead Owner

Thanks  Sanford. This is all pretty new to me and I turned out what I have below. It currently isn't working, so if you have anything else to point me in the right direction it would be great!

#if ${lead.Lead_Owner__c} == "Mark Heldt")

<a href="https://calendly.com/mheldt">HERE</a>

#end

#if ${lead.Lead_Owner__c} == "Riley Payne")

<a href="https://calendly.com/rpayne">HERE</a>

#end

#if ${lead.Lead_Owner__c} == "Michael Dillard")

<a href="https://calendly.com/michaeldillard">HERE</a>

#end

SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamically Change Email Link Based on Lead Owner

That's a syntax error. You want:

#if( $lead.Lead_Owner__c == "Mark Heldt" )

<a href="https://calendly.com/mheldt">HERE</a>

#end

Also, please use syntax highlighting when posting code.

pastedImage_3.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamically Change Email Link Based on Lead Owner

Jarom, why isn't my answer "Correct" here?    I showed that your Velocity has a syntax error (a missing left paren).

Dan_Stevens_
Level 10 - Champion Alumni

Re: Dynamically Change Email Link Based on Lead Owner

Iā€™m as confused as you are with some of this suspicious activity (likes/helpful/correct) going on in certain discussion threads.

Paul_Johnson
Level 5

Re: Dynamically Change Email Link Based on Lead Owner

Use Velocity Script