Skip to main content

Email template variables

Pour :Administrateur
View of the 'email template variables' page

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.

FormSyntax
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.

VariableWill be replaced byExample
{{nom}}Last name of the contact, with initial capitalCOHEN β†’ Cohen
{{prenom}}First name of the contact, with initial capitaldavid β†’ David
{{prenomHE}}Hebrew first name of the contact, as-is without transformationΧ“Χ•Χ“
{{mailing_unsubscribe}}Personalized unsubscribe URL for this recipienthttps://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).

VariableWill be replaced byAvailable?
{{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).

VariableWill be replaced byAvailable?
{{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:

VariableMessage campaignForm emailPayment emailSystem 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​