AnsweredAssumed Answered

Email Script Token, First Name Field

Question asked by Stephanie O'Reilly on Sep 18, 2019
Latest reply on Sep 19, 2019 by Stephanie O'Reilly

Hi there,

 

We have leads that have a first name of [Not Provided], and we'd like to say if we identify the first name as such, fill in "there" as the value, if not identified as [Not Provided] use the value that lives in the field. 

 

We have used as the token name: 

 

{{my.First Name Script}}

{{lead.First Name:default=there}}

 

 

I have used the following tokens and I am still running into the issue;

 

 

#if ($lead.FirstName == "[Not Provided]")

 

there

 

#elseif ($lead.FirstName == "")

 

there

 

#else

 

$lead.FirstName

 

#end

 

**************************************************************************************************************

#if( $lead.FirstName.equals("[Not Defined]") || $lead.FirstName.isEmpty() )  

there  

#else  

$lead.FirstName  

#end  

 

***************************************************************************************************************

 #if( $lead.FirstName.equals("[Not Provided]") || $lead.FirstName.isEmpty() )there#else $lead.FirstName#end

 

**************************************************************************************************************

#if(${lead.First Name} == “[Not Provided]” || ${lead.FIrst Name} == “”)
 $set($greeting = “Hi there,”)
#else
 $set($greeting = “Hi ${lead.First Name},”)
#end${greeting}

 

Any insight on this would be greatly appreciated. I have tried all the above values and we are still getting a Hi [Not Provided]. 

 

Thank you! 

Outcomes