DocReadi

Custom templates

Custom templates

DocReadi's 13 built-in document types cover invoices, credit notes, orders, delivery notes, receipts, and statements of account. For anything else — a customs form, an internal report — you define a custom template: a named set of fields you want extracted, which DocReadi then reads the same way it reads any built-in type. The Custom templates page and the template gallery are Admin-only; running the sandbox (below) is open to reviewers too, and a template your workspace has defined appears in the document-type picker for everyone — only authoring one is restricted.

Custom templates

Open Settings → Master data → Custom templates (also reachable directly as /templates) to see every template your workspace has defined. Each card shows the template's name, field count, description, and its Template ID (with a Copy button — you'll need this to extract against the template via the API). From here you can:

The field designer

For each field you add, set:

At the template level, you can also add extra system instructions — free text appended to the extraction prompt for every document run against this template, for house rules that apply to every document of this type ("amounts are always in USD" or similar).

Size limits. The instructions can be up to 4,000 characters, the template description up to 1,000, and each field's description up to 500 (each Repeating rows column has its own 500). A template can have up to 100 fields — each column of a Repeating rows field counts as one field, while a Line items field counts once. Saving a template over any limit is refused with a message giving the limit and your current size. Templates saved before these limits existed keep working.

Creating a template also creates a matching saved report (named "<template name> — extractions") with one column per field, so you have somewhere to see your custom-type documents as soon as you start uploading against it. The built-in Line Items report also covers custom-template documents — pick your template (or Custom (all templates)) from its document-type filter — see Reports and exports.

The critical-field checkbox

Checking Critical on a field marks it as one that must come back correct — not just present, but confirmed. On workspaces that have turned on the critical-field pilot (a workspace-level setting, off by default), a document missing a critical field is never auto-approved regardless of its overall confidence score, and gets one extra attempt at a different extraction engine before falling through to your review queue. Even on workspaces where the pilot isn't on, checking a field as critical still records whether that field came back clean on every extraction, so you can see your exposure before deciding whether to turn the stricter behaviour on.

Test-extract sandbox

Settings → Test extract is a scratch space for building and checking a template before you commit to it: no document is written to your records. Use it to try a document against a template-in-progress, see exactly what comes back, and adjust the field list before saving anything permanent.

A sandbox run is a real extraction under the hood, so it draws down your credit balance the same way processing a document normally does — one credit per page. If your workspace is out of credits, running the sandbox is refused with "Out of credits — top up to run a test extraction." before anything is processed. See Billing and credits.

To use it:

  1. Optionally pick Start from an existing template — a starter from the gallery or one of your own — or start from a blank field list.
  2. Drop a PDF or image onto the upload area.
  3. Adjust the field list (add, edit, or remove fields, same controls as the template field designer).
  4. Click Run Extraction to see the results.

The sandbox uses the same limits as saved templates: up to 100 fields, 500 characters per field description and 4,000 characters of extra instructions (and 1,000 for the description when you save it as a template). A run over any limit is refused before anything is processed or charged, and the message appears on the page.

A sandbox session expires after a couple of hours, and its file and results are removed automatically. If the results look right, Save as Template turns your session's field list into a real, reusable template — this is the only action in the sandbox that leaves anything behind, and (like all template authoring) it is available to workspace administrators only; reviewers can run sandbox extractions but won't see the save button.

The templates API

Custom templates are also fully available to scripts and integrations through the REST API — create, list, update, and delete templates, and extract documents against a template by ID. Every endpoint, field type, and worked example is documented at /api/docs-guide; that page is the authoritative reference for third-party and scripted use, so this guide doesn't duplicate it here.

Next steps

Looking for the developer/API reference? See /api/docs-guide. Can't find an answer? Email [email protected].