J.

Jev Email routing Code Example

Send inbound messages down a useful automation path.

A customer asks to cancel next month's renewal while keeping access until the paid period ends.

Subject Please cancel next month’s renewal
Body Keep access until the paid period ends.

Which workflow should start?

0% Cancellation review.
Cancellation review 94%
Immediate deletion 4%
Billing question 2%

Start the cancellation review and preserve access until the paid period ends.

Code
Conceptual pseudocode — not official Jev SDK syntax
// Conceptual pseudocode — not Jev SDK syntax
const state = {
  "subject": "Please cancel next month’s renewal",
  "body": "Keep access until the paid period ends."
};

const decision = await evaluateDecision({
  state,
  question: "Which workflow should start?",
  options: ["Cancellation review","Immediate deletion","Billing question"],
});

// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Cancellation review"
    && decision.probability >= 0.85) {
  startCancellationReview(decision);
} else {
  queueForReview(decision);
}

This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.