AnsweredAssumed Answered

Velocity token - salutation emails

Question asked by 589682f0d4739dc2366ab01c03623a062e7e2910 on Oct 10, 2016
Latest reply on Oct 11, 2016 by sanford.whiteman

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 . 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},")


  ##otherwise, use the first name

  #set(${my.GermanSalutation} = "Sehr geehrte/r Frau/Herr ${lead.Full_Name},")



Appreciate all the help!