Vendor Payment Reconciliation
Bank statement to AP ledger matching. Distinct from AP Invoice Reconciliation because the data is messier — bank descriptions rarely match vendor names cleanly, payments are often consolidated, and timing gaps are wider. Fuzzy matching and date windows do the heavy lifting.
What Gets Automated
Matching bank transactions to AP ledger entries despite format mismatches. Investigating consolidated payments (one bank debit covering multiple invoices). Identifying timing differences between payment date and bank clearing date. Agent resolves partial payments and unknown transactions.
What Humans Still Own
Unidentified transactions after AI investigation. Month-end reconciliation sign-off. Bank fee disputes and error corrections.
Pipeline
This template includes a schedule block — it runs automatically every day at 6 AM Eastern. Remove or adjust the schedule for manual execution.
{
"name": "vendor_payment_reconciliation",
"definition": {
"schedule": {
"every": "1d",
"at": "06:00",
"timezone": "America/New_York"
},
"actions": [
{
"type": "matcher",
"properties": {
"left": "@input.bank_transactions",
"right": "@input.ap_ledger",
"matchOn": ["reference_number"],
"tolerance": 0.005,
"dateWindowDays": 7,
"fuzzyThreshold": 75,
"descriptionKey": "description",
"outputMatched": "cleared",
"outputUnmatchedLeft": "unmatched_bank",
"outputUnmatchedRight": "outstanding_payments"
}
},
{
"type": "loop",
"filter": {
"condition": {
"greaterThan": [{ "length": "@unmatched_bank" }, 0]
}
},
"properties": {
"mode": "foreach",
"items_path": "@unmatched_bank",
"item_variable_name": "txn",
"actions_to_execute": [
{
"type": "loop",
"properties": {
"mode": "react",
"objective": "Investigate unmatched bank transaction: '{{txn.description}}' for ${{txn.amount}} on {{txn.date}}. Determine if this is: 1) A consolidated payment — search for AP entries that sum to this amount within ±7 days, 2) A timing delay — check for a matching AP entry in the next period, 3) A vendor name mismatch — the bank description may not match AP vendor name, try fuzzy matching, 4) A bank fee or interest charge. Provide: root cause, matched AP entries if found, and recommended action.",
"tools": [
{ "type": "action", "name": "search_ap_by_amount" },
{ "type": "action", "name": "search_ap_by_date_range" },
{ "type": "action", "name": "search_ap_by_vendor" },
{ "type": "action", "name": "get_known_bank_fees" }
],
"max_iterations": 8,
"on_stuck": {
"iterations": 3,
"action": "retry_with_hint",
"hint": "If you cannot identify the transaction, complete with recommendation to escalate for manual review."
},
"result_key": "investigation"
}
}
],
"max_concurrency": 5,
"failure_strategy": "continue_on_error",
"collect_results": true,
"result_key": "bank_investigations"
}
},
{
"type": "PbotApproval",
"filter": {
"condition": {
"greaterThan": [{ "length": "@unmatched_bank" }, 0]
}
},
"properties": {
"comment": "Bank reconciliation: {{cleared.length}} auto-cleared, {{unmatched_bank.length}} investigated. Review findings and approve close entries.",
"request_payload": {
"cleared_count": "@cleared.length",
"outstanding_count": "@outstanding_payments.length",
"investigations": "@bank_investigations"
}
}
},
{
"type": "custom-table",
"properties": {
"table": "bank_reconciliation_log",
"operation": "write",
"keys": ["run_id", "reconciliation_date"],
"values": ["@__run_id", "@now"],
"fields": {
"bank_transactions": "@input.bank_transactions.length",
"auto_cleared": "@cleared.length",
"investigated": "@unmatched_bank.length",
"outstanding_payments": "@outstanding_payments.length",
"status": "completed"
}
}
}
]
}
}
Required Registered Actions
| Action | Kind | Purpose |
|---|---|---|
search_ap_by_amount |
db | Find AP entries matching an amount or sum of amounts |
search_ap_by_date_range |
db | Find AP entries within a date window |
search_ap_by_vendor |
db | Fuzzy search AP entries by vendor/payee name |
get_known_bank_fees |
db | Retrieve known fee patterns for the bank account |
Customization Notes
Fuzzy threshold. 75 is lower than other templates because bank descriptions are notoriously messy ("WIRE TRF ACME" vs. "Acme Corporation"). Lower to 65 if your bank formats are especially terse; raise to 85 if descriptions are reasonably clean.
Date window. 7 days covers typical bank clearing delays. Extend to 10–14 days for international wires or ACH batches that clear slowly.
Consolidated payment detection. The search_ap_by_amount action should support sum-matching — finding multiple AP entries whose amounts sum to the bank transaction amount. This is the most common exception type in bank reconciliation.
Bank fee patterns. The get_known_bank_fees action returns known fee types and amounts for the bank account. Preloading common patterns (monthly maintenance fees, wire fees, etc.) lets the agent quickly classify these without investigation.