Create and edit templates
1
Create the vendor
Add the supplier under Manage → Vendors if it does not exist yet.
2
Open the Templates page
Go to Manage → Templates. The vendor list shows which vendors already have a saved template and which are missing one.
3
Generate or edit the YAML
Select a vendor and edit the YAML in the editor panel. Click Generate Template to populate the editor with all supported fields and common regex patterns for that vendor.
4
Save
Click Save. New uploads for that vendor can take the Tier 1 path as soon as confidence clears the threshold.
Template structure
A template has two sections:fields for header values and tables.line_items for line-item rows.
Header fields
Each entry underfields names a capture and provides a regex. The first capture group becomes the field value.
required: truefields count toward the confidence score. Mark the fields that reliably appear on every invoice from that vendor as required.required: falsefields are extracted when present but never lower confidence.
Line-item rules
tables.line_items maps OCR table columns to invoice line fields:
header_keywordsidentifies the line-item table. The extractor looks for a table whose header row contains one of these keywords.columnsmaps each column by zero-basedindexto a field name. Settype: numberfor quantity and amount columns so values are parsed numerically.
Manage templates through the API
Workspace users can also manage templates with a session JWT. These endpoints use the Bearer JWT from login, not a programmatic API key.Improve accuracy and cost over time
Every invoice stores the tier and provider that produced its data, so you can audit where your extraction spend goes.- Watch the Tier Distribution chart on the Dashboard. A high share of Tier 2 or Tier 3 invoices means those vendors are missing templates or their templates match too few required fields.
- After improving a template, reprocess a past invoice from that vendor (or re-upload a sample) and confirm it now resolves at Tier 1.
- Anchor regexes to stable labels on the invoice, such as
Invoice NoorTOTAL, rather than to values that change between invoices. - Keep
required: truelimited to fields that appear on every invoice from the vendor. A required field that only appears sometimes drags confidence below the threshold and forces LLM escalation.

