Lead scoring, routing and lifecycle handoff
How a lead earns MQL, who gets it, and how fast they must act.
Sample data. Fictional companies. Nothing here is real.
Score inputs and weights
| Type | Signal | Points |
|---|---|---|
| Fit | Industry in ICP | 20 |
| Fit | Employees 200–2,000 | 15 |
| Fit | Buyer title (IT, security, compliance) | 15 |
| Intent | Pricing page visit (14 days) | 20 |
| Intent | Hiring or funding signal (30 days) | 15 |
| Intent | Replied or booked | 15 |
Maximum 100 points. MQL at 60 or more, which needs both fit and at least one intent signal.
Routing rules (checked top to bottom)
| # | Condition | Routes to | Note |
|---|---|---|---|
| 1 | Existing customer or open deal | Account owner | Never round-robin an owned account |
| 2 | Enterprise (1,000+ employees) | Enterprise AE pod | Direct to AE, SDR shadows |
| 3 | Territory: East / West by HQ state | Regional SDR team | Round-robin inside the team |
| 4 | No match | Overflow queue | Reviewed daily |
Handoff SLA: MQL to first SDR touch within 4 hours
2 of 5 sample leads breached the SLA.
| Lead | Score | MQL at | Owner | SLA |
|---|---|---|---|---|
| Priya L. · Bluepeak Health | 85 | Mon 09:00 | SDR West 1 | Touched in 1.5 h |
| Marcus O. · Copperline Fintech | 70 | Mon 11:00 | SDR East 2 | Breach: touched after 6 h |
| Elena F. · Quillstone Software | 65 | Mon 14:00 | SDR East 1 | Touched in 3 h |
| Jordan A. · Northwind Logistics | 90 | Tue 10:00 | Account owner | Breach: open 5 h, no touch |
| Dana W. · Harbor & Pine Legal | 60 | Tue 13:00 | Overflow queue | Open 2 h, within SLA |
Sample "now" is Tue 15:00. A breach would alert the SDR manager and, after a second window, re-route the lead.
Scoring SQL
Learning / reference-- Lead score = fit points + intent points (max 100). Learning example on sample tables.
WITH fit AS (
SELECT l.lead_id,
CASE WHEN a.industry IN ('Healthcare services', 'Payments', 'B2B SaaS') THEN 20 ELSE 0 END
+ CASE WHEN a.employees BETWEEN 200 AND 2000 THEN 15 ELSE 0 END
+ CASE WHEN l.title ~* '\m(it|security|ciso|compliance)\M' THEN 15 ELSE 0 END AS fit_pts
FROM leads l
JOIN accounts a ON a.account_id = l.account_id
),
intent AS (
SELECT lead_id,
MAX(CASE WHEN type = 'pricing_visit' AND days_ago <= 14 THEN 20 ELSE 0 END)
+ MAX(CASE WHEN type IN ('hiring', 'funding') AND days_ago <= 30 THEN 15 ELSE 0 END)
+ MAX(CASE WHEN type IN ('reply', 'meeting') THEN 15 ELSE 0 END) AS intent_pts
FROM lead_events
GROUP BY lead_id
)
SELECT f.lead_id,
f.fit_pts,
COALESCE(i.intent_pts, 0) AS intent_pts,
f.fit_pts + COALESCE(i.intent_pts, 0) AS score,
(f.fit_pts + COALESCE(i.intent_pts, 0)) >= 60 AS is_mql
FROM fit f
LEFT JOIN intent i ON i.lead_id = f.lead_id
ORDER BY score DESC;