An AI agent for checking supplier invoices can compare invoice lines with purchase order lines and goods receipt records. The finance team receives the discrepancies, the source of each value and the questions to resolve. The exercise below shows how to flag two units billed above the quantity recorded as received at the time of the check.
- Order
Identify the item, unit, quantity and agreed price.
- Receipt
Add receipts for the order line and subtract earlier allocations.
- Invoice
Compare the invoiced quantity with the remaining received quantity and record the difference.
Establish what each of the three documents confirms
The order shows the agreed item, ordered quantity, price and currency. The goods receipt shows the quantity recorded by the warehouse and when it was recorded. The invoice shows what the supplier billed. Match each invoice to the right supplier and order before looking up the order line. If an invoice covers several receipts, use the confirmed receipts and existing allocations for that line.
Keep the document reference and the location from which each value was extracted. If a scanned invoice contains an unclear digit, retain the page reference and flag the field for confirmation. A parser can read structured fields where the document includes them. A model can help find information in varied layouts. Once the values are confirmed, calculate in code.
Compare quantity and price separately
For three-way matching, compare invoice price with the order and invoiced quantity with the applicable goods receipts. Check the unit of measure and whether a commercial pack size was converted correctly to individual units. The business sets the tolerance for each type of discrepancy. This exercise uses zero quantity tolerance so every missing unit appears in the report.
Fictional order PO-218 contains 12 filters at RON 75 net per unit. The available receipt shows 10 filters. The invoice charges for 12 filters at the agreed unit price. The discrepancy is two filters, or RON 150 net at the sample price. This measures the difference between the available documents. The reviewer checks for a second receipt or asks the supplier to clarify the invoice.
| Check | Comparison | Result |
|---|---|---|
| Unit price | RON 75 invoiced and RON 75 on the order | Values match |
| Quantity | 12 invoiced and 10 received | Difference of two units |
| Value of the difference | 2 × RON 75 net | RON 150 in the review record |
| Evidence to obtain | A possible receipt for the two filters | Reviewer checks the document and decides what comes next |
Organise the invoice review queue
Keep the invoice, order and receipt linked to a single review record. Simulate an invoice arriving twice. Start by checking the supplier ID and invoice number in the current register, then confirm the possible duplicate in the source documents. Similar descriptions, a partially copied number or two documents with the same total can have different explanations. Show the operator why the match was flagged.
Also test a partial delivery, a price difference with an approval attached and two lines with the same description. In each case, check that the result names the field to clarify and who can resolve it. When a value is missing, mark the record as awaiting evidence and rerun the comparison once the document is available. When a discrepancy is confirmed, retain the explanation and decision date.
Connect the review to your business systems
With automated checks across business applications, you can place the order, receipt and invoice on one review record. Decide who may change the matching rules, who resolves exceptions and which references must remain visible. Measure the time to a usable record, how many flagged discrepancies are correct and what proportion of cases require more evidence.
Test multiple receipts and prior allocations
Add a second sample receipt for the other two filters and run the check again. The system should confirm it belongs to the same order and line. In a separate test, mark those two units as already allocated to a previous invoice. The result should show the allocation, document reference and reason the same quantity cannot be used again. This checks how the application combines receipts without matching units twice.
Also try an invoice in EUR and an order in RON. Compare prices after the reviewer confirms the applicable currency and the conversion rule the business uses for the case. Keep the original amounts and currencies, conversion date and rule reference in the record. Missing details leave the case under review. The same evidence helps a colleague see whether a difference came from the supplier price or from comparing values on different bases.
Practise identifying corrections as well. If the supplier sends a correcting document, associate it with the original invoice and retain both references. Re-evaluate the quantities and amounts under the company's procedure and ask an authorised reviewer to confirm the result. For each significant change, record the date, reason and supporting document.
When can you close the review of a discrepancy?
Close the review when the reviewer can see the correct value, the supporting document and the recorded decision. The calculation measures the difference between records. Invoice approval and any subsequent financial action belong to authorised staff in the system used by the business.