Re: Custom token working in one program but not another

Anonymous
Not applicable

Custom token working in one program but not another

Hi Community!

I tested an email with the following custom email script to pipe in Account Manager's calendly link:

#if( $lead.Insights_Account_Owner__c == "Lainey Seaton" ) 

<a href="https://calendly.com/lseaton-bizrate/">HERE</a> 

#end 

#if( $lead.Insights_Account_Owner__c == "Lindsay Martinez" ) 

<a href="https://calendly.com/lmartinez-bizrate/30min/">HERE</a> 

#end

The above works in one program, but when I tested it in another, nothing is being pipped in:

pastedImage_0.png

My question is why does the identical email script work for one email but not another. This is how it looks in the email that works:

pastedImage_1.png

I'd be greatly appreciative if anyone has any suggestions!

Thanks,

Jenny

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Custom token working in one program but not another

Make sure that the Insights_Account_Owner__c field is checked off in the tree on the left-hand-side of Script Editor.

Also, when posting code to the Community, please use the Advanced Editor's syntax highlighter. Otherwise it's nearly impossible to read.

pastedImage_2.png

Anonymous
Not applicable

Re: Custom token working in one program but not another

Hi Sanford,


I confirmed that the field is checked. I compared it to the one that is working, and they are identical. Is there somewhere else I need to look at to help troubleshoot?

Thank you for your assistance!

Jenny

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom token working in one program but not another

Are you (a) testing with a real email, not a sample, and (b) positive that the Insights Account Owner is case-sensitively equal to one of the listed values? Try outputting $lead.Insights_Account_Owner__c itself.

Anonymous
Not applicable

Re: Custom token working in one program but not another

I started from scratch and re-did the email and it seems to be working now. Thank you again!

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom token working in one program but not another

Better to have one token in a top-level folder to save your sanity.