Governance-first invoice automation into an ERP
A UK residential interiors business
An internal tool that reads invoices from email and attachments, validates them against the live ERP, and either auto-posts or returns an explicit query code — with the AI never writing to the ledger.

14 / 14
validation scenarios passed
controlled test, 20 May 2026
25 / 25
invoices separated from one batch PDF
controlled test, 27 May 2026
0
ERP writes made by the AI — deterministic code posts
The challenge
The work this system had to absorb.
Invoices arrive as PDFs, images, forwarded email chains and mixed submissions, with references scattered across the message and the attachment. The finance team needed confidence that an invoice was genuinely safe to post — not just text extracted faster.
What we built
A system in production, not a slide deck.
An asynchronous service that stages each submission, extracts structured data from email bodies, attachments and OCR, and validates it against live ERP records.
A decision step that either auto-posts a clean invoice or returns a structured query with an explicit reason code.
Durable job orchestration with status tracking, retries and full auditability.
Governance, in the code
The controls are written into the architecture.
This is the part most firms can’t show you. Governance here isn’t a policy document. It’s constraints the system enforces on itself, every time it runs.
The AI never executes ERP writes — it returns structured JSON, and deterministic code decides whether to post.
A configurable confidence floor (default 0.9) can override an AI 'post' into a manual query; missing line-mapping also forces a query.
Independent deterministic checks run regardless of the model: duplicate detection, price tolerance, mandatory attachment and date-age limits.
An enumerated catalogue of query codes means every held invoice records exactly why; raw payloads and decisions are persisted with timestamps.
Outcomes
What it has done.
Honest and labelled: dated where the figures are point-in-time, and described as controlled tests or early-stage where that is the truth.
In a controlled validation suite, 14 of 14 scenarios returned the expected decision and query code (20 May 2026).
Batch extraction on a real multi-invoice document correctly separated 25 of 25 invoices (27 May 2026).
A clear separation of test and production ERP databases, with multiple safeguards against acting on the wrong one.
How it’s engineered
The approach under the hood.
An asynchronous Azure-hosted service combining a leading Azure OpenAI model with document OCR, schema-constrained extraction, and deterministic validation against the ERP.
Keep reading
More systems we’ve built and governed.
Find out where your AI exposure sits.
We'll tell you plainly what's worth doing, what isn't, and what a board or regulator will expect to see. No pitch deck.
No obligation · no pitch.


