Reconcile many-to-many
reconcile_many_to_manyMatch each statement or deposit to the subset of invoices whose amounts sum to it, returning matched groups and unmatched residuals on both sides.
Instructions
Match each statement/deposit to a disjoint subset of invoices whose amounts sum to it (bounded subset-sum solved as an integer program). Returns matched groups and the unmatched residuals on each side.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoices | Yes | List of canonical records. Each is an object with 'id' (string) and 'amount' (number) required, plus optional 'currency' (ISO 4217), 'date' (ISO-8601), 'counterparty' (name), 'reference' (remittance/end-to-end id). | |
| statements | Yes | List of canonical records. Each is an object with 'id' (string) and 'amount' (number) required, plus optional 'currency' (ISO 4217), 'date' (ISO-8601), 'counterparty' (name), 'reference' (remittance/end-to-end id). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||