Audit PO vs Receiving vs Supplier Invoice (3-Way Match + QuickBooks/Xero CSVs)
reconcile_po_three_way_matchPerforms 3-way match on POs, receiving counts, and invoices to catch overbilling, short shipments, price creep, and freight overages. Exports verified QuickBooks/Xero bill CSVs.
Instructions
Deterministic Finance Ops 3-way match engine for wholesalers and Shopify merchants. Cross-examines approved Purchase Order lines, warehouse dock receiving counts (good vs damaged units), and billed supplier invoice lines to catch silent unit-price creep, short-shipments billed in full, unapproved surcharges, and freight cap overages. Emits ready-to-import QuickBooks Online (quickbooks_bill_csv) and Xero (xero_bill_csv) Purchase Bill CSVs containing ONLY verified payable quantities and unit costs, plus a vendor Debit Memo email. Free Local Sandbox audits up to 15 invoice lines per call; Pro/License unlocks unlimited invoice audits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | No | Vendor or distributor name. | Supplier |
| currency | No | 3-letter ISO currency code for QuickBooks/Xero export. | USD |
| due_date | No | Bill due date in YYYY-MM-DD format (defaults to Net 30 from invoice_date). | |
| po_lines | No | Approved Purchase Order line items. | |
| demo_mode | No | Run a realistic 3-way match audit catching silent price creep, damaged units, and unapproved pallet fees. | |
| po_number | No | Purchase Order reference number. | PO-2026-1042 |
| invoice_date | No | Invoice date in YYYY-MM-DD format (defaults to today UTC). | |
| invoice_lines | No | Billed lines extracted from the supplier PDF/CSV invoice. | |
| invoice_number | No | Supplier invoice number for QuickBooks/Xero Bill CSV export (defaults to INV-<po_number>). | |
| receiving_lines | No | Warehouse receiving counts per SKU. | |
| xero_account_code | No | Xero chart-of-accounts code for inventory/COGS lines (defaults to '310'). | |
| qbo_expense_account | No | QuickBooks Online expense/COGS account name (defaults to 'Cost of Goods Sold'). | |
| agreed_freight_cap_usd | No | Maximum freight/shipping charge agreed on the PO, if applicable. | |
| invoice_extra_fees_usd | No | Freight, pallet, or handling charges billed on the invoice. |