All Use Cases

Lead Qualification

Score inbound leads in real time for instant routing.

The Challenge

When a lead fills out your contact form at 2 PM on a Tuesday, the clock starts. Research from InsideSales.com shows that contacting a lead within 5 minutes makes you 21× more likely to qualify them compared to waiting 30 minutes. But not every lead deserves a 5-minute response — your sales team has limited capacity.

The triage problem: which leads need immediate outreach, which can wait for a nurture sequence, and which aren't worth pursuing?

Manual qualification doesn't scale. A sales rep scanning each form submission, checking the company on LinkedIn, and deciding priority takes 2-5 minutes per lead. At 200+ inbound leads per day, that's a full-time job just for triage.

Rules-based scoring is brittle. "Enterprise" in the company name gets 10 points. "Gmail" email gets -5 points. These rules miss the signal in what the lead actually says — their message content, urgency, and intent.

LLM-based scoring is overkill. Calling GPT-4o to qualify every lead adds latency and cost that aren't justified for a routing decision.

How Sparkient Solves It

A compiled lead qualification model scores leads in under 100ms by combining structured signals (company size, role, source) with text analysis (message content, urgency language, buying intent).

The Three Buckets

  • hot — High buying intent, decision-maker role, strong company fit. Route to sales immediately. Trigger a notification, auto-schedule a call, or push to the top of the queue.
  • warm — Moderate interest, potential fit, but not ready to buy today. Add to a nurture sequence with personalised follow-up within 24 hours.
  • cold — Low fit, info-seeking, or unqualified. Add to a general newsletter or marketing automation. Don't waste sales time.

Multi-Signal Scoring

The compiled model evaluates:

  • Company signals — Employee count, industry, domain (enterprise vs. startup vs. personal email)
  • Role signals — Job title, seniority level, department
  • Behavioural signals — Pages visited, content downloaded, form source
  • Message content — Buying language, timeline mentions, budget references, competitive comparisons
  • Timing signals — Business hours submission, urgency language

CEL rules handle the obvious cases:

cel
// Personal email addresses are cold by default
ctx.email.contains("@gmail.com") || ctx.email.contains("@yahoo.com") ? "cold" : null

// Enterprise companies with decision-maker titles are always hot
ctx.employee_count > 1000 && ctx.role.contains("VP") ? "hot" : null

// Explicit budget mention is a strong buy signal
ctx.message.contains("budget") && ctx.message.contains("approved") ? "hot" : null

The compiled classifier handles everything in between — the leads where qualification depends on reading between the lines.

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": "lead-qualification",
        "input": {
            "name": "Sarah Chen",
            "email": "s.chen@acmecorp.com",
            "company": "AcmeCorp",
            "employee_count": 2500,
            "role": "Director of Engineering",
            "message": "We're evaluating decision automation tools for our content moderation pipeline. We need something that runs under 100ms and handles 200K decisions per day. Currently using GPT-4o but the costs are unsustainable. Would love to discuss pricing for the Scale tier.",
            "source": "pricing_page",
            "pages_visited": 7
        }
    }
)

result = response.json()
# {
#     "decision": "hot",
#     "confidence": 0.96,
#     "latency_ms": 36,
#     "stage": "classifier"
# }

CRM Integration

python
async def on_lead_submitted(lead):
    qualification = await sparkient_decide("lead-qualification", {
        "name": lead.name,
        "email": lead.email,
        "company": lead.company_name,
        "employee_count": lead.company_size,
        "role": lead.job_title,
        "message": lead.message,
        "source": lead.utm_source,
        "pages_visited": lead.pageview_count
    })

    lead.score = qualification["decision"]
    lead.score_confidence = qualification["confidence"]

    if qualification["decision"] == "hot":
        await notify_sales_team(lead, channel="slack", priority="high")
        await schedule_followup(lead, delay_minutes=0)
    elif qualification["decision"] == "warm":
        await add_to_nurture_sequence(lead, sequence="product-interest")
        await schedule_followup(lead, delay_hours=24)
    else:
        await add_to_newsletter(lead)

    await lead.save()

The qualification happens in real time — by the time the lead sees the "Thank you" page, your sales team already has a Slack notification for hot leads.

Performance

| Metric | Compiled Qualification | Rules Only | Manual Triage | |--------|----------------------|------------|---------------| | Latency | 35-40ms | <1ms | 2-5 minutes | | Consistency | Deterministic | Deterministic | Varies by rep | | Text understanding | High | None | High | | Handles 200+ leads/day | Yes | Yes | Requires headcount |

Compiled lead qualification typically achieves 90-95% F1 across the three buckets — accurate enough to route automatically, with warm leads serving as a safe middle ground for borderline cases.

Get Started

Define your qualification criteria and lead schema, then train a compiled scoring 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