Create a template
A template is the starting point for one document type, such as a decision letter, invoice, permit, or confirmation. It holds everything needed to produce that document:
- the layout;
- the data it expects;
- the presentation variations for languages or brands.
Every template lives in a catalog: a collection of templates and everything they are built from, published as a whole with one version number.
Getting started takes very little: a clear name. Epistola creates the rest, so you can move straight into the editor.
Steps
- Open the tenant where the document belongs.
- Under Catalogs, open the catalog for the document.
- Go to Templates in the catalog’s side menu.
- Choose New template.
- Enter a name a business user will recognise. Epistola fills in the Template ID from it.
- On the template’s Data contract tab, describe the information the document needs.
- Save at least one realistic example.
What Epistola creates with the template
A new template is never empty. Epistola gives it a first variant, marked as the default presentation of the document. You can open the editor right away and refine the details later.
Everything you change goes into the catalog’s Next release. Applications do not get your changes until someone publishes the catalog. Agree with the owner of the connected system which release of the catalog it uses.
Expected data and examples
The data contract lists what the document expects: recipient, reference number, dates, decisions, line items. It is a JSON Schema, and its root is always an object. Field names must be expression-safe:
- they start with a letter or underscore;
- they use only letters, digits, and underscores.
A data contract needs at least one example. You therefore cannot delete the last remaining example until you save another one.
Examples make design and preview possible: they show a realistic document instead of an empty one. Examples stay test data. Epistola never puts real user data into them.
Template or variant?
Keep one template per document type. If the same document needs another language, brand, channel, or layout, add a variant, not a new template. Every variant shares the template’s data contract. The data stays the same while the presentation changes.
Create a separate template only when the document itself differs: another purpose, another owner, or another approval flow.
In short
- A template is the starting point for one document type. Epistola gives it a first variant, so you can open the editor right away.
- The data contract describes the data the document expects, and the examples let you design and preview with realistic data.
- Keep one template per document type, and add a variant for another language, brand, channel, or layout.
Background: names and identifiers
These rules apply to the name and the Template ID from step 5.
The name is for people. It can be up to 100 characters, and you can change it later. You can also add a description: notes for authors about what the template is for, up to 2,000 characters. The description never appears in the document.
Behind the name sits a technical identifier that the API and integrations address. It has 3 to 50 characters: lowercase letters and digits, in parts separated by single hyphens. It may start with a digit. Some words are reserved and cannot be used, such as new, edit, and admin. Once integrations depend on the identifier, treat it as stable.
Background: themes
You do not have to choose a theme for a first template. This section explains where the look of the document comes from.
Presentation comes from a theme: typography, colours, paper size, and margins. A template can select a default theme. A single variant can override it when one brand needs its own look. Epistola resolves the theme per variant, from most specific to least:
- the variant’s own theme override;
- the template’s default theme;
- the catalog’s default theme.
If none of these is set, Epistola uses its built-in rendering defaults: A4 paper, 20 mm margins, and a Helvetica-compatible built-in font. A new catalog starts with the tenant’s house theme as its default theme.
What happens next
Open the editor and build the document: text, tables, conditionals, loops, headers, and footers. After review, publish the catalog. The release keeps the content and the theme as they were when you published. Publishing often belongs to a different role than authoring.
Documentation
Exercises
Integration guides