Lead Qualification System
AI reads, code decides, humans review
- 100%Of 40 test leads routed correctly, up from 88% on the first run, after tuning on those same leads
- 15sFrom a Hot lead arriving to a Slack brief and a Gmail draft
- 3 of 3Leads that tried to hijack the AI were all rejected
Portfolio project, realistic test data. See all results
Most small and mid-size businesses lose leads because they cannot respond fast or consistently enough. The obvious fix, asking an AI to score each lead, creates its own problems: an AI can miscount points, make up details like a budget nobody mentioned and be tricked by instructions typed into a form field. A system built that way is also hard to test, because you cannot tell whether a wrong score came from the rules or the AI.
What is needed is a system where the AI is allowed to read but not to decide, where every decision can be traced and tested and where unclear leads go to a person.
Lead Qualification System
What I Built
An eleven-step automation (each step is called a Zap) built around one shared record of every lead, kept in Airtable. Every lead, whether it comes from a web form, Facebook Lead Ads or LinkedIn, enters through the same single entry point in the same format and follows the same path:
Here’s a walkthrough of the system in action:
- Checks the lead before any AI is involved
Before anything else, it makes sure the lead is real, not spam and not a repeat. Every lead gets recorded, even the ones that get turned away.
- Saves first, then adds details
The lead is saved right away. The system then looks up extra details, like company size and industry, and leaves them blank instead of guessing when it can’t find anything.
- Lets the AI read, not decide
The AI never adds up points or chooses a route. It returns labels and supporting quotes, and fixed rules in code do the rest. An AI can miscount or ignore an instruction, while fixed rules apply the same rule every time.
- Lets fixed rules decide
The system double-checks the AI’s findings against the lead’s own words, then sorts the lead as Hot, Warm, Cold or Review.
- Routes to a person
Promising leads go to the next available rep, who gets a Slack alert, a ready-to-send reply and a 15-minute timer so nothing sits too long. Anything unclear waits for a person to review.
Lead Qualification System
Engineering Highlights
Select a heading to read the detail. Select it again to close it.
The AI only returns labels and quotes; the code does the math.
Every label must come with a quote from the lead’s own text. If the quote is not there, the label is thrown out and counted as unknown. Missing information lowers confidence, not the score: a senior lead at a target company with no stated budget stays Warm instead of dropping to Cold, and leads with too many gaps go to a review queue.
Text a lead types in is cleaned of code, checked for phrases that try to give the AI new orders (called prompt injection) and handed to the AI as plain information, never as instructions. Three test leads try to override the routing, including one that fakes the format the AI replies in.
Lead Qualification System
Results
This is a portfolio project on a fictional business: the results below are illustrative of how the system behaves on realistic test data, not measurements from live usage.
What each claim rests on
Each row matches a claim from What I Built or Engineering Highlights with the test behind it. Tested on 40 leads with known right answers, in two runs. Rows run from the strongest evidence to the weakest.
The AI reads; code decides
Leads were routed the way the answer key says 88% of the time in Run 1 and 100% in Run 2 across 40 leads. The share of leads marked Hot that truly were Hot rose from 63% to 100%.
Tested on 40 leadsEvery label needs a quote, and a blank isn’t a zero
The AI’s labels for budget, timeline, seniority and need were 82% to 100% correct in Run 1 and 97% to 100% in Run 2. Fig. 3 in Engineering Highlights shows a lead with too little information sent to a person instead of guessed at.
Tested on 40 leadsAnything typed into a form is treated as untrusted
All three test leads that tried to give the AI hidden orders were rejected in Run 2. In Run 1 one of them got through to scoring, so the entry check now rejects that kind of attempt.
Tested on 3 leadsHot leads reach a rep fast, with a timer
A Hot lead went from arriving to a Slack summary and a Gmail draft in about 15 seconds, and an overdue alert fired after about 15 minutes on leads nobody had touched.
Shown in one testThe system fails safely
Forcing an error with an invalid record ID posted an alert to Slack and marked the lead’s row as an error, with the failing step recorded (Fig. 5).
Shown in one testStuck leads are flagged every hour
This check was not exercised in testing.
Designed, not tested
Limits: Run 2 was scored on the same 40 leads used to tune the fixes. It shows the fixes work on known cases, not on unseen leads.
The numbers
| Measure | Run 1 | Run 2 |
|---|---|---|
| Routed the way the answer key says, all 40 leads | 88% | 100% |
| Routed correctly, leads that reach scoring | 88% | 100% |
| Entry-check decisions correct | 83% | 100% |
| Leads marked Hot that truly were Hot | 63% | 100% |
| Sent to a person for review | 18% | 16% |
| Trick leads rejected (3 test cases) | 2 of 3 | 3 of 3 |
| AI label correct: budget | 97% | 100% |
| AI label correct: timeline | 94% | 100% |
| AI label correct: seniority | 100% | 100% |
| AI label correct: need clarity | 82% | 97% |
What changed between runs: Run 1 had five misses. Three leads were wrongly marked Hot because the AI leaned on the timeline the lead entered to judge urgency, so I changed its instructions to judge need from the message alone. One lead that tried to give the AI hidden orders got through to scoring, so the entry check now rejects that kind of attempt. The scoring cut-offs did not change.
Failure test: I forced an error with an invalid record ID. The system posted an alert to Slack and marked the lead’s row as an error, with the step that failed recorded.
How this helps your business
What you get from a system like this.
Faster response
Hot leads reach a rep within seconds, with a Slack brief and a drafted reply ready (about 15 seconds in testing).
Fewer lost leads
Every lead is handled the same way, from any source (web form, Facebook, LinkedIn). An overdue alert fires after 15 minutes if nobody has touched a Hot lead.
Consistent, repeatable scoring
The same fixed rules apply to every lead, so results don’t drift or depend on who is reviewing.
No invented details
The AI’s labels must be backed by a quote from the lead’s own text, or they’re discarded.
Fairer treatment of incomplete leads
Missing information lowers confidence, not the score, so a promising lead isn’t dropped to Cold.
Human oversight
Reps approve the AI-drafted replies to Hot leads before they send, and unclear leads go to a review queue instead of being guessed at. Follow-ups to Warm leads send automatically.
Protection from bad input
Spam and duplicates are filtered out, free-email addresses go to a person for review and attempts to give the AI hidden orders are rejected, all before any AI is involved.
No lost leads when something breaks
The record is created first and errors alert the team in Slack. A check that flags stuck leads every hour is part of the design, but I haven’t tested it.
Let’s find what your process is letting slip.
Book a free 30-minute call. We’ll look at one process that’s costing you time, leads or money and where it breaks down today.