Document templates in Configuration
Overview
Document templates are the Word and Excel files Kompass fills in with your data: proposals, invoices, purchase orders and reports. You manage them in Configuration, on the Templates tab of each section, below the section's email templates. You can upload and replace template files, change their settings, choose who can use them and test them with a real record.
How to write the template files themselves (variables, loops, tables, CSV output) is covered in Document template formats: DOCX, PDF, XLSX. Email templates on the same tab are covered in Email templates in Configuration.
Opening the templates
Templates belong to an organization. If you work in several organizations, switch to the one you want to change first: the tab lists the templates linked to that organization, and a new template is linked to it only.
- Open the user menu and choose Configuration.
- Choose the section the documents belong to, for example Projects, Invoices or Purchase orders.
- Open the Templates tab and scroll to Document templates.
These sections have document templates: Projects, Clients, Sales orders, Invoices, Payments, Contacts, Diary, Tasks, Equipment, Suppliers, Purchase orders, Bills, Bill payments, Expenses, Leave and Profiles.
The Templates tab shows only when you can add, change or delete at least one kind of template in that section. Permission to view document templates alone does not show the tab, but you need it as well to see the list of templates.
The template list
Each kind of document template has its own card, listing its templates with their Name, Kind, File, whether they are Shared with other organizations, and the Groups that can use them.

- Add template opens the New template dialog. Enter a Name, choose the File and set the Output filename (all three are required). For a report, also choose at least one entry under Report sources. Then choose Save.
- Choose a template's name to open it.
- The bin icon deletes a template after you confirm.
Each of these needs the matching permission (add, change or delete) for that kind of document template. Without permission to change templates, a template opens read-only.
Deleting a template cannot be undone. A template shared with other organizations is not deleted: Kompass removes it from your organization only, and the other organizations keep it.
Editing a template
The dialog shows the template's settings on the left and the Test render panel on the right.

- Name: how the template appears in the lists where people choose a document or report.
- File: the template file, a Word (.docx) or Excel (.xlsx) file. Download saves the current file so you can edit it on your computer; Choose file uploads a new one. Other file types are refused.
- Output filename: the name of the file people download. It can use variables, for example
{{ id }}_{{ name }}_Proposal.docx. - Kind: Detail (rendered per object) for a document made from one record, such as a proposal or an invoice, or List (report over a date window) for a report. Only project, invoice and purchase order templates can be detail templates; in the other sections the kind is fixed to List.
- Report sources: reports only. The data the report is built from; a report needs at least one. An Excel report must have a sheet for its data: Kompass Data with one source, or one sheet per source, named after it, with several. See Document template formats: DOCX, PDF, XLSX.
- Allow future: project and diary reports only. Lets the report's start and end dates be in the future, for example to forecast planned work. Off by default.
- Template context version: how values reach the template. V1 (legacy) hands over dates and numbers as formatted text, and on project documents a parent quote item's price includes its children's values. V2 hands over real dates and numbers for the template to format, and every quote item keeps its own value. New templates use V2. Changing the version of an existing template changes what its file receives, so update the file at the same time. Invoice and purchase order templates do not have this setting.
- Csv delimiter, CSV byte order mark and CSV export: these show on every template but only apply to Excel templates. They let people download the document as a CSV file. CSV export is the sheet that goes into the file: No CSV export, Active sheet or one of the file's sheets by name. Left empty, the template offers no CSV download. On a report with several report sources, the CSV sheet must be one of its data sheets, not a layout sheet, and the same applies to the active sheet. After you choose a new file, save, then open the template again to pick one of its sheets by name. See CSV output.
- Start and End: optional. A report is offered only while today is between these dates. A detail template is offered when these dates overlap the dates being worked on, which are today unless the screen asks for a date range. Leave both empty to offer the template at all times.
- Groups: the user groups that can use the template. Leave it empty to let everyone use it. Users also need permission to view that kind of document template.
Some kinds have more settings:
- Project templates: Show input fields for Start & End dates?, Show email sending options? (sending needs an email template with the trigger "Document Sending (manual)") and Include quote items marked "Exclude from quote"?, which adds those quote items to the document and to its price totals.
- Invoice templates: Invoice start/end required, for templates that use diary entries or timesheets, and Include all allocations, which includes the allocations of all accepted quote items.
Choose Save to keep your changes.
Templates shared with other organizations
A template can be shared by several organizations. A notice at the top of the dialog says so. Changes to a shared template apply to every organization that uses it, so saving one needs the permission Can change document templates shared with other organisations (under Tenant configuration) as well. Without it, the dialog is read-only and asks you to change the template in Kompass Admin. Removing a shared template from your organization needs only the delete permission.
Testing a template
An existing template has a Test render panel. It needs permission to change the template, and it is not available until a new template is saved.
- For a detail template, pick a Record to fill the template with. The list starts with the most recently changed record; type to search. For a report, set the First day and Last day; they start at the current month.
- Choose Test render. Kompass creates the document and downloads it in the template's own format.
Save your changes first: the test uses the saved template. For a detail template, you need permission to view the chosen record, and for project and invoice documents, permission to view project financials. For a report, you need permission to export the list the report is built from, and some reports also check the export permission of their other report sources. The test ignores Groups, so a successful test does not show that a group can use the template.
When something goes wrong
- Unsupported file format or File is not a valid .docx document (or .xlsx). The file is not a Word or Excel file, or was only renamed. Save it in one of these formats and upload it again.
- Sheet "..." in the template covers ... rows and ... columns, more than a template sheet can have (1000000 cells, at most 500 columns). The sheet's used area is too large. This usually comes from formatting applied to empty rows or columns. Delete the empty rows and columns after the data in that sheet, save the file and upload it again. The same message appears when creating or testing a document from an older template with such a sheet.
- A report template needs at least one data source. Choose at least one entry under Report sources.
- Template is missing required sheet(s): ... The Excel report has no sheet for its data. Add a sheet with the name the message gives, then upload the file again.
- CSV export is only available for xlsx templates. Clear CSV export on a Word template.
- Sheet "..." is not in the template file. The new file has no sheet with the name chosen under CSV export. Choose No CSV export and save, then open the template again and choose one of the new file's sheets.
- Cannot create document! Template file could not be found. The template's file is missing, when you download it or create a document. Upload it again with Choose file.
- You do not have permission to view project financials, so this template cannot be test-rendered. Ask an administrator for the permission, or test with a user who has it.
- You do not have permission to export the list this report is built from. Ask an administrator for the export permission of the section and of the report's other sources.
- The record does not exist in this organisation. Pick a record from the organization you are working in.
- The end date must be on or after the start date. Check the First day and Last day of a report test.
- A message with a line number or a variable name means the template has an error, such as a typo in the syntax or a variable that does not exist.