ActiveManage Docs ← Back to activemanage.co.uk

Document Templates

Overview of Document Templates

Document templates produce printable PDFs (or Word, Excel, HTML) from record data — invoices, quotes, contracts, receipts, letters, certificates. You design the template once and the platform fills in the values for each generated document.

Side-by-side preview: left shows the template with merge tokens like {{customer.name}}; right shows the generated PDF with real data substituted in, including company logo, line items table, totals

Why Templates Matter

  • Brand consistency: Every generated document looks identical.
  • Compliance: Required clauses always present (terms, legal notices, VAT details).
  • Speed: One click vs manual document creation.
  • Auditable: A snapshot of every generated document is saved against the source record.

Output Formats

  • PDF: Universal, locked-content, signable. Default for most uses.
  • DOCX: Editable Word documents; useful when the recipient wants to amend.
  • XLSX: Excel — for templated spreadsheets like a price list with calculations.
  • HTML/email: Inline preview, send by email without an attachment.

Worked Examples

  • Invoice PDF: Header with logo, customer billing address, line items table, subtotal/tax/total, payment terms footer.
  • Quote PDF: Branded cover page, scope of work, line items, terms, signature page.
  • Contract DOCX: Multi-page legal text with merge fields for parties, dates and amounts.
  • Certificate of completion: Decorative landscape PDF with attendee name, course title, date.
  • Letter: Personalised correspondence on company letterhead — opening paragraph, body, sign-off.

Creating a Template

This article walks through creating a new document template — from picking the source datastore to designing the layout and testing with real data.

WYSIWYG template editor: left toolbar for layout controls, central canvas with header, body, footer regions, right panel for merge token picker showing available fields from the source record

Step-by-Step

  1. Open Architect Panel → Document Templates and click New Template.
  2. Pick a name (e.g. “Invoice — Standard”), source datastore (e.g. Invoices) and output format (PDF).
  3. Choose a starting point — blank, or a built-in style (Modern, Classic, Minimal, Bold).
  4. 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.
  5. Use the “Preview with sample record” button to see real output.
  6. 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.

Generating Documents from Records

Once a template is created, generation is a single click (or a single API call). This article covers the user experience, automation options, and the underlying mechanics.

Record action menu showing options: View, Edit, Duplicate, then a separator and 'Generate document' which expands to show template choices (Invoice, Quote, Receipt) each with a small icon and 'Generate' button

From the UI

  1. Open the source record (e.g. an order).
  2. Click Generate document.
  3. Pick the template (if multiple available).
  4. Choose action: view, download, email, attach to the record.
  5. Done — PDF generated and either previewed, saved or emailed.

From the API

POST /api/v1/documents/generate with body { template_id, record_id, action }. Useful for automated workflows — e.g. when an order is marked shipped, generate the invoice and attach to the order automatically.

From Workflows

Add a “Generate Document” step in any workflow. Configure template and action — fire-and-forget for the workflow author.

What's Saved

  • The generated file (PDF, DOCX, etc.) is stored in the file store.
  • A document record links source → generated → template + timestamp.
  • The source record's documents tab shows all generated outputs.
  • Re-generation creates a new version; old versions retained for audit.

Worked Examples

  • Order to invoice: When an order is marked shipped, a workflow automatically generates the invoice PDF and emails it to the customer.
  • Bulk certificate: Course manager clicks “Generate certificates for all completed attendees” — 200 PDFs generated and emailed.
  • Sales quote: Sales rep clicks generate, chooses template, downloads PDF, attaches in their own email client.
  • Contract on signup: When a new customer signs up at the Enterprise tier, a signed-ready contract DOCX is generated and routed for e-signature.