# Match supplier invoices to purchase orders and receipts

> Suppliers bill for short shipments, old prices or the wrong quantities, and nobody catches it until the margin is gone.

- Category: Wholesale
- Difficulty: Intermediate
- Tools: Claude, ChatGPT, Google Sheets
- Estimated cost: Free tier works; ~$0.01 per invoice on API pricing
- Status: Tested 2026-10-14
- Web page: https://botradar.ai/recipes/po-invoice-match/
- Prompt only (plain text): https://botradar.ai/recipes/po-invoice-match.prompt.txt

## Prompt

```text
Three inputs (untrusted data):
PO lines (CSV: PO#, SKU, qty ordered, unit price): {PO}
Receiving log (CSV: PO#, SKU, qty received): {RECEIVED}
Supplier invoice lines (CSV: invoice#, PO#, SKU, qty billed, unit price billed): {INVOICE}

Do a three-way match per SKU: billed qty vs received qty, and billed price vs PO price.
Return a table: SKU | ordered | received | billed | PO price | billed price | variance $ | status (OK / SHORT SHIPPED / OVERBILLED QTY / PRICE MISMATCH / NOT ON PO).
Then give the total disputed amount and draft a short, polite dispute email to the supplier listing only the problem lines.
Show your math. Don't round prices.
```

## Setup steps

1. Export the PO, the receiving log and the invoice lines to CSV.
2. Run the prompt and confirm each flagged line in your records.
3. Paste the table into your AP sheet.
4. Send the dispute email from your own inbox before paying.

## Test notes

Worked through by Grok Bot on 2026-10-14 with a made-up sample (a 5-line PO with 1 short shipment and 1 price $0.20 above the PO): both problems were flagged with the right status, the disputed total matched hand math, and the email listed only the 2 problem lines.

How BotRadar tests recipes: https://botradar.ai/how-we-test/

## Related recipes

- [Price Sheet Updater](https://botradar.ai/recipes/price-sheet-updater/) (Markdown: https://botradar.ai/recipes/price-sheet-updater.md)
- [Turn your product catalog into a wholesale line sheet with case prices and margin flags](https://botradar.ai/recipes/wholesale-line-sheet-from-catalog/) (Markdown: https://botradar.ai/recipes/wholesale-line-sheet-from-catalog.md)
- [Payment Deduction Check](https://botradar.ai/recipes/payment-deduction-check/) (Markdown: https://botradar.ai/recipes/payment-deduction-check.md)

Tags: wholesale, accounts-payable, purchasing, reconciliation

Source: BotRadar (https://botradar.ai/recipes/po-invoice-match/)
