Email templating and customization
Get an overview of Monite’s email templates.
Overview
Monite allows its partners to manage and customize outgoing emails to enhance branding and, thus, deliver a unique experience for all entities. Monite uses templates to standardize email creation, providing partners with a solid foundation for customizations.
Email templates contain a set of variables and expressions that get replaced when the actual email is rendered. Monite provides a set of predefined email templates for each action. These template types are called system templates.
Entity logo
If the entity has a logo, outgoing emails from that entity will display the entity logo uploaded. Emails from entities without a logo will bear the Monite logo. For more information, see Update entity logo.
When using system templates, Monite automatically populates the template variables based on the available data. Partners can also create custom templates to tailor email content and design according to their preferences.
Template localization
Monite also supports the localization of email templates. Email template localization defines the language, date format, and usage of delimiters on currencies and other figures on an email template. By default, Monite provides localization of system templates for partners and entities in the UK, France, Germany, Spain, and the Netherlands. However, you can create custom email templates for as many languages or locales as you require by using the language
field on the POST /mail_templates
endpoint. The language
parameter accepts ISO 639-1 standard and defines currency and date formatting for all locales provided.
For every language you provide, Monite allows you to select a default template for each template type. For example, you can have default templates for sending invoice emails in English, Spanish, etc.
All email template variables must be provided in English regardless of the template’s language. For more information, see Variable list.
Custom templates
Custom templates allow Monite partners to personalize and customize their email content. Monite provides the /mail_templates
endpoint to create and manage email templates. You can customize email subjects and bodies using the subject_template
and body_template
fields in the request body. You can also embed Monite text templates within these fields as variables.
Embedded text templates
The text template used as a variable within a mail template must match the text template’s document type. For example, a text template type of email_body
created for the invoice
document type is only compatible with the body_template
field of an invoice’s mail template. For more information, see Text templates.
Custom templates allow you to incorporate variables as placeholders for various customer-specific and document-specific values. Partners must ensure that all variables comply with Monite’s predefined variables. For a complete list of Monite template variables, see the Variable list.
Email template syntax
- Monite uses the Jinja templating engine for email customizations. Therefore, all email body and subject templates must comply with the Jinja2 template syntax.
- You can only use Monite’s predefined variables to create and update custom templates. Using custom logic or conditionals within variables in your email templates will throw an error.
Template types
The following table contains the names of customizable Monite email templates and their corresponding email action:
Create custom templates
See Create and manage email templates to learn how to change the email templates used by Monite.