← Back to case studies
Sales / RevOps9 weeksNov 2024 - Jan 2025

AI Lead Qualification for B2B Sales

Built a LangChain-powered lead-scoring agent that enriches inbound leads, scores fit and intent, and routes high-priority opportunities straight to AEs - cutting response time from 26 hours to under 2 minutes.

LangChainRAGSalesforceSlackRevOps
Have a similar problem? Book a scoping call →
ClientSeries B B2B software company
IndustrySales / RevOps
Engagement9 weeks
TimelineNov 2024 - Jan 2025
AI Lead Qualification for B2B Sales

A qualification pipeline that combines third-party enrichment, internal CRM history, and GPT-4o reasoning to score every inbound lead on fit and intent, then notifies the right AE in Slack within seconds.

01

The Challenge

This Series B B2B software company faced major sales inefficiencies because Sales Development Representatives (SDRs) triaged inbound leads on a first-in, first-out (FIFO) basis. Under this legacy setup, high-intent enterprise buyers sat in the queue for an average of 26 hours, while the SDR team spent valuable hours chasing low-fit, free-trial signups. This long lead response latency caused the company to lose valuable enterprise opportunities to faster competitors. Furthermore, SDRs wasted approximately 40% of their business day performing manual firmographic and technographic research on prospect organizations rather than engaging in high-yield outreach. The lack of standard, quantitative scoring criteria meant that every sales representative evaluated leads differently, creating massive data discrepancies within the Salesforce customer relationship management (CRM) database and leading to lost sales pipeline velocity.

Pain points we set out to solve

  • ×26-hour average response time on top-of-funnel leads
  • ×SDRs spent 40% of their day on lead research, not outreach
  • ×No consistent scoring - every SDR triaged differently
  • ×Enterprise leads and trial signups hit the same queue
02

Objectives

  • 01Cut average lead response time to under 5 minutes for qualified inbounds
  • 02Auto-enrich every lead with firmographics, tech stack, and news signals
  • 03Produce a defensible fit-and-intent score the sales team trusts
  • 04Route scored leads to the right AE in Slack with full context
03

Approach

How we delivered — phased, with clear checkpoints and evidence at each step.

  1. Week 1-2

    ICP and signal definition

    Workshopped the ideal-customer profile with Sales and Marketing. Mapped the firmographic, technographic, and behavioral signals that correlate with closed-won in the last 12 months of Salesforce data.

  2. Week 3-5

    Enrichment and scoring chain

    Built a LangChain pipeline that calls Clearbit, Apollo, and BuiltWith to enrich each inbound, then passes the enriched record to a GPT-4o scoring chain that returns fit, intent, and a one-paragraph rationale.

  3. Week 6-7

    Salesforce and Slack integration

    Wrote scores and rationales back to Salesforce as custom fields, and built a Slack bot that posts high-score leads to the right AE channel with a one-click Accept button that creates the Opportunity.

  4. Week 8-9

    Calibration and rollout

    Back-tested the scoring model on 9 months of historical leads to calibrate thresholds. Ran a 4-week parallel pilot where SDRs still triaged manually, then switched over once the AI matched or beat human scoring.

04

The Solution

The engineered solution is an automated lead enrichment and scoring pipeline built on the LangChain framework that qualifications and routes every inbound lead in under two minutes. The pipeline enrichment node automatically queries Clearbit, Apollo, and BuiltWith to compile comprehensive corporate profiles, including technographic data and technographical news signals. An advanced scoring chain powered by GPT-4o then runs a Retrieval-Augmented Generation (RAG) query over a vector store of the company's historical closed-won and closed-lost deal history in pgvector. This allows the system to generate a highly structured fit-and-intent score grounded in real sales precedents rather than arbitrary rules. Scored opportunities are written directly to Salesforce and pushed to a dedicated Slack channel using the Slack Bolt framework, enabling account executives to accept leads and create sales opportunities in one click.

Multi-source enrichment

Combines Clearbit firmographics, BuiltWith technographics, and recent news signals into a single lead record before scoring.

RAG-grounded scoring

Scoring prompt pulls similar closed-won and closed-lost deals from a vector store of prior CRM history, so each score is grounded in precedent.

Slack routing with AE match

High-score leads post to the right AE channel in Slack with context, rationale, and a one-click Accept that creates the Opportunity.

Self-tuning thresholds

A weekly job re-calibrates score thresholds based on the last 30 days of SDR feedback and deal outcomes.

05

Technology stack

Picked for latency, cost, and long-term maintainability — not for novelty.

AI / Agent

LangChainGPT-4otext-embedding-3-large

Enrichment

ClearbitApollo.ioBuiltWith

CRM / Messaging

SalesforceSlack Bolt

Infra

FastAPIPostgrespgvectorCelery
06

Results

~2 minAverage response time on qualified leads (from 26 hrs)
3.1xIncrease in SQL-to-opportunity conversion
+27%Lift in pipeline-sourced revenue per SDR
45%Reduction in SDR research time

Business impact

The sales team stopped triaging and started selling. Pipeline-sourced revenue per SDR climbed 27% in the first quarter, and the AI-first triage layer is now the default for all new lead sources the company onboards.

07

Key takeaways

  • Fit scoring fails when grounded in generic ICPs - RAG over your own closed-won data is what makes it defensible
  • Speed-to-lead is a bigger multiplier than prettier enrichment - optimize the end-to-end latency first
  • Keep a human accept step in the loop for the first quarter: it builds trust and generates the feedback data you need to tune thresholds

Ready to start something similar?

A 30-minute call, no pitch deck. If it's not a fit, I'll point you to someone it is.

Book a scoping call

Or email tayyabjaved0786@gmail.com