Purchase invoice - OCR template
Invoice processing with OCR in 2CA
When an invoice is submitted to 2CA, it is automatically processed using OCR technology (Optical Character Recognition). The OCR system reads the content of the invoice and attempts to identify the most relevant values for each field. If the system has not previously received specific instructions for the supplier in question, it will select the values it deems most appropriate.
Using the OCR Template
To ensure accurate and consistent data extraction for future invoices from the same supplier, it is recommended to use the OCR template feature. This allows you to train the system to recognize the correct values, significantly improving precision during future imports.
At the top of the screen, a Template ID is displayed, which helps you confirm whether the template currently being edited is the same as a previously used one. This ensures continuity and prevents confusion between templates.
How the system recognizes invoices
The system identifies invoices based on one or more of the following parameters:
CVR number
IBAN
Bank account number
Creditor number (for FIK payments)
A combination of various other invoice-specific details
Since OCR is a learning technology, minor deviations in data capture may occur—especially with new or unfamiliar suppliers.
OCR templates are automatically created based on the parameters listed above. As long as at least one of these can be identified on the invoice, there is a high level of accuracy. If none of the identifying parameters are present, the system may struggle to correctly match the invoice.
OCR Identification and OCR Route fields
OCR Identification
The OCR identification value helps the system recognize which supplier an invoice belongs to.
If a supplier’s invoice does not include a clear identifier such as CVR or IBAN, you can define an alternative value (for example, a customer number or unique keyword) in the OCR template.
This makes it easier for the system to correctly match future invoices from the same supplier.
OCR Route
The OCR route is used to connect the OCR template with the Item accounting setup for the supplier.
When defined in the OCR template (for example, by cropping or selecting a value), it can be matched to a rule in Item accounting.
If the OCR route matches, the system automatically applies the correct accounting setup when the invoice is processed.
In short:
OCR Identification helps identify the supplier.
OCR Route helps apply the right accounting setup.
Training the OCR template - Choosing the right Value and Label
To ensure correct invoice data extraction moving forward, it’s important to accurately train the OCR template. This involves selecting not only the correct value for each field but also the correct label associated with that value.
Choosing the right combination
For example, when selecting a CVR number, you might see multiple similar values in the list:
12345678 [Org no.]DK12345678 [VAT no.]
In this case, it is important to select the version that best matches both the correct value and label. DK12345678 [VAT no.] is often the most precise choice, as it clearly indicates the type of number and avoids ambiguity.
Field Configuration Options
Each field can be configured using one of the following five methods:
Default Value
The system's suggested value based on the highest confidence score.OCR Values
All values identified by the OCR system in the document. Select from this list if the correct value is found.Fixed Value
Enter a specific value that should always be used, regardless of the invoice content.Blank Value
Leaves the field empty and does not populate any value.Crop Value
Used when the OCR system has not identified the correct value. This allows you to manually crop a specific area on the invoice to extract the value.
Recommended Approach for Selecting Values
Review the list of OCR values and choose the one that best fits the field—based on both value and label.
If the correct value is not available, use "Crop Value" to manually select a fixed text area on the invoice.
Important: If the cropped area is not consistently placed across similar future invoices, the system may struggle to extract the value accurately next time.
How to Train an OCR Template
To ensure precise and reliable invoice processing in the future, follow these steps to train the OCR template for a specific supplier:
Submit an Invoice
Upload an invoice from the relevant supplier. Ensure that it includes at least one of the parameters used for template recognition (e.g., CVR, IBAN, account number).Navigate to Received Invoices
Go to Purchase Invoices and select Received Invoices.Open the OCR Configuration
Locate the submitted invoice in the list and click the OCR (gear icon) to open the template configuration view.Complete Each Field Step-by-Step
Begin at the top of the table, typically with Vendor VAT.
Click "Expand" to view available values.
Choose the appropriate value or method (e.g., default value, fixed value, crop value).
Repeat for All Fields
Go through each field one by one, selecting the correct values.Confirm Your Selections
When all fields are configured, click the green "Confirm" button to save the template.Verify the Result
After confirmation, the values will appear on the invoice preview. Review the data to ensure everything has been correctly applied.
Once saved, the template will be automatically applied to future invoices from the same supplier—ensuring fast, accurate, and consistent data processing.