← Architecture Library

System Design · AI & Decisioning

Real-Time Customer Support Decision Orchestration with JEV

A real-time support architecture where TypeSafe JEV supplies bounded semantic judgments over enterprise context, while deterministic policy decides when to automate, generate a response, or escalate to a human.

Open presentation

A new local copy, ready to customize. No signup required.

Opening architecture Designer…

A support request is enriched with trusted CRM and business-system context before entering an application-owned decision workflow. The JEV adapter asks bounded semantic questions over a compact shared state: request intent, urgency, customer impact and automation suitability. Several typed judgments can be evaluated in the same request. Probability information, and confidence where returned, are architectural signals rather than permission to act. A separate deterministic gate combines these signals with business constraints, allowed actions and risk thresholds. Approved automation, generative response text and human review remain distinct resolution paths; JEV never executes enterprise operations. Timeouts, ambiguity and higher-impact cases preserve a safe path to review. Minimal decision evidence supports operational feedback without becoming business truth.

Technologies
TypeSafe AI JEV, System One, Enterprise APIs, CRM / Service Management, Generative LLM
Tags
JEV, System One, Decision Engine, AI Decisioning, Customer Operations, Customer Support, Human-in-the-Loop, Confidence Gating, AI Automation, Generative AI

How the decision flow works

  1. A customer submits a support request through an enterprise support channel.
  2. The orchestration service gathers only the trusted enterprise context needed for the decision.
  3. The JEV adapter sends shared state plus bounded decision questions to the external JEV decision API.
  4. JEV returns typed judgments, probability information and confidence where provided by the primitive.
  5. Deterministic policy combines the judgments with business rules, permitted actions and risk thresholds.
  6. The workflow selects controlled automation, generative assistance or human review; the orchestration service returns the result through the support channel.
  7. Minimal decision evidence and selected execution paths are recorded for operational visibility and improvement.

What JEV decides

  • Request intent — Choice: select billing, technical, account, order, service or other from a bounded set; retain option probabilities and confidence.
  • Urgency — Noul: estimate the probability that the request requires immediate attention. Noul provides a yes-probability rather than a separate confidence field.
  • Customer impact — Score: judge the request against an ordered low → degraded → blocked rubric; retain the score, probability distribution and confidence.
  • Automation suitability — Noul: estimate whether the request fits an approved automated workflow. A favorable judgment still requires deterministic policy approval.
  • The questions share the same minimal state: customer message, account context, ticket history, current service status and relevant order, account or billing information. Each question is evaluated independently; one request can carry several judgments.
  • These results are semantic judgments consumed by application code, not direct business commands.

Why policy remains outside the model

Model probability and confidence are evidence, not authorization. The application retains hard business constraints, action allowlists and access controls, and combines these with uncertainty and the impact of the proposed action. Known rules belong in code or a rules engine; they do not need to be delegated to AI. High-impact actions require stronger controls and, where appropriate, explicit human approval. JEV supplies bounded judgments, while policy governs execution and the orchestration service owns the workflow.

Confidence-driven execution

Failure and fallback

  • JEV timeout or unavailable service → record the failure as unavailable evidence and apply deterministic safe fallback; consequential actions do not become permitted by failure.
  • Low-confidence or ambiguous judgment → human review or a safe non-consequential fallback.
  • Unsupported request → manual handling through the human review queue.
  • High-impact action → stronger deterministic controls and explicit human approval when required, even when the semantic judgment is confident.
  • Generative response failure → preserve the underlying case and workflow; retry or return an approved fallback response.
  • Downstream business-system failure → treat it as an execution failure with application-owned retry and idempotency controls; do not reinterpret it as a model decision.
  • Decision auditing → retain minimal, redacted evidence and correlation metadata for review; avoid unrestricted customer payloads and unnecessary sensitive information.

Ideas for your remix

  • Replace customer support with claims, onboarding, fraud operations, fulfillment, underwriting assistance or service operations, keeping consequential authority in deterministic controls and appropriate human review.
  • Replace JEV with another bounded decision model behind the same application-owned adapter.
  • Replace CRM and business systems with Salesforce, ServiceNow, Zendesk, SAP or domain-specific systems.
  • Add more bounded decisions over the same minimal shared state.
  • Introduce different thresholds according to action impact and the cost of false positives or false negatives.
  • Add a dedicated human approval workflow for consequential actions.
  • Add experimentation and evaluation around decision quality, escalation outcomes and feedback.
  • Add event-driven or asynchronous execution for longer-running business workflows.

Architecture source

aal system-design "0.2"
dictionary "0.2.0"
design SupportDecisioning "Real-Time Customer Support Decision Orchestration with JEV" {
  element Customer "Business Customer" {
    type generic.customer
    technology "Web / Mobile / Messaging"
    description "Customer requesting support or resolution for an account, service, order, billing, or technical issue."
    tags ["customer", "support"]
  }
  element Channels "Support Channels" {
    type generic.application
    technology "Web / Mobile / Messaging"
    description "Captures the customer's request and presents the resulting support experience."
    tags ["experience", "support"]
  }
  element Intake "Support Intake API" {
    type generic.api_gateway
    technology "REST / HTTPS"
    description "Receives support requests and invokes the decision orchestration workflow."
    tags ["api", "entry-point"]
  }
  element DecisionDomain "Decision Orchestration" {
    type generic.application
    technology "Application-owned control boundary"
    description "Coordinates bounded judgments while retaining execution authority in deterministic application policy."
    tags ["orchestration", "governance"]
    element Orchestrator "Decision Orchestration Service" {
      properties {
        response_delivery "Returns the selected workflow outcome or generated response to Support Intake API and Support Channels through the request lifecycle."
        control_owner "Customer Operations Engineering"
      }
      type generic.application
      technology "Application service"
      description "Coordinates trusted context, semantic judgments, policy, fallback and permitted execution paths."
      tags ["orchestration", "decisioning"]
      owner "Customer Operations Engineering"
    }
    element Adapter "JEV Decision Adapter" {
      properties {
        shared_state ["customer message", "customer/account context", "ticket history", "current service status", "relevant order/account/billing state"]
        request_intent {
          primitive "Choice"
          options ["billing", "technical", "account", "order", "service", "other"]
        }
        urgency {
          primitive "Noul"
          question "Does this request require immediate attention?"
          signal "Probability of yes; no separate confidence field"
        }
        customer_impact {
          primitive "Score"
          rubric ["low", "degraded", "blocked"]
        }
        automation_suitability {
          primitive "Noul"
          question "Does this request fit an approved automated workflow?"
        }
        normalization "Choice/Score: typed value, probabilities and confidence. Noul: yes-probability. Preserve uncertainty rather than synthesizing vendor confidence."
        failure_contract "Timeout, unavailable or malformed outcomes become unavailable evidence; deterministic policy selects review or safe fallback."
      }
      type generic.application
      technology "TypeSafe AI SDK / JEV client"
      description "Builds bounded requests, normalizes typed outcomes and handles timeout, error or uncertainty."
      tags ["jev", "decision-adapter", "typed-output"]
    }
    element Gate "Policy & Confidence Gate" {
      properties {
        authority "Application policy owns the execution decision; model outputs never authorize business actions."
        controls ["hard business rules", "permitted action allowlist", "confidence/probability thresholds", "action risk/impact", "escalation thresholds"]
        safe_fallback "Unavailable, ambiguous, low-confidence, unsupported or high-impact cases route to human review or safe fallback."
        known_rules "Keep known business constraints in code or rules; require stronger approval for consequential actions."
      }
      type generic.policy
      technology "Deterministic rules + confidence thresholds"
      description "Combines judgments with business rules, allowed actions and risk limits to permit execution or review."
      tags ["policy", "confidence-gate", "governance"]
      owner "Customer Operations Engineering"
    }
    element Context "Context Builder" {
      type generic.application
      technology "Application service"
      description "Assembles only the trusted enterprise context needed to evaluate the current support request."
      tags ["context", "data-minimization"]
    }
  }
  element CRM "CRM & Ticket Context" {
    type generic.application
    technology "CRM / Service Management"
    description "Provides customer history, open cases, interaction history and support context."
    tags ["crm", "customer-context"]
  }
  element Business "Enterprise Business Systems" {
    type generic.external_system
    technology "Enterprise APIs"
    description "Provides authoritative business state and executes approved order, billing or account operations."
    tags ["enterprise", "system-of-record"]
  }
  element JevApi "TypeSafe JEV Decision API" {
    properties {
      execution_authority false
      question_evaluation "Choice, Score and Noul questions evaluate the same supplied state independently in one request."
      outputs "Typed semantic judgments; Choice/Score probabilities and confidence, Noul yes-probability."
    }
    type generic.runtime
    technology "TypeSafe AI · JEV System One"
    description "Evaluates bounded semantic questions over shared state and returns typed judgments with probability signals."
    tags ["jev", "system-one", "semantic-decisioning", "external"]
    external true
  }
  element Automation "Automated Resolution Workflow" {
    properties {
      action_controls ["pre-approved workflow", "application authorization", "idempotent execution", "downstream error handling"]
      failure_behavior "Business-system errors remain execution failures; they are not reinterpreted as model judgments."
    }
    type generic.workflow
    technology "Deterministic workflow"
    description "Runs known, low-risk, pre-approved workflows only when policy, confidence and action risk permit."
    tags ["automation", "workflow"]
  }
  element Generation "Generative Response Service" {
    properties {
      execution_authority false
      failure_behavior "Preserve the underlying case and workflow if response generation fails."
    }
    type generic.runtime
    technology "Generative LLM"
    description "Produces customer-facing response text after decisioning; it does not authorize business operations."
    tags ["generation", "llm", "response"]
    icon "generic/ai"
  }
  element Review "Human Review Queue" {
    type generic.queue
    technology "Case / review queue"
    description "Routes uncertain, unsupported, exceptional or higher-impact cases to a human support specialist."
    tags ["human-in-the-loop", "fallback"]
  }
  element Audit "Decision Audit Store" {
    properties {
      evidence ["context references or redacted decision inputs", "normalized outcomes", "confidence/probability", "selected execution path", "correlation and failure metadata"]
      privacy "Minimize and redact evidence; avoid unrestricted customer payloads and unnecessary sensitive data."
      business_truth false
    }
    type generic.database
    technology "Decision audit store"
    description "Records minimal decision evidence, outcomes, confidence, selected path and correlation metadata."
    tags ["audit", "decision-history", "data-minimization"]
  }
  element Operations "Decision Operations Dashboard" {
    type generic.dashboard
    technology "Operational analytics"
    description "Tracks decision volumes, intent, confidence, automation, escalation, failures and quality feedback."
    tags ["observability", "decision-quality"]
  }
  relation SupportRequest Customer -> Channels request_response "Support request"
  relation SubmitRequest Channels -> Intake request_response "Submit request"
  relation StartFlow Intake -> Orchestrator invoke "Start decision flow"
  relation BuildState Orchestrator -> Context invoke "Build decision state"
  relation ReadCustomer Context -> CRM read "Case context"
  relation ReadBusiness Context -> Business read "business state"
  relation Evaluate Orchestrator -> Adapter invoke "Eval decisions"
  relation DecisionRequest Adapter -> JevApi request_response "Decision request"
  relation TypedOutcomes Adapter -> Gate invoke "outcome + confidence"
  relation Automate Gate -> Automation invoke "Approved automation"
  relation Generate Gate -> Generation invoke "Generate response"
  relation Escalate Gate -> Review deliver "Uncertain/risky"
  relation ApprovedAction Automation -> Business request_response "Approved action"
  relation Record Orchestrator -> Audit write "Decision record"
  relation Metrics Operations -> Audit read "Decision metrics"
}