A three-record comparison checks purchase-order terms, accepted receipts, and invoice lines under a supplied organizational tolerance. Carry stable line IDs, units, ordered and cumulative received quantities, prior billed quantity, current bill, and agreed price. A partial shipment may be legitimate; an invoice can also cover several orders. The model should describe the precise discrepancy, while procurement and receiving systems supply the authoritative records. It must not invent a tolerance because the mismatch seems small.
Make this comfortable
Invoice prompts: match order, receipt, and bill
Operational case
PO Q-47 orders 47 units at 29. INV-47 bills the same quantity and price, but receiving has accepted 45. Two billed units, worth 58 before other charges, lack receipt support. Receiving must determine whether the units are pending, rejected, or absent from the feed. North Quay holds the invoice while that evidence is gathered. A matching PO line does not erase the missing receipt.
PO: 47 × 29 | accepted receipt: 45
Invoice: 47 × 29
Quantity exception: 2 units; line value 58
Configured tolerance: not supplied -> holdPerformance and review cost
With indexed keys, L invoice lines need O(L) expected matching lookups; constructing cumulative receipt state costs O(R) for R events. Recording the unit and prior billing avoids false exceptions on partial deliveries. The prompt should expose missing evidence rather than guess a policy threshold.
Common Mistakes
- Do not equate ordered with received quantity.
- Do not ignore earlier bills on a split order.
- Do not invent an acceptance tolerance.
Connected lessons
- Production prompt engineering
- Prompt Engineering
- Aggregation prompts: pin the denominator and recompute the rate
- Report prompts: reconcile every claim with the packet
- Invoice prompts: pin provenance and vendor identity
- Invoice prompts: anchor each extracted field
- Invoice prompts: recalculate typed charges
- Invoice prompts: distinguish duplicate ingests from credits
- Invoice prompts: route exceptions before approval
- Project: reconcile a North Quay invoice exception
- Invoice exception prompt decisions
prompt engineering
invoice operations
