Create your first template
Create a decision letter, supply example data, build the document, and publish it in a catalog release.
User guide navigation
On this page
What you will make
A decision letter that shows a recipient, case number, and decision date. You will preview it with fictional data and publish it in a release of its catalog. You can follow this guide without watching a video or enrolling in training.
Before you begin
You need access to a tenant, a catalog you can change, and Content Author access. To publish the catalog, you also need Content Publisher access. A catalog that Epistola supplies is read-only. If you only see read-only catalogs, ask your administrator for a catalog you can change.
Use fictional examples. Examples you save belong to the template. Other authors may see them.
1. Create the template
- Select the tenant where the letter belongs.
- Open your catalog, for example through All catalogs in the side nav. The bar at the top now shows the catalog name and Next release.
- Open the catalog’s Templates page and choose New template.
- Enter Decision Letter as the Name. Epistola fills in the Template ID
decision-letter. Keep it. - Choose Create template. The template opens on its Data contract tab. It already has a Default variant.
A template describes a document type. The variant contains its layout. If you need another language or layout, see Templates, variants, and releases.
2. Define the data
On the Data contract tab, choose Edit. For each field, choose + Add field to data contract. Then set its name, type, and the Required box in the detail panel:
| Name | Type | Required | Purpose |
|---|---|---|---|
recipientName |
Text | Yes | Recipient of the letter |
caseNumber |
Text | Yes | Case reference |
decisionDate |
Date | Yes | Date of the decision |
Choose + New to add an example named Standard decision. Enter these values:
recipientName: Alex ExamplecaseNumber: CASE-2026-042decisionDate: 2026-10-14
An application later sends the same data like this:
{
"recipientName": "Alex Example",
"caseNumber": "CASE-2026-042",
"decisionDate": "2026-10-14"
}
Choose Save, then Done editing. Save stays disabled until the contract has at least one valid example.
You do not publish the contract on its own. It is part of the catalog’s next release, together with the layout.
Other field types, optional values, and lists are in Define data and examples.
3. Write the letter
- Open the Variants tab and choose Open editor on Default.
- In the Data selector in the toolbar, choose Standard decision.
- Choose Text in the Blocks panel. Type a heading such as Decision on your application. Select the text and choose H2 in the formatting menu, so the heading shows the document structure.
- Add a Text block for the greeting. Type
Dear, then type{{. The Expression dialog opens. Under Field, chooserecipientNameand choose Save. Finish with a comma. - Add another Text block for the reference and date. Insert
caseNumberthe same way. FordecisionDate, choose the field and then a pattern in the Format selector, such asdd-MM-yyyy. For your own format, see Format dates and numbers. - Add the decision wording and a fictional sign-off as ordinary text.
- Wait until the toolbar says Saved. The editor saves automatically.
The greeting should contain an expression chip, not the literal text recipientName. The chip displays the value from the chosen example.
4. Check a second example
Choose Preview in the toolbar and confirm the name, case number, and date appear. A preview carries a watermark, because it renders your unpublished work.
Return to the Data contract tab and choose Edit. Add a second example with a much longer fictional recipient name and case reference. Choose Save, then Done editing. Then select this example in the editor’s Data selector. Check that the greeting wraps correctly and the sign-off stays readable.
The full checklist is in Review a template.
5. Publish the catalog
The editor saves your work in the catalog’s next release. The bar at the top counts the changes you have not published yet.
- Wait until the editor reports Saved.
- Choose Publish… in the bar at the top. The dialog lists what changed and the number the new release gets.
- Choose Publish. The bar then says that everything is published.
- If a message blocks publishing, fix it and try again. Publishing problems helps with the common causes.
You now have a published release with the decision letter. Documents are generated from the highest release (the highest version number), unless the application asks for a specific version or names an environment. From template to document explains how that works.
Give the connected-system team the tenant, the catalog, the template ID, the variant, and the data examples you agreed on. The template’s API tab shows what an application should send.
To change the letter later, follow Update a published template.
Documentation
Exercises
Integration guides
Epistola is open source, not free of cost. The organisations that use it fund its development, through Epistola or an Official Partner. We are steward-owned: fair prices, no profit maximisation. How Epistola is funded →