A Document Template is the file that defines the layout and appearance of your generated output. You author it in a familiar tool — Microsoft Word, Excel, PowerPoint, Google Docs, Google Sheets, or Google Slides — and enrich it with Elements and Expressions that tell Doctavian where and how to inject data at generation time.
Templates are reusable. A single template can be used across multiple Document Solutions, and a single Document Solution can have multiple templates — useful when the same data needs to produce different output formats or layouts.
Doctavian supports six template formats across Microsoft and Google ecosystems. See the Supported File Formats for the full list of formats and the output types each can produce.
Templates are authored by embedding merge fields and elements directly in the document, right where you'd normally create it. That's also where it's stored and edited — Doctavian only ever receives a temporary copy, uploaded to perform the generation and discarded afterward.
Merge fields follow the notation {!Object.FieldName} and are replaced with real values at generation time. Elements handle more complex rendering logic — repeating rows, conditional sections, images, barcodes, and more — using their own tag syntax. See the Elements Reference and Expressions Reference for the full syntax and available functions.
Create your Word document, Excel workbook, or PowerPoint deck exactly as you normally would. Then go through it and swap in merge fields wherever real data should appear, add elements for anything that needs to repeat or render conditionally, and layer in expressions wherever a value needs formatting or logic. Once that's done, your template is ready to be copied for generation.
Create your Google Doc, Sheet, or Slide deck exactly as you normally would. Then go through it and swap in merge fields wherever real data should appear, add elements for anything that needs to repeat or render conditionally, and layer in expressions wherever a value needs formatting or logic. Once that's done, your template is ready to be copied for generation.
On the Salesforce-connected platform, an Add-in (Word, Excel) and Add-on (Docs, Sheets) help you browse fields and insert elements without typing the notation by hand — a shortcut, not a requirement. Neither supports PPTX or Slides. See the Maven Documents guide if you're using them.
When you register a template in Doctavian, beyond the file itself, you can configure:
{!Contract.Name})See the full set of template endpoints in the API Reference.
Ready to put this into practice? See Multi-locale Output for a step-by-step guide to configuring locale and language per request.
Template Labels allow you to define translatable text strings in your template. Instead of maintaining separate template files per language, you define labels once and map them to translations — Doctavian selects the right language at generation time based on the Language field on the template or Document Request.