← All examples
1 / 100
Jev Support ticket routing Code Example
Send the problem to the team that can actually solve it.
A customer says they were charged twice after upgrading to Pro.
Message Charged twice after upgrading.
Invoice INV-204
Plan Pro
Which team should handle this ticket?
0%
Billing.
Route this ticket to Billing.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"message": "Charged twice after upgrading.",
"invoice": "INV-204",
"plan": "Pro"
};
const decision = await evaluateDecision({
state,
question: "Which team should handle this ticket?",
options: ["Billing","Technical","Account"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Billing"
&& decision.probability >= 0.85) {
routeToTeam(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.