Create custom export templates using the template editor with mustache variable syntax to map Docupath's extracted fields to the exact schema your downstream systems require.
When to Use
Use this capability when your downstream system (ERP, EDI, data lake) requires a specific output format different from the default export structure.
Prerequisites
Admin role in Docupath
Understanding of the target system's expected schema (XML/JSON structure)
Knowledge of available Docupath field variables
Steps
Step 1: Open Data Export Templates
In the left sidebar, click Data export templates.
Step 2: Create a New Destination Format
Open the Destination Format dropdown (the first dropdown) and click + Add New to create a new export template. Existing formats, such as Docupath Internal Format (DIF), also appear in this dropdown.
Step 3: Name the Template
Give the new destination format a clear, versioned name, for example: UBL-Invoice-Nordics-v1.0.
Step 4: Select the Document Type
From the File type dropdown (the second dropdown), select the document type the template applies to (e.g., Invoice, Purchase Order, Partnership Agreement).
Step 5: Build the Export Body
In the live editor, add the XML syntax for the selected document type. Use mustache variable syntax (for example, {buyer_name}) to map Docupath's extracted fields into your target schema. The available fields for the selected document type are listed alongside the editor for reference. Common variables include:
Variable | Description |
{buyer_name} | Name of the buyer entity |
{total_amount} | Total invoice or PO amount |
{vat_rate} | Applicable VAT rate |
Step 6: Repeat for Each Document Type
Select the next document type from the File type dropdown and add its XML syntax. Repeat for every document type this template should cover.
Step 7: Validate the Structure
Check that XML tags are properly closed or JSON brackets are balanced.
Step 8: Save
Click Save to finalise the template.
Expected Outcome
The template becomes available for use in exports for the selected document types.
Common Issues
Issue | Cause | Resolution |
Template not appearing in exports | Forgot to save | Always click Save after editing |
Wrong fields in output | Wrong document type selected | Verify the document type aligns with the intended use |
Static values in output | Hardcoded values instead of variables | Use Transformations for computed or static values |
Empty values in output | Missing or misspelled variables | Verify variable names match available Docupath fields |
Notes
Only one active template is allowed per document type per format.
Use naming conventions with version numbers to track changes over time.
Coordinate with downstream teams before changing live templates.
Keep formatting logic in Transformations rather than in the template body.
