How do I add a personalized greeting to a template?

To achieve a more personalized salutation, you can use so-called variables in Boldem’s template editor. Below you’ll find examples of automatically inflecting first names and surnames based on gender.

Automatic declension of first names

Boldem can automatically inflect first names into the 5th case. To generate salutations, use the vokativ variable. Use this variable by inserting the following string into the template:

{{ vokativ contact.name }}

This string will be replaced after the message is dispatched with the recipient’s first name in the correct vocative form. For example, if the recipient’s first name is Jana, the template will show Jano. To address the recipient informally as Ahoj Jano, use the following string in the template:

Hi {{ vokativ contact.name }},

If you’d like to thank someone for registering, use the following string:

Thank you for registering, {{ vokativ contact.name }}!

Example of personalization in Boldem – first names

Automatic gender-aware surname declension

In many cases of personalized salutations, you need to correctly inflect not only the recipient’s first or last name but also adjust the salutation itself based on the recipient’s gender. Since Boldem lets you record a recipient’s gender, using the resulting string is a breeze.

In certain cases, recipients’ gender is automatically assigned based on the provided first or last name (e.g., when creating manually or optionally during bulk import). For nonstandard names, gender won’t be set automatically, so it’s advisable to verify ambiguous names and enter them manually.

If gender is set for recipients, you can use the following string in the template instead of a specific salutation:

Thank you for registering{{ if contact.sex != null }}{{ if contact.sex == 1 }}, Mr. {{ end }}{{ if contact.sex == 0 }}, Ms. {{ end }}{{ vokativ contact.surname }}!{{ else }}!{{ end }}

This string is actually scripting code that checks whether a given recipient has their gender set correctly and uses the appropriate salutation:

  • If gender is set to Male and the recipient’s last name is Novák, the salutation used is: Thank you for registering, Mr. Novák!
  • If gender is set to Female and the recipient’s last name is Svobodová, the salutation used is: Thank you for registering, Ms. Svobodová!
  • If gender is not set, a gender-neutral salutation without a last name will be used: Thank you for registering!

You can, of course, customize the salutation text (shown in bold in the example) to suit your needs. We recommend always thoroughly testing the salutation on a small sample of test recipients with all variants (i.e., both genders and a recipient with no gender specified).

Example of using personalization in Boldem – last name

You can similarly distinguish the salutations “Dear Sir”, “Dear Madam”, or “Hello” when the recipient’s gender isn’t specified. In that case, use the following code in the template:

{{ if contact.sex != null }}{{ if contact.sex == 1 }}Dear Mr. {{ end }}{{ if contact.sex == 0 }}Dear Ms. {{ end }}{{ vokativ contact.surname }},{{ else }}Hello,{{ end }}

The result is personalized salutations based on the specified gender:

Michal Michal Krejčí
8. September 2025