Email template variables
Variables are personalization tags that you insert in the content of an email and that are replaced when sending by the real data of the recipient or context.
This page lists all available variables in Unisoft, by usage context.
General syntaxβ
All Unisoft variables follow the same syntax: double opening and closing braces around the variable name.
| Form | Syntax |
|---|---|
| Simple variable | {{variable_name}} |
Sensitivity:
- Case sensitive:
{{prenom}}works,{{Prenom}}does not work. - No spaces around the name:
{{ prenom }}does not work (use{{prenom}}strictly). - No conditional variables: no
{{#if}}, no{{else}}. The Unisoft templating engine is deliberately minimal. - No loops: no
{{#each items}}...{{/each}}. No dynamic lists.
Context 1 β Message campaignsβ
Applies to emails sent via the Message Campaigns module (/app/messages/campagnes), whether the content is entered directly or via an email template.
| Variable | Will be replaced by | Example |
|---|---|---|
{{nom}} | Last name of the contact, with initial capital | COHEN β Cohen |
{{prenom}} | First name of the contact, with initial capital | david β David |
{{prenomHE}} | Hebrew first name of the contact, as-is without transformation | ΧΧΧ |
{{mailing_unsubscribe}} | Personalized unsubscribe URL for this recipient | https://api.unisoft.world/mailing/unsubscribe/<org>/<send> |
About {{mailing_unsubscribe}}β
This variable is automatically injected at the bottom of the email if you do not place it yourself in the content. Concretely:
- If you don't put
{{mailing_unsubscribe}}in your email β Unisoft adds a centered Unsubscribe link at the very bottom of the body, just before the</body>tag. - If you put
{{mailing_unsubscribe}}somewhere in your email β Unisoft replaces your tag with the URL, and does not add a block at the bottom.
This is useful if you want to control the position and style of the unsubscribe link.
Example usage in an HTML template:
<p style="font-size: 11px; color: #888; text-align: center;">
If you no longer wish to receive our communications:
<a href="{{mailing_unsubscribe}}">click here to unsubscribe</a>
</p>
See Email unsubscribe for the detail of the mechanism.
Context 2 β Form emailsβ
Applies to automatic emails triggered upon submission or validation of a Unisoft form (submitEmailTemplate and valideEmailTemplate fields in the configuration of a form).
| Variable | Will be replaced by | Available? |
|---|---|---|
{{nom}} | Last name of the person who submitted the form | β |
{{prenom}} | First name of the person who submitted the form | β |
{{prenomHE}} | Hebrew first name | β |
{{__org_name}} | Name of your Unisoft organization (initial double underscore) | β |
{{montant}} | Amount paid | β NOT AVAILABLE |
{{devise}} | Payment currency | β NOT AVAILABLE |
Context 3 β Payment and tax receipt emailsβ
Applies to automatic emails sent upon a validated payment (confirmation to the donor, sending of the tax receipt).
| Variable | Will be replaced by | Available? |
|---|---|---|
{{nom}} | Donor's last name | β |
{{prenom}} | Donor's first name | β |
{{__org_name}} | Name of your Unisoft organization | β |
{{montant}} | Amount paid (number without currency) | β |
{{devise}} | Symbol or code of the currency (β¬, $, βͺ, Β£) | β |
This is the only context where {{montant}} and {{devise}} work.
Typical example in a tax receipt template:
Dear {{prenom}},
We acknowledge receipt of your donation of {{montant}} {{devise}}
for the benefit of {{__org_name}}.
Please find attached your tax receipt.
Kind regards,
The {{__org_name}} team
Context 4 β System notificationsβ
System notifications (received payment alert sent to the admin, technical error alert, etc.) do not use variables: their content is static, generated by the Unisoft backend.
You cannot customize these notifications via an email template.
Summary tableβ
Overview β which variable works in which context:
| Variable | Message campaign | Form email | Payment email | System notif |
|---|---|---|---|---|
{{nom}} | β | β | β | β |
{{prenom}} | β | β | β | β |
{{prenomHE}} | β | β | β | β |
{{__org_name}} | β | β | β | β |
{{montant}} | β | β | β | β |
{{devise}} | β | β | β | β |
{{mailing_unsubscribe}} | β | β | β | β |
Behavior of empty variablesβ
When a variable is used but the corresponding data is empty or missing on the contact, Unisoft replaces it by an empty string (not by a default text, not by an error).
Example: a contact without a first name will receive:
Dear Cohen,
instead of:
Dear David Cohen,
Frequent pitfallsβ
- Incorrect case:
{{Prenom}}or{{PRENOM}}are not recognized. Always lowercase. - Approximately spelled variable:
{{prenoms}},{{first_name}},{{name}}do not work. Respect the exact syntax above. - Variable from another context: using
{{montant}}in a message campaign β the recipient will literally see{{montant}}. - Spaces in braces:
{{ prenom }}does not work, use{{prenom}}. - Formatting attempt:
{{prenom.toUpperCase()}}does not work, the variables are raw.
Unsupported casesβ
For information, here is what no Unisoft templating engine knows how to do:
- β Conditional variables (
{{#if prenom}}...{{/if}}) - β Loops on a list (
{{#each contacts}}) - β Number formatting (
{{montant | format: 'currency'}}) - β Calculations (
{{montant * 0.66}}) - β Nested variables (
{{contact.adresse.ville}}) - β Custom variables defined by the admin (the available variables are fixed by the Unisoft code)
If you need these advanced features, it's generally a signal that the use case should be handled elsewhere than with a simple template (for example: by segmentation into multiple targeted campaigns).
Going furtherβ
- Email templates β the management of reusable templates
- Create a message campaign β where to insert variables in a campaign
- Email unsubscribe β detail on
{{mailing_unsubscribe}}