← All examples
35 / 100
Jev Abandoned checkout diagnosis Code Example
Identify the friction behind a failed checkout session.
shipping quote viewed, address edited 3 times, exit
Events shipping quote viewed, address edited 3 times, exit
Shipping Cost more than item price
What friction should be investigated?
0%
Shipping cost.
Let the application shipping cost.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"events": "shipping quote viewed, address edited 3 times, exit",
"shipping_cost": "more than item price"
};
const decision = await evaluateDecision({
state,
question: "What friction should be investigated?",
options: ["Shipping cost","Payment failure","Product mismatch"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Shipping cost"
&& decision.probability >= 0.85) {
tagCheckoutFriction(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.