AI document extraction can read invoices, delivery notes and purchase orders and prepare ERP entries, but the extracted values should never post on trust. Check every field against the ERP's own records, send anything that does not match to a person, and keep the original document linked to each entry, so finance can see why each figure was accepted.
Why extraction is the easy part
Modern models read a scanned invoice or an emailed order well, including layouts they have not seen before. The risk sits after the reading. A supplier name that is almost right, a total read from the wrong column or a tax line split differently from the order can all look plausible on screen. Once that value posts, it flows into payments, stock and reporting, and fixing it means reversing entries rather than correcting a draft.
So the design question is not "how accurate is the model?" but "what has to be true before an extracted value is allowed into the ledger?" That moves the work from the model to the integration around it, which is where most of the engineering effort in these projects goes.
Let the ERP be the source of truth
The pattern that holds up is simple: the AI reads the document, and the ERP supplies the trusted reference data it is checked against. In practice that means:
- Match the party, not the text. Resolve the supplier or customer to an existing master record using fields such as tax registration or bank details, not just the printed name. A new or changed bank account should always stop for a person.
- Match the document to what was expected. An invoice should tie to an open purchase order and, where goods are involved, a receipt. Quantities, unit prices and totals are compared line by line within tolerances the finance team sets, not the model.
- Recalculate, do not copy. Totals and tax are recomputed from the extracted lines and compared with the printed figures. A mismatch is a signal, whatever the model's confidence.
- Check for duplicates. The same invoice arriving by email and by post, or resent after a reminder, is a common way money leaves twice.
These are ordinary business rules, and most ERPs already hold the data to run them. The extraction step should feed them, not replace them. For the data side of this, see getting data agent-ready before launch.
Route exceptions to people, with context
Anything that fails a check goes to an exception queue rather than being forced through or silently dropped. The reviewer should see the original document, the extracted values, the ERP record it was matched against and the specific rule that failed, so the decision takes a glance rather than a search.
Model confidence scores are useful for ordering that queue, but they should not be the only gate. A confidently wrong value that fails a business rule still stops; a low-confidence value that matches the purchase order exactly can often pass. Our guide on using confidence scores for human review covers how to set those thresholds, and human in the loop without friction covers keeping the queue workable.
Post through the ERP's interfaces, not around them
Write entries through the ERP's supported APIs, approved connectors or import routines, under a dedicated service identity with only the permissions it needs, such as creating draft invoices but not approving payments. Avoid screen automation where an interface exists, and avoid writing to the database directly: both bypass the validation the ERP already performs. Posting drafts first, then promoting them once checks pass, keeps a clean point to stop.
This is the same approach we take when adding governed AI agents to an existing software estate: the AI works inside the system's existing controls, not alongside them.
Keep a record finance and auditors can follow
For each entry, store the source document, the values extracted, the model and prompt version used, each check and its result, and who approved any exception. That record answers the auditor's question of why a figure was accepted, and it gives engineers the examples they need when a supplier changes their layout and errors start to cluster. See what an AI agent audit trail contains.
Roll it out one document type at a time
Start with one document type and a known set of suppliers, run extraction alongside the current manual process, and compare results before letting anything post. Widen to more suppliers and document types as the exception rate settles, and keep the manual route available for documents the system cannot read. Rolling out an AI agent in stages describes the same approach for agents more generally. If you are planning document extraction into your own ERP, talk to us.
Frequently asked questions
Can AI document extraction post invoices to an ERP without human review?
It can for documents that pass every check: a matched supplier record, an open purchase order, totals that recalculate correctly and no duplicate. Those rules, set by the finance team, decide what posts automatically. Anything that fails a rule, or involves new bank details or an unknown supplier, should go to a person with the original document and the failed check shown together.
Is a model confidence score enough to decide what gets posted?
No. Confidence scores show how sure the model is about its reading, not whether the value is correct for the business. A confidently read total can still disagree with the purchase order. Use confidence to prioritise the review queue, and use business rules checked against ERP records, such as matching, recalculation and duplicate checks, to decide what is allowed to post.
Should the AI write directly to the ERP database?
No. Write through the ERP's supported APIs, approved connectors or import routines, under a dedicated service identity with narrow permissions. Direct database writes and screen automation bypass the validation the ERP already performs and make errors harder to trace. Creating draft entries first and promoting them once checks pass gives a clear point to stop and correct.
What should be logged for each extracted document?
Keep the original document, the extracted values, the model and prompt version, every validation check with its result, the ERP record each value was matched to, and who approved any exception. This lets finance and auditors see why a figure was accepted, and it gives engineers the evidence they need when a supplier layout changes and errors start to appear.
Which documents should we start with?
Start with a single, high-volume document type that already has strong ERP reference data, such as supplier invoices tied to purchase orders. Run extraction alongside the current manual process for a known group of suppliers, compare the results, and only let entries post once the exception rate is steady. Add new document types and suppliers one at a time.



