Templates and template versions
A template is the record you edit: its name, description and whether it is archived. Publishing it creates a template version, which never changes. Documents are always generated from a published template version, so editing the template later does not change documents you already generated.
| Record | Can change? | Holds |
|---|---|---|
| Template | Yes | Name, description, archived state |
| Template version | No | The source document version, the variable schema, clause references and generation settings |
| Generated document version | No | The generated PDF or DOCX and its hash |
Variables
- Declare each variable's type: string, date, decimal or money, boolean, enum, object, array, table or repeating section.
- Generation is refused when a required variable is missing or a template contains executable content.
- Identifiers keep their leading zeros, and decimal and money values are calculated exactly, without floating-point rounding.
- Each generated document records the template version and the inputs it was generated from.