Hi marketo community,
Our sales team wants us to use preferred name (where available) in our comms. Currently I use token Dear {{lead.First Name:default=Adviser}}, but wondering is we could use preferred name and if it is not available then 'first name' token?
I am just not too sure how to set this up and not to make mess out of it!
Thanks team,
Olya
Solved! Go to Solution.
You can use email scripting (velocity scripting) tokens to achieve this and put the {{my.token}} value in your email.
#set($preferredname = $lead.Preferred_First_Name__c )
#if ($preferredname.isEmpty())
#set($Salutation = "${lead.First_Name}," )
#else
#set($Salutation = "${preferredname}," )
#end
${Salutation}
This is just an example and you would need to replace lead.Preferred_First_Name__c with your preferred name field and same with First Name.
You can use email scripting (velocity scripting) tokens to achieve this and put the {{my.token}} value in your email.
#set($preferredname = $lead.Preferred_First_Name__c )
#if ($preferredname.isEmpty())
#set($Salutation = "${lead.First_Name}," )
#else
#set($Salutation = "${preferredname}," )
#end
${Salutation}
This is just an example and you would need to replace lead.Preferred_First_Name__c with your preferred name field and same with First Name.
Thanks @Floyd_Alvares2 I appreciate your response
Where in Marketo do I put this script?
You could create the 'My Tokens' either in the program or the campaign folder.
Excellent thank you!!