Reconciliation in Well
Goal: connect money movement (transactions) to commercial documents (invoices) and report what is matched, unpaid, or unexplained.
What Well already links
Well's pipelines maintain the link between a bank transaction and the invoice(s) it settles. Check the schema before computing matches by hand:
well_get_schema("invoice_transactions")— the join between invoices and transactions, if exposed. Querying this root is the fastest path to "which invoices are settled by which transactions".well_get_schema("invoices")— look for a payment-status / amount-paid / outstanding field and thegrand_total.well_get_schema("transactions")— amount, value/booking date, counterparty, and remittance fields.
Do this
- Unpaid invoices: query
invoicesfiltered on the payment-status / outstanding field the schema exposes (don't infer "unpaid" by subtracting sums if a status field exists). Sort by due date or amount. - Matched: read
invoice_transactions(or the link the schema shows) to list invoice ↔ transaction pairs. - Unmatched transactions:
transactionswith no linked invoice — candidates for manual review (could be fees, transfers, or a missing invoice). - When matching by hand (no link exposed), match on amount + date proximity + counterparty, never on amount alone.
Do NOT
- Do not declare an invoice paid purely because a transaction of the same amount exists — confirm via the link or counterparty + date.
- Do not sum across currencies without converting (see
exchange_rates).
Present it
Three buckets — Matched, Unpaid invoices, Unexplained transactions — each with counts and totals, plus the currency. Offer to drill into any bucket with well_get_entity.