Define data and examples
Set up required and optional fields, objects, lists, and examples, then save the data contract with the catalog's next release.
User guide navigation
On this page
Before you begin
You need Content Author access. Open a template in a catalog you can edit. Agree with the connected-system team what information it can supply. A data contract defines which input is valid. It does not check whether a decision in a case is correct.
The data contract is part of the template. It has no versions of its own. You edit it in place, and it becomes part of the catalog’s next release.
Add fields
- Open the template’s Data contract tab and choose Edit.
- Choose + Add field to data contract. Enter a name you can use in expressions, such as
recipientName. Select its Type. - If every request must contain the field, tick Required. If the field may be left out, leave it optional.
- Add a Description. Explain what the field means, which unit it uses, or what it may contain.
| Information | Field type | Example |
|---|---|---|
| Name, reference, or plain paragraph | Text | recipientName |
| Calendar date | Date | 2026-10-14 |
| Date and time | Date-time | 2026-10-14T09:30:00Z |
| Amount | Number | 125.50 |
| Count | Integer | 3 |
| Yes/no decision | Yes/No | true |
| Related fields grouped together | Object | recipient.name, recipient.city |
| Repeated values or records | List | attachments, items |
| Formatted content inside a sentence | Rich text (inline) | A formatted greeting |
| Several paragraphs or lists | Rich text (block) | A supplied explanation |
A name starts with a letter or underscore. After that it may use letters, numbers, and underscores. Use caseNumber, not Case number. Integrations use the field name as an identifier. So do not change it once it is in use.
For an Object, add its child fields. For a List, select the Item type.
If each row contains several values, choose Object as the item type and add child fields. For example, items can contain description (Text), quantity (Integer), and amount (Number). How to show these rows is in Repeat data.
A simple field can have a Default value. If a request leaves the field out, Epistola uses the default. So a caller may leave out a required field that has a default.
Add useful examples
Under Test Data Examples, choose + New and fill in an Example Name. Enter values yourself, or start with Autofill. Then replace the Autofill values with realistic, fictional data. Epistola checks the example when you leave a field. Fix the field errors it reports.
You need at least one valid example. Save stays disabled until there is one, and you cannot delete the last example. A small useful set covers:
- A normal document.
- Optional values omitted.
- Long names, paragraphs, and addresses.
- An empty list and a list long enough to span pages.
- Both outcomes of each condition.
An optional field does not hide the sentence around it by itself. If missing data would leave a broken sentence, use a condition or a fallback value.
Save the contract
Choose Save. Wait until the editor shows Saved, then choose Done editing. The document editor saves automatically. That is separate from these contract controls.
There is no separate contract to publish. The contract goes into the catalog’s next release. It reaches documents when you publish the catalog with Publish…. How that works is in From template to document.
If Epistola shows Breaking Changes, read which fields changed. Existing input can become invalid when you add a required field, remove or rename a field, or change its type. Agree with the integration owner before you choose Save Anyway. When you publish the catalog later, a breaking contract change makes the release a new major version.
After you change the contract, check the variants that use it. Their cards show Not checked yet until you mark them ready or publish the catalog.
Check the document
Open the variant editor. Choose each saved example and preview the PDF. Check that expression chips use the correct paths. Check that repeated blocks show the right number of items.
A valid example proves the input has the right shape. Only reviewing the document tells you whether wording and layout are right.
If a field is missing from the picker or an example fails, use Data and expression problems.
Documentation
Guided tour
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 →