Email Script Token Goes to Default Value
Hi all, we created an email script token that displays the SDR name based on logic on other custom field (POD) and the SFDC type (Lead/Contact)
It seems like it goes to the default condition ("SDR Team Lead"), and the other conditions are not calculated (Even though I checked some examples and it should work). I added below the script:
#if(${lead.SFDC_Type} == "Lead" && ${lead.POD_New__c_lead} == "01. US ENT 1")
#set($sdr_name = "Rep US ENT 1 ")
#elseif(${lead.SFDC_Type} == "Lead" && ${lead.POD_New__c_lead} == "06. US HC 1")
#set($sdr_name = "Rep US HC 1")
#elseif(${lead.SFDC_Type} == "Lead" && ${lead.POD_New__c_lead} == "07. US HC 2")
#set($sdr_name = "Rep US HC 2")
#elseif(${lead.SFDC_Type} == "Lead" && ${lead.POD_New__c_lead} == "02. US ENT 2")
#set($sdr_name = "Rep US ENT 2")
#elseif(${lead.SFDC_Type} == "Contact" && ${lead.POD_New_Contact__c} == "01. US ENT 1")
#set($sdr_name = "Rep US ENT 1")
#elseif(${lead.SFDC_Type} == "Contact" && ${lead.POD_New_Contact__c} == "06. US HC 1")
#set($sdr_name = "Rep US HC 1")
#elseif(${lead.SFDC_Type} == "Contact" && ${lead.POD_New_Contact__c} == "07. US HC 2")
#set($sdr_name = "Rep US HC 2")
#elseif(${lead.SFDC_Type} == "Contact" && ${lead.POD_New_Contact__c} == "02. US ENT 2")
#set($sdr_name = "Rep US ENT 2")
#else
#set($sdr_name = "SDR Team Lead")
#end
##print the SDR name
${sdr_name}
Can you let us know if there's a syntax issue we're missing?
Thanks!
Itay