Turning email and PDFs into records in your system

The input arrives however it arrives: an email a person wrote, a PDF exported from a spreadsheet, a screenshot of a message. The destination is completely structured — typed fields. All of the difficulty lives in that gap.

NaomivoUpdated

OCR alone is not enough

OCR turns an image into text. It does not know that a particular line is a quantity rather than a part number, that the number in the corner is an order reference, or that the table continues onto the next page.

With fixed forms you can solve this with a template. The moment there are three suppliers with three formats, and one of them changes its layout once a year, maintaining the templates costs more than the manual work they replaced.

Where a language model genuinely helps

At understanding. Recognising that "send the same as last time but 20 units" is an order that requires history. Extracting fields from a document you have never seen in that format. Telling a billing address from a shipping address when both appear without labels.

This is precisely the part that used to be hard to program and has become cheap. There is no reason not to use it there.

And where it hurts

At arithmetic, at rules, and anywhere the same input must produce the same answer. A model computing a discount will eventually be wrong, and it will be wrong confidently.

The split that works: the model extracts data and flags doubt. Ordinary code calculates, checks rules and decides. Not because models are bad, but because business logic has to be testable and reproducible.

Confidence and the stopping point

Every extracted field should carry a measure of certainty. Confident fields go through. Unconfident fields stop.

Stopping is not a failure of the system, it is its central feature. A screen showing the original document beside what was understood, with the doubtful fields marked, turns a ten-minute check into a twenty-second one.

What to measure

Three numbers tell you whether it works:

  • The share of documents that go through untouched.
  • The share that stopped and should have stopped — stopping too often is annoying, stopping too rarely is dangerous.
  • How long it takes to approve a stopped document. If that is not dramatically faster than typing it in, you have gained nothing.

What it looks like in practice

An email arrives with a specification. The system identifies the sender against the customer list, extracts items and quantities, checks price and stock against the ERP, and discovers the requested delivery date is not realistic for one item.

Rather than failing or guessing, it prepares a draft quote with the corrected date, marks the change, and leaves the salesperson to decide. They approve, the quote goes out and the deal is updated.

Questions that keep coming up

Can AI read invoices and purchase orders and enter them into an ERP?
Yes, and it is now reliable enough to be worth doing — for the reading. A model is good at extracting fields from a document it has not seen before and at understanding free-text requests. Let ordinary code do the arithmetic and the rules, and have the system stop for a person whenever a field is uncertain.
Is OCR enough to process supplier documents automatically?
Not by itself. OCR converts an image to text but does not know which number is a quantity and which is a part code, or that a table continues on the next page. Templates fix that for fixed forms, but the moment several suppliers each change layout occasionally, maintaining templates costs more than the typing they replaced.
How accurate does document extraction have to be?
Accuracy is the wrong target on its own. What matters is whether the system knows when it is unsure: a field extracted with low confidence should stop for review rather than being written. Measure the share that goes through untouched, the share that stopped and should have, and how long a review takes.
What should a person still check when documents are processed automatically?
Anything the system flagged as uncertain, and anything irreversible — prices, quantities, and whatever is about to reach the customer. The review screen should show the original document beside what was understood, so the check takes seconds rather than re-reading the whole thing.

The short version

A good document pipeline does not try to be right every time. It tries to know when it is unsure, and to stop there.