Besides replacing base recipient variables, Boldem provides the option for conditionally rendering individual blocks, browsing structures (e.g., items in the cart), and formatting outputs. Below, you will find a basic overview of each variable and its usage.
Base variables
Variable | Description |
---|---|
{{ contact.salutation }} | In practice, you are more likely to use the variable called Vocative for recipient salutations. You can find more information on this at Declension of first names. |
{{ contact.company }} | Recipient’s company |
{{ contact.surname }} | Recipient’s last name |
{{ contact.name }} | Recipient’s first name |
{{ contact.email }} | Recipient’s Email |
{{ contact.mesto }} | Custom field, which we have entered in the system as mesto (city). |
{{ unsubscribeUrl }} | Unsubscription URL. If the campaign has enabled unsubscribing and this variable is not present in the email body, the default unsubscribe text will be automatically included. |
{{ webMailUrl }} | URL to display email on the web. |
{{ webMailWithHeaderUrl }} | URL to display email on the web. The email will be displayed on the site including sender and recipient entries. |
Declension of first names
In Boldem, declension of nouns is done automatically up until the 5th grammatical case, vocative. The variable Vocative is therefore used to generate a salutation. You use this variable by inserting the following string into the template:
{{ vokativ contact.name }}
After dispatching the message, this string will be replaced with the recipient’s first name in the correct vocative form. For example, if the recipient’s first name is Jana, the template will display Jano. Alternatively, if you want to choose a more familiar approach with Hi Jano, use the following string:
Hi {{ vokativ contact.name }},
For example, if your goal is to express gratitude for registering, use the following string:
Thank you for your registration, {{ vokativ contact.name }}!

In the example above, we use data retrieved from the base variable contact.name, specifically, the first name associated with each recipient. Alternatively, you can obtain input data from custom fields or from a JSON file sent when dispatching a transactional email.
Declension of surnames
Boldem can automatically help you with declension of both first names and surnames up to the 5th grammatical case. To generate a salutation, use the Vocative function. You can use this function by inserting the following string into the template:
{{ vokativ contact.surname }}
This string will be replaced with the recipient’s surname in the appropriate grammatical case after the message is sent. For example, if the recipient’s last name is Novák, the template will display Nováku. Typically, surname declension is not used alone but combined with gender distinction. See the following section for details.
Declension with gender-based salutation
In a vast number of personalized salutations, not only do you need to correctly spell both the first and last names, but also to change the salutation to match the person’s gender. Since Boldem allows you to enter the gender of recipients, using the designated variable should make this process a walk in the park.
In certain cases, the gender of the recipients is automatically stored according to the first or last name entered (e. g. during manual insertion or optionally during bulk import). In the case of non-standard names, the gender is not automatically set. Therefore, it is advisable to verify those names first and add the names manually if needed.
If you have set the gender of your recipients, you can use the string below in the template instead of manually addressing recipients:
Thank you for your registration {{ if contact.sex != null }}{{ if contact.sex == 1 }}, Mr. {{ end }}{{ if contact.sex == 0 }}, Mrs. {{ end }}{{ vokativ contact.surname }}!{{ else }}!{{ end }}
This string is actually a script code that evaluates whether the recipient has the correct gender setting, thus applying the salutation accordingly:
- If the gender is set to Male and the recipient’s last name is Novák, the following salutation will be used: Thank you for your registration, Mr. Novák!
- If the gender is set to Female and the recipient’s last name is Svobodová, the following salutation will be used: Thank you for your registration, Mrs. Svobodová!
- If gender is not set, the following universal salutation is used: Thank you for your registration!
You can, of course, modify the text of the salutation (bold text in the example) to your liking. We recommend that you always test the salutation thoroughly on a small sample of test recipients using every possible variation (i.e. with both genders and a recipient without gender).

In the example above, we use data retrieved from the base variables contact.surname and contact.sex, which represent the last name and gender associated with each recipient. Alternatively, you can obtain input data from custom field or from a JSON file sent when dispatching a transactional email.
Conditions
Using the keyword if makes it easy to enter each condition:
{{ if product.price == 100 }} Expression is true {{ else }} Statement is null or false! {{ end }}
We can also use the variant if else:
{{ if product.price > 100 }}
Very expensive
{{ else if product.price < 100 && product.price > 50 }}
Expensive
{{ else }}
Cheap
{{ end }}
Cycles
Cycles are used to pass and display individual elements from the data field.
Basic cycle for product field passage
{{ for item in products }} This is the product {{ item.title }} {{ end }}
Data fields can be sorted by title
{{ for item in products | array.sort “title” }} This is the product {{ item.title }} {{ end }}
Within the cycle, it is possible to retrieve additional data regarding the passage information
{{ for.index }} – returns the passage index
{{ for.first }} – returns true if it is the first passage
{{ for.last }} – returns true if it is the last passage
{{ for.even }} – returns true if it is an even passage
{{ for.odd }}– returns true if it is an odd passage
Output formatting
{{ dateVariables| date.to_string “%d. %m. %Y %H:%M” }} – date and time formatting
{{ 5.4329 | math.round 2 }} – rounding to 2 decimal places
{{ textVariables | string.upcase }} – returns the entered text in upper case
{{ textVariables | string.downcase }} – returns the entered text in lower case
{{ textVariables | string.capitalizewords }} – capitalizes the first character of each word
{{ textVariables | string.base64_encode }} – encodes the entered text variable in base64
Data generation
{{ math.uuid }} – creates a new UUID
{{ math.random 1 100 }} – returns a random number within the range of 1 to 100
{{ date.now }} – returns the current date
{{ date.now.year }} – returns the current year