J.

Jev Multilingual queue Code Example

Route mixed-language messages without guessing from locale.

Hola, necesito ayuda con mi factura.

Message Hola, necesito ayuda con mi factura.
Account Locale en-US

Which language queue fits this message?

0% Spanish.
Spanish 78%
English 15%
Language review 7%

Let the application spanish.

Code
Conceptual pseudocode — not official Jev SDK syntax
// Conceptual pseudocode — not Jev SDK syntax
const state = {
  "message": "Hola, necesito ayuda con mi factura.",
  "account_locale": "en-US"
};

const decision = await evaluateDecision({
  state,
  question: "Which language queue fits this message?",
  options: ["Spanish","English","Language review"],
});

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

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