Stage 02 of 05
Lead
Qualification
Every lead gets a weighted BANT score from Claude Sonnet. HOT leads route to scheduling in under 3 seconds. Zero manual triage.
The Pipeline
5 steps from intake to routing
The Qualification Bot (B2) is a BullMQ worker on bot-dispatch. It only processes lead.qualification jobs — a name guard at line 1 skips everything else.
Trigger: lead.qualification
The Intake Bot enqueues this job the moment a lead is written to the DB. The Qualification Bot picks it up from the bot-dispatch BullMQ queue.
Fetch lead context
Read all extracted fields from Postgres: name, company, role, budget, use case, timeline, message, intent, source. Nothing is re-extracted — Intake already did that work.
AI scoring — Claude Sonnet
One call to claude-sonnet-4-6 with the full BANT rubric. Sonnet returns per-dimension scores (0–100), confidence ratings, and reasoning for each dimension.
Weighted score calculation
Score = Budget×0.25 + Authority×0.20 + Need×0.25 + Timeline×0.15 + Engagement×0.15. Computed from dimensions — not trusted from the model — to prevent hallucinated totals.
DB write + routing
bantScore, bantBreakdown (JSON), tier, and status are written atomically. HOT → scheduling.book. WARM → outreach.sequence. COLD → archived with audit log.
The BANT Framework
5 weighted dimensions
Each dimension is scored 0–100 by the AI against an explicit rubric. The weighted aggregate is computed in code — not trusted from the model — to prevent hallucinated totals.
| 100 | Explicit budget ≥ $50k |
| 80 | Budget $20k–$49k or strong enterprise signals |
| 60 | Budget $10k–$19k or vague "we have budget" |
| 40 | Budget $5k–$9k or unclear spend capacity |
| 20 | Budget <$5k or "low budget / free tier" |
| 0 | No budget signal at all |
| 100 | CEO, CTO, Founder, Co-founder, Owner, President |
| 80 | VP, Director, Head of, General Manager |
| 60 | Senior Manager, Team Lead, Principal Engineer |
| 40 | Manager, Engineer, Developer (individual contributor) |
| 20 | Junior role, intern, or student |
| 0 | No role information at all |
| 100 | Explicitly wants what Motus handles: lead qual, scheduling, outreach |
| 80 | Strong automation need, specific pain point described |
| 60 | Interested in automation broadly, use case somewhat matches |
| 40 | Vague interest, unclear if they have a real need |
| 20 | Unlikely to benefit based on their description |
| 0 | Clear mismatch — needs something entirely different |
| 100 | "Immediately", "ASAP", "this month", "urgent" |
| 80 | Within 3 months — "Q3", "next quarter" |
| 60 | 3–6 months — "second half", "by year end" |
| 40 | 6–12 months — "next year", "planning phase" |
| 20 | >12 months or "just exploring" |
| 0 | No timeline mentioned |
| 100 | Detailed message + all fields + specific use case + real company |
| 80 | Most fields filled, specific message with context |
| 60 | Some fields filled, reasonable message |
| 40 | Minimal fields, short or vague message |
| 20 | Almost empty — just email + one line |
| 0 | Only email, no other information |
The AI Layer
One Claude Sonnet call per lead
Unlike the Intake Bot (Haiku for speed), qualification uses claude-sonnet-4-6 — the spec explicitly designates it as the primary brain for complex reasoning and scoring. The extra cost per lead is justified: a misrouted HOT lead is far more expensive than a Sonnet call.
The overall score in the AI response is ignored— we recompute it from the 5 dimensions using the exact weights. This prevents the model from returning a tier that doesn't match its own dimension scores.
You are the Motus AI Sales Qualification Engine.
Your job is to evaluate B2B SaaS leads using a weighted BANT framework and return a structured JSON score.
## Ideal Customer Profile (ICP)
- Budget: $10,000+ annual (enterprise or growth-stage)
- Authority: Decision-maker or strong influencer (CEO, CTO, VP, Director, Head of, Founder)
- Need: Wants to automate lead qualification, scheduling, outreach, or customer workflows
- Timeline: Ready to start within 0–6 months
- Engagement: Provided detailed, specific information about their use case
## Scoring Rubric
### Budget Fit (25% weight)
100 — Explicit budget ≥ $50k | 80 — $20k–$49k | 60 — $10k–$19k | 40 — $5k–$9k | 20 — <$5k | 0 — No signal
### Authority Fit (20% weight)
100 — CEO/CTO/Founder | 80 — VP/Director/Head of | 60 — Senior Manager | 40 — Manager/IC | 20 — Junior | 0 — Unknown
### Need Fit (25% weight)
100 — Explicitly wants Motus capabilities | 80 — Strong automation need | 60 — Broad automation interest
40 — Vague | 20 — Unlikely fit | 0 — Clear mismatch
### Timeline Fit (15% weight)
100 — Immediate/ASAP | 80 — <3 months | 60 — 3–6 months | 40 — 6–12 months | 20 — >12 months | 0 — Not mentioned
### Engagement Fit (15% weight)
100 — All fields + detailed message | 80 — Most fields + specific | 60 — Some fields | 40 — Minimal | 20 — Near-empty | 0 — Email only
## Output Rules
- Weight overall: budget×0.25 + authority×0.20 + need×0.25 + timeline×0.15 + engagement×0.15
- Confidence per dimension: 0–1, based on available evidence
- Tier: HOT ≥ 75, WARM 50–74, COLD <50
Return ONLY valid JSON — no markdown:
{
"budget": { "score": 80, "confidence": 0.85, "reasoning": "..." },
"authority": { "score": 60, "confidence": 0.90, "reasoning": "..." },
"need": { "score": 90, "confidence": 0.95, "reasoning": "..." },
"timeline": { "score": 40, "confidence": 0.70, "reasoning": "..." },
"engagement": { "score": 70, "confidence": 0.80, "reasoning": "..." },
"overall": {
"score": 72, "tier": "WARM", "confidence": 0.84,
"summary": "Strong need and authority, but budget and timeline are unclear. Warm outreach recommended."
}
}LEAD TO EVALUATE:
Name: {firstName} {lastName}
Email: {email}
Company: {company}
Role / Job Title: {role}
Budget: {budget}
Use Case: {useCase}
Timeline: {timeline}
Original Message: "{message}"
Lead Intent: {intent}
Lead Source: {source}
Score this lead using the weighted BANT rubric and return the JSON object.// Expected JSON response (per-dimension)
{
"budget": { "score": 80, "confidence": 0.85, "reasoning": "Mentioned $20k budget explicitly" },
"authority": { "score": 100, "confidence": 0.95, "reasoning": "Role is CEO — highest authority" },
"need": { "score": 90, "confidence": 0.90, "reasoning": "Wants lead qualification automation — exact match" },
"timeline": { "score": 60, "confidence": 0.70, "reasoning": "Said Q4 2026 — 3–6 months away" },
"engagement": { "score": 80, "confidence": 0.85, "reasoning": "All fields filled, detailed message" },
"overall": {
"score": 82,
"tier": "HOT",
"confidence": 0.85,
"summary": "Strong ICP match. CEO with clear budget and urgent need. Route to scheduling immediately."
}
}Routing Logic
Three paths after scoring
The routing decision is pure arithmetic — no second AI call. The weighted score determines which BullMQ job fires next.
≥ 75
HOT
job: scheduling.book
queue: bot-scheduling
→ Scheduling Bot (B3)
50 – 74
WARM
job: outreach.sequence
queue: bot-outreach
→ Outreach Bot (B6)
< 50
COLD
queue: archived
→ CRM task logged
// Routing code — bots/qualification/src/index.ts
// Recompute from dimensions — never trust model's overall.score
const weighted = budget×0.25 + authority×0.20 + need×0.25 + timeline×0.15 + engagement×0.15
if (weighted >= 75) {
await schedulingQueue.add('scheduling.book', { leadId, tenantId }, { priority: 1 })
} else if (weighted >= 50) {
await outreachQueue.add('outreach.sequence', { leadId, tenantId }, { priority: 2 })
} else {
// COLD — archived, no job emitted
}Escalation Matrix
2 failure modes, both handled
Trigger: AI scoring confidence < 0.70 across any dimension
Action: Lead is still routed normally. Audit log entry with escalation: "ESC-QUL-001" is written so sales ops can review low-confidence scores manually.
Trigger: Anthropic API fails or returns malformed JSON
Action: Lead status reset to PENDING. Job throws — BullMQ retries up to 4 times with exponential backoff. Audit log records the error.
What Happens Next
Qualification completes → Scheduling starts
HOT leads immediately receive a scheduling.book job on the bot-scheduling queue. The Scheduling Bot (B3) takes over: checks Google Calendar free/busy, drafts a meeting proposal, and locks the slot.
See it live
Submit a lead — watch it get scored
Submit the capture form. Within seconds the Qualification Bot scores it and the dashboard shows the per-dimension BANT breakdown.