← All examples
84 / 100
Jev Buying stage detection Code Example
Match the next conversation to the customer’s actual stage.
Security review is done. Can you send the order form?
Message Security review is done. Can you send the order form?
History demo completed
Which stage best fits this opportunity?
0%
Procurement.
Let the application procurement.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"message": "Security review is done. Can you send the order form?",
"history": "demo completed"
};
const decision = await evaluateDecision({
state,
question: "Which stage best fits this opportunity?",
options: ["Procurement","Discovery","Evaluation"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Procurement"
&& decision.probability >= 0.85) {
suggestDealStage(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.