Route invoice decision
route_exceptionRecord an invoice routing decision—approve, hold, or reject—with a reason code while server-enforced policy checks blocking findings, overrides, and finality.
Instructions
Record a routing decision for an invoice: approve, hold or reject, with a reason code. The server re-runs the match itself and enforces policy: approving an invoice with blocking findings is refused unless reasonCode=MANUAL_OVERRIDE, override=true and a note of 10+ chars (and duplicates can never be approved); reject needs a blocking finding with the same reason code; approved/rejected invoices are final. Idempotent: repeating the identical decision returns changed=false. Prefer "hold" when unsure, it is reversible. Changes the ledger.
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>",
"action": "<action>",
"reasonCode": "<reasonCode>"
},
"name": "route_exception"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Free-text justification shown to auditors. Required (10+ chars) with MANUAL_OVERRIDE. | |
| action | Yes | approve = release for payment; hold = pause for human review (reversible); reject = final refusal. | |
| override | No | Set true ONLY when a human explicitly told you to force a decision against the match result. | |
| invoiceId | Yes | Ledger invoice id, e.g. "inv_003". Obtain ids from list_invoices. | |
| reasonCode | Yes | Why. Approve needs MATCHED_OK or WITHIN_TOLERANCE (or MANUAL_OVERRIDE). Hold/reject need a problem code such as PRICE_VARIANCE, QTY_VARIANCE, NO_RECEIPT, NO_PO, VENDOR_MISMATCH, CURRENCY_MISMATCH, DATE_ISSUE or DUPLICATE. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| changed | Yes | false when this exact decision was already recorded (safe replay). | |
| decision | Yes | ||
| invoiceId | Yes | ||
| matchOutcome | Yes |