All Use Cases

Support Ticket Triage

Automatically route support tickets by priority in under 100ms.

The Challenge

High-volume support teams waste hours every day manually triaging incoming tickets. A human reads the subject line, scans the body, checks the customer tier, and decides: urgent, normal, or low priority. Multiply that by hundreds or thousands of tickets per day.

The cost isn't just the triage time — it's the delay. An urgent ticket from an enterprise customer sitting in a general queue for 20 minutes because nobody triaged it yet is a churn risk.

Rules don't work well here. You can catch keywords like "down" or "broken," but a message saying "our entire team is down to the last feature before launch" isn't urgent. Context matters.

LLM calls add latency. Routing a ticket through GPT-4o for triage adds 500-1500ms before it even enters the queue. For a system processing thousands of tickets per hour, that queuing delay compounds.

What you need is instant, accurate triage that understands the difference between "the server is down" and "I'm feeling down about the new UI."

How Sparkient Solves It

A compiled triage model classifies tickets in under 100ms by combining text understanding with structured signals. The model considers:

  • Ticket content — Subject line and body text, interpreted semantically (not just keywords)
  • Customer context — Tier, account value, contract terms
  • Historical signals — Number of open tickets, previous escalation patterns
  • Urgency indicators — Mentions of deadlines, revenue impact, system outages

Priority Definitions

  • urgent — System outages, data loss, security incidents, enterprise customer escalations, revenue-impacting issues. Route to senior support or on-call immediately.
  • normal — Feature questions, configuration help, bug reports with workarounds, billing questions. Route to the standard support queue.
  • low — Feature requests, general feedback, documentation questions, "how do I" queries. Route to the backlog or self-service.

Rules + Classifier

CEL rules handle the deterministic routing:

cel
// Enterprise customers always get urgent routing
ctx.customer_tier == "enterprise" ? "urgent" : null

// Tickets mentioning security terms get urgent routing
ctx.body.contains("security breach") || ctx.body.contains("data leak") ? "urgent" : null

// Feature requests are always low priority
ctx.subject.contains("[Feature Request]") ? "low" : null

The compiled classifier handles everything else — the nuanced cases where priority depends on understanding what the customer is actually saying.

Code Example

python
import httpx

response = httpx.post(
    "https://api.sparkient.ai/api/v1/decide",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "decision_type_id": "support-triage",
        "input": {
            "subject": "Can't process any orders",
            "body": "Since this morning, none of our customers can complete checkout. We're getting timeout errors on every transaction. This is costing us thousands per hour.",
            "customer_tier": "pro",
            "open_tickets": 0
        }
    }
)

result = response.json()
# {
#     "decision": "urgent",
#     "confidence": 0.95,
#     "latency_ms": 35,
#     "stage": "classifier"
# }

Integrating with Your Helpdesk

python
async def on_ticket_created(ticket):
    triage = await sparkient_decide("support-triage", {
        "subject": ticket.subject,
        "body": ticket.body,
        "customer_tier": ticket.customer.tier,
        "open_tickets": ticket.customer.open_ticket_count
    })

    ticket.priority = triage["decision"]
    ticket.auto_triaged = True
    ticket.triage_confidence = triage["confidence"]

    if triage["decision"] == "urgent":
        await notify_oncall_team(ticket)
    
    await ticket.save()

Triage happens before the ticket enters the queue. By the time an agent sees it, it's already prioritised and routed.

Performance

| Metric | Compiled Triage | Rules Only | Manual Triage | |--------|----------------|------------|---------------| | Latency | 33-38ms | <1ms | 30-120 seconds | | Consistency | Deterministic | Deterministic | Varies by agent | | Context understanding | High | Low | High | | Scales with volume | Yes | Yes | No |

Compiled triage runs at 89-93% F1 across priority classes — accurate enough to handle the bulk of routing automatically, with the "normal" bucket serving as a safe default for borderline cases.

Get Started

Define your priority categories and routing rules, then train a compiled triage model. Start with the free tier — 5,000 credits, no credit card required.

Import this template

Get started in minutes. Import a pre-built decision type and customise it for your use case.

Import Template