Artificial intelligence

Supplier invoice OCR: automate and check data capture

Field-level confidence thresholds, checks against the PO and supplier master, a validation queue and an error log, so invoice OCR never pays a wrong amount.

Supplier invoice OCR: automate and check data capture
Contents
  1. What should you ask the vendor before your next meeting?
  2. Why doesn't a quoted accuracy rate tell you what will be paid?
  3. Should you digitise before you automate?
  4. Which fields can make you pay the wrong amount?
  5. Which checks should surround each field the tool reads?
  6. What should the person validating a flagged invoice see?
  7. How do you find a misread invoice that was already validated?
  8. How do you measure quality in production rather than in a demo?
  9. Where should an eight-hotel group keep a human review?
  10. Will e-invoicing make OCR redundant?
  11. What paragraph belongs in the specification?
  12. FAQ
  13. Sources

When invoice OCR misreads a supplier invoice, what happens next depends on the controls around the reading, not on the accuracy rate in the vendor's brochure. A misread amount or PO number only reaches payment if two safeguards fail at once: the field was accepted above its confidence threshold, and no cross-check against the purchase order or the supplier master caught it. Set thresholds field by field, add those cross-checks, route exceptions to a human validation queue and review an error log every month, and a misread ends up as a blocked invoice that gets fixed before anyone pays it.

A misread that slips through lands in the ledger, in your deductible VAT and sometimes in a bank transfer. Fixing it after payment means asking the supplier for a credit note, reversing the entry and explaining the difference to the statutory auditor. Too much caution has a price as well. A tool that sends too many invoices to the queue pushes the team back to keying everything in, and you end up paying for the software and for the manual entry it was supposed to replace.

What should you ask the vendor before your next meeting?

One question changes the conversation: "On a sample of our own invoices, how many wrong values did your tool accept without sending them for validation, field by field?" Your risk sits in the errors the tool accepts with confidence, because nobody looks at those.

The sample is quick to put together. Ask accounts payable for about a hundred recent invoices that were already keyed in and checked, mixing PDFs generated by billing software, scans and phone photos. The correct values are already in your ERP, which makes the comparison straightforward. Add two more questions. Does the tool give a confidence score per field, or one score per document? And does the person validating see the invoice image next to the value that was read? A single document score can hide one wrong field among ten right ones.

Why doesn't a quoted accuracy rate tell you what will be paid?

A recognition rate only means something for a given type of document. A PDF produced by a large supplier's billing system reads far better than a handwritten invoice scanned at an angle, so the same tool will post very different results depending on your supplier mix.

The rate also hides severity. A misread address costs nothing, while a 4 read as a 9 in the net amount does. What a CFO needs is the share of errors accepted on the fields that drive a ledger entry or a payment, measured in production on the company's own invoices.

Should you digitise before you automate?

Yes, in that order. Step one gets every invoice into a single digital entry point (a dedicated mailbox, a supplier portal, or scanning all paper mail on arrival). OCR pre-fills each field, a person validates every invoice, and every correction is logged.

After a few months, that log shows which suppliers and which fields the tool reads without errors. Automatic validation then opens up piece by piece, only for those cases. Automating everything from day one means discovering the tool's weak spots in your payments.

Which fields can make you pay the wrong amount?

The supplier comes first. Since the 2016 Finance Act, article 145-VIII of Morocco's General Tax Code has required every taxpayer to print its common company identifier (ICE) on its invoices. The tool can therefore compare the ICE it reads with the one in the supplier master record. Next come the net, VAT and gross amounts, the VAT rate, the invoice number (a misread here lets a duplicate through), the invoice date used to calculate the due date, the PO reference and the quantities.

Bank details are a separate case. The bank account printed on an invoice is never used for payment, even when it is read perfectly. Transfers go to the account in the supplier master record, which only a controlled change procedure can modify, and a bank account read off an invoice that differs from the record raises an alert and leaves the record untouched.

Which checks should surround each field the tool reads?

The table below is the complete control set. Threshold levels are relative. Their actual values, like the tolerances and time limits mentioned in this article, are parameters you agree internally and set from your own error log.

Field readConfidence threshold (parameter)Cross-checkIf the check fails
Supplier (ICE, company name)HighICE matched to an active master record; an unknown supplier never goes through automaticallyValidation queue, record created by the master data team
Invoice numberMediumSame supplier and same number, or same amount on the same dateBlocked as a suspected duplicate
Invoice dateMediumNot in the future, not earlier than the PO beyond the limit you setValidation queue
PO referenceHighApproved PO, issued to this supplier, not fully invoicedQuarantine, no posting, no payment
Net, VAT and gross amountsHighestNet + VAT = gross; VAT = net × rate; line items add up to the total; variance to PO within toleranceValidation queue, reason shown
VAT rateHighRate expected for this spend category or supplierValidation queue
QuantitiesHighCompared with the recorded goods receiptBlocked until receipt or credit note
Bank detailsNever used for paymentAccount read compared with the master recordAlert to master data team, payment to the record

An invoice is validated automatically only if every critical field clears its threshold and every cross-check passes. One failure sends the whole invoice to the queue with the field in question flagged. The quarantine rule for invoices with no PO is covered in our article on blocking invoices without a purchase order.

What should the person validating a flagged invoice see?

The screen shows the invoice image next to the values read, with the doubtful field highlighted and the reason it was flagged (threshold not met, variance to PO, suspected duplicate). The validator corrects the value or confirms it, and the system records both outcomes.

Three rules govern the queue. The validator is neither the person who requested the purchase nor the one who raised the PO. The age of each invoice stays visible, since the payment clock keeps running while it waits. And any correction to an amount above a variance you set goes to a second validator, so a "correction" can never be used to overbill.

How do you find a misread invoice that was already validated?

Thresholds and cross-checks stop most errors. Some still get through, because a wrong value can be read with high confidence and happen to fall inside the tolerance meant for price variances. Three after-the-fact checks catch them, ideally before payment.

Every week, the financial controller compares a random sample of automatically validated, still unpaid invoices with their images. Statements from the main suppliers are reconciled periodically, and a complaint from an underpaid supplier comes last. Each error goes into the same log, one line per error, with these columns: date, invoice number, supplier, document type (native PDF, scan, photo), field, value read, correct value, confidence score, detection route, consequence (none, payment blocked, wrong payment recovered) and action taken.

How do you measure quality in production rather than in a demo?

Three indicators are enough, calculated monthly. The straight-through rate is invoices validated with no human touch divided by invoices received. The queue correction rate counts flagged invoices where at least one value was changed. The third, and the one that matters most, counts errors accepted above threshold and discovered later, per thousand automatically validated invoices. It measures what nobody saw.

At the monthly review, accounts payable and the financial controller read that third indicator by supplier and by field, then raise a threshold, take a supplier off automatic validation or add a check. If the straight-through rate climbs while accepted errors climb with it, the thresholds are too loose.

Where should an eight-hotel group keep a human review?

A hotel group runs eight hotels and handles accounts payable centrally at head office. The group and its figures are invented for illustration. It receives 2,400 supplier invoices a month.

For three months, every invoice goes through human validation with OCR pre-fill. The log shows that 1,500 invoices a month arrive as native PDFs from regular suppliers, and 900 as scans or photos, often from small local producers. Finance opens automatic validation only to native PDFs from suppliers with no accepted errors over the period and with a matched PO, which comes to 1,200 invoices. The other 300 native PDFs and the 900 scans and photos, 1,200 invoices in all, stay in the queue. The straight-through rate starts at 50%.

In month four, the weekly sample finds a laundry invoice read as 12,900 dirhams net instead of 12,400, with a high confidence score. The PO was for 12,400 dirhams, and the 500-dirham gap, about 4%, sat inside the 5% tolerance set for that category. The invoice did show 2,480 dirhams of VAT and 14,880 dirhams gross, and 12,900 plus 2,480 makes 15,380, which an arithmetic check would have blocked. That check had only been configured for scans. Because the sample only covers unpaid invoices, the invoice is corrected before the transfer. The arithmetic check now applies to every invoice in the group.

Will e-invoicing make OCR redundant?

Only partly. Article 145-IX of the General Tax Code, introduced by the 2018 Finance Act, requires taxpayers subject to corporate tax, to income tax on professional income under the real or simplified net income regime, or to VAT to use a computerised invoicing system that meets technical criteria set by the tax administration, and leaves the details to implementing regulations. In an interview with Le Matin on 6 October 2026, Abdellah Marrakchi of Sage said the tax director general had confirmed that the draft decree has gone to the government's general secretariat; that decree will set the timetable. In the same interview he points out that companies will need to receive e-invoices as soon as their suppliers issue them.

A structured invoice arrives as data, with no confidence score. The cross-checks still apply in full, since an accurate data field can still carry a fully invoiced PO or a duplicate, and OCR will stay in use for suppliers that don't yet issue structured invoices. The inbound flow is covered in our article on DGI e-invoicing and your existing systems.

What paragraph belongs in the specification?

The core rule fits in one sentence a tester can check case by case: "The system automatically validates a supplier invoice only if every critical field clears the confidence threshold configured for that field and document type, and if the cross-checks against the purchase order, the goods receipt and the supplier master record pass; every human correction is logged with the value read, the value kept and the confidence score, and every payment uses only the bank details held in the supplier master record." Add a reporting obligation: the provider supplies the three indicators each month, by supplier and by document type. Without those figures, nobody can tell whether the rule holds.

If your current tool can't carry these controls, an AI automation layer connected to the ERP can add them, and our page on document digitisation describes the intake and validation flow. In a free audit, we can test your invoice sample with you before you choose a tool.

FAQ

Can we set one confidence threshold for every invoice?

You can, but a single threshold is too strict for the supplier's address and too loose for the amount. Set it field by field, and by document type where possible, since a scan and a native PDF are not read with the same reliability. Start with cautious values, then adjust them at each monthly review based on the error log.

Should the tool create master records for new suppliers by itself?

Better not. An invoice from an unknown supplier goes to the queue, and the record is created by the team that owns master data, with the usual documents (ICE, bank details confirmed by the bank). Otherwise anyone able to send a convincing invoice to your intake address can get paid.

Who should review flagged invoices, accounts payable or buyers?

Accounts payable fixes reading errors. Substantive variances, such as a price that differs from the PO or a quantity never received, belong to the requester or the buyer. The tool should route each invoice according to the reason it was flagged.

Sources

Last verified: 2 November 2026.

Put the error log review in the accounts payable and financial control calendars now, on the first working day of each month after go-live.

Read next

  1. Artificial intelligence

    Spend anomaly detection: rules or AI?

    Duplicates, split orders, new suppliers paid too fast: what a rule blocks at entry, where a model helps, and a complete decision table to copy.

    11 min read

  2. Artificial intelligence

    Certified AI Training in Morocco: What Actually Counts

    OFPPT, Microsoft, Google, AWS, UM6P: which AI certifications actually matter to Moroccan employers, real prices, and which ones to skip in 2026.

    8 min read

  3. Artificial intelligence

    Customer Service Automation for SMEs in Morocco

    Customer service automation for SMEs in Morocco: which channels to prioritize, real costs in MAD, ROI, and mistakes to avoid in 2026.

    8 min read

  4. Artificial intelligence

    Business Automation Software: Choosing Your Stack

    RPA, no-code, AI agents, native ERP/CRM automation: a comparison of the four software families to help you pick the right automation stack.

    8 min read

Let's discuss your priorities

A free audit of your information system.

For companies of 50 people or more, or with several sites, with a decision-maker present. Two to four hours of interviews, then a written report that is yours to keep.

* Required field

Only if you'd rather we called you.

A few words are enough. Don't include passwords or sensitive data.

We use this information to reply to your inquiry and, if you've accepted cookies, to measure how well our campaigns perform. To find out how it's stored and how to exercise your rights, see our privacy policy.

Would you rather talk it through?Call us on +212 715 659 190