Template Management
This feature allows an administrator to create and maintain reusable email templates. A template holds a subject and a body with named placeholders, such as a customer name or an order number, which are replaced with actual values when the template is applied to an email. Templates are applied from the email form, as described in Applying a Template.
Template List
When entering the Templates view, a grid displays all templates registered in the system, sorted by last modification date descending.
Filters
The following fields are available to narrow down the results displayed in the grid:
- Template name: Filters templates whose name contains the entered text, ignoring case.
- Template description: Filters templates whose description contains the entered text, ignoring case.
- Template status: A dropdown that filters by status, Active or Inactive. See Active and Inactive Templates.
The Filter button becomes active as soon as any filter field has a value. Pressing Enter in either text field applies the filter as well. Clicking Clear resets all filters and refreshes the grid.
On narrow screens the filter fields are replaced by a single Filter button that opens a dialog containing them.
Template Grid
The grid shows the following columns for each template:
- Name: The name the template is chosen by when composing an email.
- Description: An optional description of the template's purpose.
- Language: The language the template is written in, as a language tag such as
esores-AR, or Default for the default version. See Language Versions. - Status: A coloured badge, Active (green) or Inactive (grey).
- Placeholders: The number of placeholders the template declares.
- Last modified: The date and time the template was last saved, shown in the time zone reported by the browser. The grid is sorted by this column (descending) by default.
- Actions: A contextual menu with the actions available for the template. See Template Actions.
The Name, Language and Last modified columns are sortable, and all columns can be resized by dragging their header separators. On narrow screens only the Name, Status and Actions columns are shown.
When no templates match the current filters, the message "No templates found" is shown in place of the grid.
In the top-right corner of the filter bar, the Create button opens the Create Template dialog, described in Editing a Template. A new template starts as an HTML template, with the visual editor open.
Template Actions
Every action is reached through the ⋮ menu in the Actions column:
- View: Opens the template in the View Template dialog, in read-only mode, showing its preview. The other tabs remain available to inspect the body, but nothing can be changed.
- Edit: Opens the template in the Edit Template dialog.
- Duplicate: Opens an unsaved copy of the template in the Duplicate Template dialog. The copy keeps the subject, body, placeholders, language and status of the original, and is named "Copy of" followed by the original name. It is stored as a new template only when it is saved.
- Delete: Opens the Delete template confirmation, which names the template. Clicking Delete removes it.
Warning
Template deletion is permanent and cannot be undone. Emails already composed from the template are not affected.
Editing a Template
Clicking Create, or Edit or Duplicate from the contextual menu, opens the template editor. The name of the template is shown beside the dialog title.
The editor contains:
- Subject: The subject line of the emails composed from the template. It can contain placeholders.
- Placeholders: The list of placeholders available to the template, used to insert them into the body and to manage them. See Placeholders.
- The body editor, described below.
Body Editor
The body editor offers three tabs:
- Design: A visual editor. Its toolbar provides undo and redo, block formats such as paragraphs and headings, bold, italic, text colour, left, centre and right alignment, bulleted and numbered lists, links, images and tables. Placeholders are shown as highlighted blocks that are moved and deleted as a whole, so they cannot be broken by accident.
- Source: The text of the body, as HTML source for an HTML template or as plain text for a plain-text template.
- Preview: The email as the recipient would see it, with each placeholder replaced by its sample value. See Preview.
Next to the tabs, two buttons adjust the editor:
- Split view: Shows the preview beside the Design or Source tab, updated as the template is edited. It is not available while the Preview tab is open, nor on phones and tablets in portrait orientation.
- Maximize: Enlarges the editor to the full screen, hiding the subject and the placeholder list. While maximized, the button becomes Restore, which returns the editor to its normal size.
A template does not have an HTML setting of its own: it is an HTML template when its body contains HTML markup, and a plain-text template otherwise. Text written in the Design tab is always HTML. To write a plain-text template, write the body in the Source tab without any markup. A plain-text template opens on the Source tab; switching it to the Design tab converts its text into HTML paragraphs.
Action Buttons
- Edit details: Opens the Template details dialog to change the template's name, description, language and status. See Template Details.
- Save: Saves the template. For a new or duplicated template, it first opens the Save template dialog to ask for the template's name and details. An existing template is saved at once.
- Cancel: Closes the dialog without saving.
If the template has unsaved changes, closing the dialog with Cancel, with the Escape key, or through the dialog's close control opens a Discard changes confirmation first. Clicking Discard discards the changes; cancelling returns to the editor.
In the View Template dialog only the Cancel button is shown, and it closes the dialog.
When the template cannot be saved, the reason is shown as a notification, or on the Name field when the problem is the name. A template cannot be saved when:
- Its name is missing, or another template already uses the same name in the same language.
- A placeholder name is not valid, or the same placeholder is declared twice.
- In an HTML template, a placeholder is broken up by formatting, for example when only part of its name is bold, so it would never be replaced.
- The name, description, subject, or a placeholder's name, label or sample value is longer than allowed.
- The body is longer than the maximum the application allows.
Template Details
The Save template dialog, shown when a new or duplicated template is saved, and the Template details dialog, opened with Edit details, contain the same fields:
- Name: Required. The name the template is chosen by when composing an email. Up to 255 characters, and unique within the template's language.
- Description: Optional. A description of the template's purpose, shown in the grid. Up to 1000 characters.
- Language: The language the template is written in: Default, or one of the languages configured for the application. The field is shown only when the application has been configured with languages. See Language Versions.
- Active: Checked for new templates. Only active templates are offered when composing an email.
In the Save template dialog, Save saves the template. In the Template details dialog, Done keeps the values, which are saved together with the template. In both dialogs, Cancel restores the values the fields had when the dialog was opened.
Active and Inactive Templates
Clearing the Active checkbox withdraws a template from the email form without deleting it. An inactive template remains in the grid, can be edited, and can be activated again at any time.
Placeholders
A placeholder is a name between double braces, such as {{customerName}}, written in the subject or the body. When the template is applied, each placeholder is replaced with the value entered for it. A name starts with a letter, followed by letters, digits or underscores; it cannot contain spaces. Spaces inside the braces are allowed, so {{ customerName }} is the same placeholder. Text between double braces that is not a valid name is left exactly as written.
Placeholders do not need to be declared to work, but declaring one adds a label, a sample value for the preview, and the options described below.
Placeholder List
The Placeholders field lists the placeholders available to the template. Typing in it searches the list. Each entry shows the placeholder's label and name, where it comes from, and how many times the subject and body use it (Used:). Placeholders declared by the template show "From template".
Selecting a placeholder inserts it into the body. In the Design tab it is inserted at the cursor position, or at the end of the body if the editor has not been clicked yet. In the Source tab it is added at the end of the body. To use a placeholder in the subject, type it there.
The application can also offer placeholders of its own, which are listed under the group name the application gives them. In that case, a Filter type selector next to the list restricts it to All, From template or From application placeholders, each with its count. Inserting an application placeholder declares it on the template, with the label and sample value the application provides.
Adding and Editing a Placeholder
The + button next to the list opens the Add placeholder dialog. The pencil icon on a placeholder declared by the template opens the same form as Edit placeholder:
- Name: Required. The name used between the braces. It must start with a letter, followed by letters, digits or underscores, and must not already be declared by the template. Up to 100 characters.
- Label: Optional. A readable name, shown in the placeholder list and as the field label when the template is applied. Up to 255 characters.
- Sample value: Optional. The value used in the preview, and shown as a hint when the template is applied. It is never sent in an email. Up to 1000 characters.
- Options:
- Required: A value must be entered for this placeholder when the template is applied.
- Value is HTML: In an HTML template, the value is inserted as markup instead of as text. It is meant only for values the application controls, such as a signature block.
Save keeps the placeholder and Cancel discards the changes. The placeholder is saved together with the template.
Adding a placeholder declares it, but does not insert it into the body: select it in the list to insert it. Likewise, renaming a placeholder does not change the places where the template already uses the previous name.
Deleting a Placeholder
The trash icon on a placeholder declared by the template opens the Delete placeholder confirmation. If the template still uses the placeholder, the confirmation warns that those uses render empty unless a value is supplied. Deleting the declaration does not remove the placeholder from the subject or the body.
The pencil and trash icons are shown only for placeholders declared by the template, and only while editing.
Undeclared Placeholders
When the subject or body uses a placeholder that neither the template nor the application declares, a warning below the placeholder list names it: "Used but not declared". This is usually a typing mistake. Undeclared placeholders still work: when the template is applied, a field is shown for each of them, labelled with its name, and they render empty when no value is entered.
Preview
The Preview tab, and the preview shown with Split view, display the email the template produces. A first line shows the subject, preceded by "Subject:". Below it, the body is shown as the recipient would see it, with each placeholder replaced by its sample value; placeholders without a sample value are left empty. Required placeholders are not enforced in the preview, so an unfinished template can still be previewed.
When the body is empty, the preview shows "This template has no content to preview." When the template cannot be rendered, for example because the result exceeds the size the application allows, the preview shows "This template could not be previewed" followed by the reason.
Language Versions
When the application has been configured with languages, a template can be written in several languages under the same name: a Default version and one version per language. Each version is a separate template in the grid, with its own subject, body and placeholders, and the Language column tells them apart. A name can be used only once per language.
When an email is composed, the Apply template dialog offers each active template once, in the version that best matches the language of the user composing it:
- The version for the user's exact language and region, such as
es-AR. - The version for the language alone, such as
es. - The Default version.
A template that has none of these versions is not offered to that user.
Limited Version
Templates are not restricted when the application runs without a valid Email Manager licence: any number of templates can be created and applied. The daily sending limit described in Email Management applies when an email composed from a template is sent.