Where to start with AI · First workflow No. 5

Matching supplier invoices

An invoice matching assistant, rolled out in two stages: first it flags discrepancies for the accountant, then it posts invoices that match or fall within tolerance, below a set amount, on its own.

A first AI use case doesn’t need to be spectacular. It does need to be narrow enough to test, measure, and improve.

Low risk, but only within a strict scope

Invoice matching meets all four tests of a good first workflow: it comes up often, it has a clear owner, it calls for a clear output (a match summary), and it is a pain point that accounting and suppliers already feel.

The use case is low-risk only within a strict scope:

The assistant compares each invoice with the purchase order and goods receipt the company already records. The risk does not go away. It becomes more visible, measurable, and manageable once tolerances, scope, and escalation thresholds are defined.

A three-step approach

00

Get the data in order

Clean up POs, receipts, and supplier records; write down tolerances; give each rule an owner and a dated version. The tool comes after.

01

The assistant flags issues, the accountant decides

The assistant extracts the invoice lines, compares them with the purchase order and the goods receipt, and flags each discrepancy, citing the relevant tolerance. The accountant approves, corrects, or checks with the buyer. Every correction is logged by purchase category.

02

The assistant posts qualifying invoices

Within the authorized scope, it posts invoices whose PO and goods receipt agree, whose discrepancies, if any, stay within written tolerances, and whose amount is below the set threshold. It routes to accounts payable any invoice that is unusual or incomplete, any out-of-tolerance discrepancy, any changed banking details, and any amount above the threshold. Only treasury releases payments.

Moving from stage 1 to stage 2

The move to stage 2 should not be decided in advance. It depends on what accounts payable observes during stage 1: the accuracy of the proposed matches, the corrections needed, and the system’s ability to recognize invoices that fall outside its scope.

Accuracy of extraction and discrepanciesCorrections needed, by categoryExceptions correctly routedNo significant incident within the tested scopeCurrent tolerances, each with an owner

Office supplies could move to stage 2 while professional services stay in stage 1.

Reference architecture: how the system stays under control

Structured extraction of invoices, deterministic matching against the PO and goods receipt read from the ERP, and a match summary drafted by an LLM instructed to cite the line and the tolerance, with input and output guardrails and routing to accounts payable. A learning loop connects the log, AP review, and the evaluation set.

Diagram: Reference architecture: how the system stays under control

Click the diagram to open it full size.

The controls required before any autonomous answer:

Evaluation. A reference set of, for example, 300 past invoices, minimized as needed, each with the expected match. Metrics: extraction accuracy, discrepancy accuracy, correct tolerance cited, and the rate at which exceptions are detected and correctly routed. Rerun whenever the model, a rule, or the instructions change.

Observability. Every invoice is logged: extracted fields, calculated discrepancies, summary or posting, routing. Supplier and bank data: log minimized, access restricted to authorized roles, retention defined by purpose and applicable obligations.

Identity and access. SSO (SAML or OIDC). Segregation of duties: whoever places an order cannot approve the invoice; tolerances and supplier records are managed by separate roles. ERP read access; write access limited to authorized postings below the threshold.

Data. Hosting and data transfers verified for the chosen solution; contractual terms barring use of the data for model training; encryption; record retention in line with accounting law; documented Swiss FADP assessment.

Application security. Measures against prompt injection, including in invoice text. Scope limited to three outcomes: propose a match summary, post within the authorized scope, or route to AP. Only treasury releases payments.

Corrections go first into improving extraction, tolerances, instructions, and the evaluation set. Retraining the model is neither the starting point nor a substitute for that work.

The goal

The goal is not to take control away from the accounting team. It is to cut processing time for clean-match invoices, stop the same comparisons from being redone by hand, and focus the team’s time on discrepancies that call for context and judgment.

Illustrative case: fictitious company; all figures are approximate. Sergio Castagna Consulting is a member of the OpenAI Partner Network and a registered partner in the Google Cloud Partner Network. The tool comes after the problem is defined.

The useful question

The question is not “Which tool should we buy?” It is “Which repetitive work can we have AI assist with, measure, and then delegate under clear controls?”