Three-way match
match_invoice_to_poRun a read-only three-way match of an invoice against its purchase order and goods receipts to check quantities, prices, duplicates, dates, and tolerances, then return findings and routing.
Instructions
Run a three-way match of an invoice against its purchase order and goods receipts. Checks vendor, currency, duplicates, dates, per-line quantity (vs ordered and received, net of already-approved invoices) and unit price, using tolerance rules. Returns an outcome (matched / matched_within_tolerance / exception), the list of findings with severity, and a recommended routing action and reason code. Read-only: it never changes the ledger. Call this before route_exception.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"invoiceId": "<invoiceId>"
},
"name": "match_invoice_to_po"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoiceId | Yes | Ledger invoice id, e.g. "inv_003". Obtain ids from list_invoices. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outcome | Yes | ||
| poTotal | Yes | ||
| findings | Yes | ||
| invoiceId | Yes | ||
| invoiceTotal | Yes | ||
| recommendedAction | Yes | ||
| recommendedReasonCode | Yes |