This article walks through creating a new document template — from picking the source datastore to designing the layout and testing with real data.
Step-by-Step
- Open Architect Panel → Document Templates and click New Template.
- Pick a name (e.g. “Invoice — Standard”), source datastore (e.g. Invoices) and output format (PDF).
- Choose a starting point — blank, or a built-in style (Modern, Classic, Minimal, Bold).
- In the editor, design the document:
- Header: logo and document title.
- Body: insert merge tokens via the picker —
{{customer.name}},{{date}},{{invoice_number}}. - Tables: drag-in a repeating-row block, bind to a child collection (e.g. line_items), define columns.
- Footer: terms, page numbers, contact info.
- Use the “Preview with sample record” button to see real output.
- Save.
Merge Token Syntax
{{customer.name}}— direct field.{{date|short}}— with a formatter.{{total|currency}}— currency formatter, uses tenant locale.{{#if discount}}…{{/if}}— conditional sections.{{#each line_items}}…{{/each}}— loops for tables.
Worked Examples
- Invoice template: Header logo, customer block, invoice number/date/due date, line item table with quantity/unit/total, subtotal/VAT/grand total, payment instructions footer.
- Quote template: Title page with project name, executive summary, scope sections with conditional includes, line items, signature page.
- Certificate: Landscape A4, decorative border, large title, attendee name in script font, signature, date.
- Multi-language template: Conditional sections based on customer's preferred_language field deliver an English or French version.