← All examples
47 / 100
Jev Invoice exception routing Code Example
Send mismatched invoices to an accountable reviewer.
The application receives context for a invoice exception routing decision.
Invoice Total 4200
Purchase Order Total 2400
Currency AUD
What needs to happen before payment?
0%
Review mismatch.
Send it to review mismatch.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"invoice_total": 4200,
"purchase_order_total": 2400,
"currency": "AUD"
};
const decision = await evaluateDecision({
state,
question: "What needs to happen before payment?",
options: ["Review mismatch","Ready for payment","Request currency"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Review mismatch"
&& decision.probability >= 0.85) {
holdInvoiceForReview(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.