Skip to content

OCR template

When an invoice arrives it is read automatically by OCR, which identifies the most likely value for each field. Where the system has no instructions for that supplier yet, it picks what it judges best.

An OCR template trains it. Once set up, future invoices from the same supplier are read the same way, which is what makes the reading reliable rather than merely likely.

How the system recognises a supplier

A template is matched to an invoice using one or more of:

  • CVR number
  • IBAN
  • Bank account number
  • Creditor number, for FIK payments
  • A combination of other invoice-specific details

Templates are created automatically from these. As long as one of them can be found on the invoice, accuracy is high. Where none is present, the system may fail to match the invoice to its supplier.

A Template ID is shown at the top of the screen, so you can confirm the template you are editing is the one you think it is.

OCR identification and OCR route

These are two different things and it is worth keeping them apart:

OCR identification helps the system work out which supplier an invoice belongs to. Where a supplier's invoice carries no clear identifier such as a CVR number or IBAN, you can define an alternative — a customer number, or some unique keyword — so future invoices still match.

OCR route connects the template to the supplier's item accounting setup. Where the route is defined in the template and matches a rule in item accounting, the correct accounting setup is applied automatically when the invoice is processed.

In short: identification finds the supplier, route applies the coding.

Setting up a field

Open an invoice from the supplier and choose Edit OCR template. The template is divided into Basic fields and Payment details.

Each field can be configured one of five ways:

Option When to use it
Default value The system's own suggestion, the value it is most confident about.
OCR values Every value the OCR found in the document. Pick from this list when the right one is there.
Fixed value A value that is always the same on this supplier's invoices, whatever the document says.
Blank value Leave the field empty.
Crop value The OCR did not find the value. Crop the area of the invoice to read it from.

Choosing the right value and label

Values come with labels, and the pairing matters. Selecting a CVR number, you might see:

  • 12345678 [Org no.]
  • DK12345678 [VAT no.]

DK12345678 [VAT no.] is usually the better choice: it states the type of number and leaves no ambiguity.

Where you use Crop value, you can also mark a reference label — the fixed text beside the value, such as "Invoice no." — which keeps the reading robust when the value shifts position.

Cropping depends on a stable layout

If the cropped area is not in the same place on the supplier's later invoices, the value will not be extracted correctly next time. Prefer a value from the OCR list where one fits.

Saving with fields that are not fully configured tells you so.

Training a template

  1. Submit an invoice from the supplier, carrying at least one recognition parameter.
  2. Go to Purchase invoice → Received invoices and select it.
  3. Open the template with the gear button, or Edit OCR template.
  4. Configure each field using the five options above.
  5. Save.

Reading again

Reprocess invoice runs the reading again on the open invoice with the saved template.

Where other invoices match the same template, you are asked whether to read those again too. Choosing Reprocess invoices queues them.

Resetting

Reset OCR template removes the setup for that supplier and reading starts over. It cannot be undone.

AI reading

Where it is enabled for the company, invoice details and invoice lines can be read by AI instead of a fixed template. The two settings are Enable AI for invoice details and Enable AI based line reading, and they can be overridden per vendor in Vendor setup.

See also