Data Export Templates define how Docupath's structured extraction output is mapped to the exact schema expected by downstream systems. After AI extracts and normalises a document, and after transformations have been applied, the export template translates internal field names into the XML-based target format.
Templates use mustache variable syntax ({variable_name}) to dynamically insert extracted values into a predefined structure, eliminating the need for manual mapping or custom integration code.
How It Works
Template Purpose
Every receiving system has its own expectations for data structure. Export templates bridge these differences by providing a reusable mapping layer between Docupath's internal field representation (DIF - Docupath Internal Format) and the target schema. Templates are defined once and applied consistently across all documents of a given type.
Template Editor
The template editor is accessed via Settings → Data Export Templates and provides:
Format Selector - Choose or create a new export format
Document Type Selector - Assign the template to a specific document type (Invoice, Purchase Order, Medical Consumption Record, etc.)
Variables Panel - Browse or search available fields for insertion
Live Editor - Build the export body with embedded mustache variables
Save Button - Commit the mapping for integration use
Mustache Variable Syntax
Templates use mustache-style placeholders wrapped in curly braces: {variable_name}. During export, these placeholders are dynamically replaced with the actual extracted values for each document. Common variables include fields like {buyer_name}, {total_amount}, {vat_rate}, and {country_code}.
Creating a Template
Navigate to Settings → Data Export Templates
Click + Add New
Name the template using a clear versioning convention (e.g.,
UBL-Invoice-Nordics-v1.0)Select the document type
Build the export body in the live editor, inserting variables via the + icon or search bar
Validate the structure (check XML tags etc.)
Click Save
Template-to-Document Type Assignment
Each template is assigned to a specific document type. Only one data export template can be active at a time for all file types in the destination format configuration. This means the active template governs the output structure for all exported documents of that type.
Supported Configurations and Options
Configuration | Detail |
Variable syntax | Mustache-style: |
Document type assignment | One template per document type per active format |
Output formats | XML-based |
Variable search | Browse or search available fields in the Variables Panel |
Versioning | Naming convention recommended (e.g., |
Template scope | Tenant-wide (not scoped to organisation or country) |
Other Technical Specifications
Parameter | Detail |
Template format | Freeform text with embedded mustache variables |
Active templates | One active template per document type in the destination format |
Variable source | All fields available in the Docupath Internal Format (DIF) |
Output validation | Manual - validate XML structure before saving |
Template editing access | Admin role only |
Notes
Only one data export template can be configured at a given time for all file types - changing the active template affects all future exports
Templates do not handle conditional logic - use Transformations for value manipulation before export
Missing fields in a document will produce empty values in the export output; handle optional fields with empty string defaults or optional XML nodes
Hardcoding values in templates is discouraged - use Transformations or Instruction Builds to set values, and templates to map them
Template changes affect only future exports; previously exported documents retain their original format
Template editing is restricted to Admin users for governance
There is no built-in template diff or version comparison - maintain version history through naming conventions and internal documentation
