Skip to content
Back to portfolio
CRM Automation

CRM Lead Scoring System

AI-powered lead scoring using behavioral data, firmographics, and engagement patterns

2 months 4 technologies
Sales analytics dashboard on screen

Business Challenge

A sales company was treating all leads equally, and it was killing their sales efficiency. Their sales team spent the same amount of time on a Fortune 500 CTO who downloaded a pricing guide as they did on a college student who clicked a Facebook ad. The result: top prospects went cold while reps were busy chasing leads that would never buy.

The company had tried simple scoring rules in HubSpot — “if they visited the pricing page, add 10 points” — but these rules were too rigid and didn’t account for the nuance of real buying signals. They needed a scoring system that understood the difference between a curious browser and a serious buyer.

Solution

We built an AI-powered lead scoring system that analyzes dozens of signals to produce a predictive score. The system looks at behavioral data (page visits, email opens, content downloads), firmographic data (company size, industry, revenue), and engagement patterns (frequency, recency, depth of interaction) to predict the likelihood of conversion.

The scoring model is trained on the company’s historical CRM data — which leads converted, which didn’t, and what signals preceded each outcome. The system updates scores in real-time as new activity occurs, so a lead’s score reflects their current buying temperature, not a static snapshot. Sales reps see the score, the key signals driving it, and a recommended next action.

Technologies

The system is built in Python with scikit-learn for the scoring model, OpenAI for analyzing unstructured data like email replies and chat transcripts, the HubSpot API for data ingestion and score writeback, and PostgreSQL for the feature store and model training data.

The pipeline runs on a schedule: every 15 minutes, it pulls new activity data from HubSpot, computes features, runs the scoring model, and writes updated scores back to HubSpot. A model retraining pipeline runs weekly, incorporating the latest conversion outcomes to keep predictions accurate as the market and product evolve.

Results

Leads with high scores converted at a considerably higher rate than low-score leads, validating that the model identified real buying signals. The sales team shifted their focus to high-score leads and saw meaningful revenue growth in the first quarter, without any change in lead volume.

Time wasted on low-quality leads dropped significantly, as reps learned to trust the scores and deprioritize cold leads. The scoring system also revealed unexpected patterns — for example, leads from a specific industry with a specific company size were highly likely to convert, leading the company to adjust their targeting and ad spend. The system paid for itself in the first month.

Screenshots

Lead score dashboard Dashboard showing lead scores and key signals

Score distribution Distribution of lead scores across the pipeline

Architecture

The system has three layers. The data ingestion layer pulls activity, contact, and company data from HubSpot on a schedule and stores it in PostgreSQL. The feature engineering layer computes behavioral, firmographic, and engagement features, using OpenAI to extract signals from unstructured text.

The scoring layer applies a gradient-boosted model to produce a 0-100 score and identifies the top contributing features for explainability. Scores and explanations are written back to HubSpot as custom properties, visible to sales reps in their deal pipeline view. A monitoring dashboard tracks model performance, score distributions, and conversion rates by score band.

Technologies used

Python OpenAI HubSpot API PostgreSQL

Let's build something great together

Ready to automate your business processes and save hundreds of hours every month? Let's talk about your project.