How does matching against purchase orders work?
Matching is where most of the value sits, and it is plain code. The model's job ends once fields are extracted and checked.
A 2-way match compares the invoice with the purchase order: same vendor, a valid open PO, unit prices and quantities within tolerance. A 3-way match adds the goods receipt, so you only pay for what arrived. Tolerances are yours to set, for example 2% or $50 per line, whichever is lower, and they live in a table your controller can edit.
Line matching is the hard part. Supplier descriptions rarely match your item master ("Widget blue 10pk" against "WGT-BLU-10"). The pipeline tries SKU and supplier part number first, then quantity and price, and only then asks a model to suggest a match, which goes to review the first time it appears. Once a reviewer confirms it, the mapping is saved and that pair matches automatically from then on.
Invoices without a PO (utilities, software subscriptions, professional fees) skip matching and go to the budget owner for that vendor or cost center. Recurring ones are compared with the last 3 months and flagged when the amount jumps.
If you do not use purchase orders at all, the pipeline still extracts, checks duplicates and routes approvals. That is a smaller build, near the low end of the range. More on the extraction side in intelligent document processing.

