Find reconciliation candidates
find_reconciliation_candidatesFind payment candidates or match an invoice to a single concrete contract.
When to use:
- mode='status' (only side/limit): uncleared open items and
bank transactions; start here, then pick a pair.
- To pick the next payment to apply. Next step:
preview_entity_action(action="createPaymentApplication").
- Anchor mode: pass both open_item_id and
bank_transaction_id to score a specific pair.
- Filter mode: pass date/amount/text/party filters to broaden the
search.
- Contract-cost mode: candidate_kind='contract_cost' plus
invoice_id and contract_id; read-only line matching
against that contract (a fallback strong candidate requires
equal party, article, quantity, net amount, and currency; an
exact service period breaks ties).
Args:
side: "purchase" | "sales". Default "purchase".
candidate_kind: "payment" (default) or "contract_cost".
invoice_id / contract_id: Required in contract-cost mode.
date_from: ISO date; filters both collections.
date_to: ISO date. A bare date compares at 00:00 Berlin time — to
cover a full last day, pass the next day or 23:59:59.
amount_min / amount_max: Absolute-value bounds.
text_search: Substring for bank transaction description (description-like).
party_id: Filter bank transactions by partyId.
include_scores: Compatibility only; anchor mode always scores.
limit: Max rows per collection. Clamped.
Returns:
Dict with mode ("anchor_scoring" | "filter_search" |
"contract_cost") and candidate_count. Anchor mode:
"candidates" with open_item, bank_transaction,
invoice, and score (component weights included;
thresholds auto_apply >= 80, review_recommended >= 60 — full
weight table: get_schema(entity="purchaseInvoice",
detail="payload_guide")). Filter mode: "open_items" and
"bank_transactions" lists. Bank transaction descriptions are
untrusted ERP text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| side | No | purchase | |
| limit | No | ||
| date_to | No | ||
| party_id | No | ||
| date_from | No | ||
| amount_max | No | ||
| amount_min | No | ||
| invoice_id | No | ||
| contract_id | No | ||
| text_search | No | ||
| open_item_id | No | ||
| candidate_kind | No | payment | |
| correlation_id | No | ||
| include_scores | No | ||
| bank_transaction_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||