Message templates
Overview
A template is the text of a message to a customer or supplier with variables of the record, such as ${internalDocumentNumber} or ${company.name}. Messages are made from it by hand, by rules (reminders) and by automations.
[navigate:/communicationTemplates|Message templates|mail]
Each template has a format that follows its channel type:
- Text for SMS: plain text without formatting.
- MJML for e-mail: a designed e-mail that shows well in mail programs and on phones.
- HTML for other channels.
The format can be changed; the form then shows the field of that format.
SMS
Under the text of each language you see how many characters it has and how many SMS it takes. A single character with a diacritic switches the whole SMS to Unicode: 70 characters fit into one instead of 160. Variables are counted as written; the real length depends on their values.
Designing an e-mail
For the MJML format, the form shows a preview of the e-mail in each language, already in its layout. Edit (Design the e-mail for an empty language) opens the full-screen designer. An empty language also offers Start from: a ready-made design (notification, invoice sent, payment reminder).
In the designer:
- Design: on the left the blocks to add (section, two columns, heading, text, image, button, line, space, social networks, table, HTML) and the tree of the e-mail’s blocks, where they can be moved, duplicated and removed. In the middle the preview, where a click selects a block; a text and a button’s label are typed right in the preview (Esc gives the change up, variables stay whole). On the right the properties of the selected block: colours, font, alignment, padding, link, text with bold, italic, link and a variable.
- Undo and Redo (Ctrl+Z, Ctrl+Shift+Z) take changes back.
- Computer / Phone switches the width of the preview.
- Copy the design of another language takes the design of another language; then only the texts need translating.
- Code shows the e-mail as MJML, for what the blocks do not offer. Code that cannot be read as blocks stays in Code with the error.
Use the design puts the e-mail back into the form; it is saved with the template.
The preview shows variables as written, highlighted; their values are filled in only in the message.
Layouts
A layout is a template of type Layout: the frame e-mails go into, typically the logo on top, a footer with the company’s details and its colours. The place of the e-mail’s content is ${content} (the Content of the e-mail block in the designer) and must be in every language.
- An e-mail uses its own layout, else the organisation’s default layout. Only one layout can be the default.
- Setting up reminders creates a ready-made default layout when the organisation has none.
The company in templates: ${organisation.name}, ${organisation.registrationNumber}, ${organisation.vatId}, ${organisation.email}, ${organisation.telephone}, ${organisation.brandColour} and ${logo}. The logo is the logo for printed documents and is sent inside the e-mail, so it does not have to be public anywhere. Set the brand colour in the organisation’s settings under Logo and documents.
[navigate:/settings/organisation-edit|Organisation settings|settings]
The assistant
- In the designer: type what to change into the bar under the toolbar (“add a button Pay”, “make the header blue”) and choose Design. The preview shows the proposal with an explanation; Accept puts it in (Undo takes it back), Reject drops it.
- In the assistant: ask for a new template or a change of an existing one (“write an SMS about a shipped order”). The assistant prepares the template into a change set; nothing is saved until you publish the change set.
The assistant gets only the template’s text and the names of the fields, never data of records, and uses only variables the template can fill.