Match supplier invoices to purchase orders
Compare incoming invoices with open orders and prior records. Prepare supplier questions for invoices that need clarification.
How this works
Compare incoming invoices with open orders and prior records. Prepare supplier questions for invoices that need clarification. The aim is a traceable clearance recommendation for each invoice, with ambiguous orders and discrepancies held for finance. Matching by a similar amount is a suggestion, not sufficient evidence.
Extract invoice lines, retrieve open purchase orders, and use a deterministic comparison matrix. Record the approved tolerance policy and its version. Keep invoice history in the check so retries and duplicates do not create a second apparent payable.
Before you start
Order snapshot
Obtain order IDs, vendor IDs, currency, quantities, prices and current fulfillment status.
Tolerance policy
Confirm permitted rounding and price variances, including whether tax and freight are compared separately.
Invoice history
Include invoices already posted and pending review, not only paid documents.
Prepare the inputs
- invoice
- Required
original and extracted header plus lines
Each line needs quantity, unit price and source reference.
- orders
- Required
open order rows
Use stable vendor and order identifiers from the purchasing record.
- invoice_history
- Required
invoice keys and statuses
Record the snapshot time and normalize supplier references.
- matching_policy
- Required
versioned numeric tolerances
Do not invent tolerance percentages or accept model-generated arithmetic.
Implementation, step by step
Identify the invoice
- Retain the PDF and extract vendor, invoice ID, order reference and line amounts.
- Check supplier identity against the order record; preserve alternate names as possible matches only.
Checkpoint: A uniquely referenced invoice packet exists.
Select the order
- Match the explicit order reference before considering supplier and amount similarities.
- If multiple orders are plausible, retain candidate IDs and ask finance to select one.
Checkpoint: The match has a stated basis or remains held.
Compare headers and lines
- Check currency, quantities, unit prices, discounts, freight, tax and invoice totals mechanically.
- Distinguish partial billing from excess quantity using prior invoiced quantities where available.
Checkpoint: A field-by-field variance table exists.
Classify exceptions
- Apply the exact approved tolerances and duplicate rules to each variance.
- Draft supplier questions that identify the disputed line without exposing unrelated purchasing records.
Checkpoint: Each hold explains what evidence would resolve it.
Prepare the finance queue
- Export cleared-recommendation and hold statuses with source links and reviewer fields.
- Refresh changed order or invoice status before any authorized downstream action.
Checkpoint: Finance can reconstruct every recommendation from the packet.
Decisions along the way
No order reference
Suggest candidates and hold; do not clear by amount alone.
Partial shipment invoice
Compare against authorized partial quantities and previous invoices, not the full order total.
Currency differs
Hold without converting unless an approved contract rule explicitly permits conversion.
What you will produce
invoice-order-review.csv
CSVA reconciliation recommendation, not payment authorization.
Include: invoice_id · order_id · match_basis · variance · reason · status
supplier-questions.md
MarkdownReviewable messages about specific unresolved differences.
Include: invoice_id · line_id · question · evidence
Check the result
- Recompute line totals and taxes using the stated rounding convention.
- Verify duplicate detection includes pending invoices and repeat uploads.
- Sample cleared rows for incorrect supplier or order matches.
- Check that every hold has a concrete reason and no silent tolerance default.
When something goes wrong
Order export is stale
Refresh affected orders and retain previous versus current comparison.
Invoice line cannot be read
Request a clearer copy and hold the relevant amount.
Posting outcome unknown
Read the downstream record before retrying an authorized action.
A worked example
SYNTHETIC EXAMPLE · NOT A REPORTED BUSINESS RESULT
Request
Synthetic: compare an invoice against order PO42.
Inputs
PO42 authorizes 10 units at 50 USD. Invoice V7 bills 12 units at 50 USD, no tax; there are no previous invoices. Quantity tolerance is zero.
Expected result
Synthetic result: ordered 500 USD, invoiced 600 USD, excess two units and 100 USD. Hold V7 and draft a question asking for correction or evidence of an approved order amendment.
Run a small pilot
Start small
Test recent invoices containing clean matches, partial bills and known disputes.
Record the baseline
Record review time, false clearances and discrepancies found manually.
Agree success criteria
Agree a false-clearance limit and required evidence coverage before operational use.
Stop or revise
Stop clearance recommendations if order history or duplicate visibility is incomplete.
Keep the scope clear
- A cleared recommendation cannot release payment or amend a purchase order.
- Supplier messages remain drafts until sending is within the authorized task.
Check before using
Finance verifies ambiguous matches and holds; payment approval remains separate.
Business activities
- Manage finances and accounting
FROM A RECIPE TO YOUR WORKFLOW
Bring the company context together.
This workflow needs reliable inputs before it needs a better prompt. Moat8 Vault brings working information into a readable archive for the AI tools you use.
For this recipe: Invoice PDF · Open purchase orders · Invoice history · Matching rules
Start with one recurring task, agree which sources to use, and review the first result with your team.
Discuss this workflow