Velocity token - salutation emails
Hi all,
I would like to get some help with setting up a velocity script for a program token that should display the correct salutation in my German emails
--> In German, you need to differentiate between male and females in the salutation, and this also has an effect on how you write certain words.
I have absolutely no experience with creating such scripts, so it would be great if someone could easily explain what kind of script I should use.
I found the following script on http://developers.marketo.com/email-scripting/ . I copied it, and edited the tokens for the ones I use in my instance.
I made sure that the checkboxes for the necessary tokens are checked in the token editor.
Could someone look at this script, and provide any adjustments, as this is not working now.
##check if the lead is male
#if(${lead.new_gender} == "Male")
##if the lead is male
#set(${my.GermanSalutation} = "Sehr geehrter Herr ${lead.Full_Name},")
##check is the lead is female
#elseif(${lead.new_gender} == "Female")
##if female
#set(${my.GermanSalutation} = "Sehr geehrte Frau ${lead.Full_Name},")
#else
##otherwise, use the first name
#set(${my.GermanSalutation} = "Sehr geehrte/r Frau/Herr ${lead.Full_Name},")
#end
Appreciate all the help!
Thanks,
Tom