Sub topic 6
CRM: Scoring Leads and Opportunities
This chapter assumes you know what a CRM contact record, a lead, and an opportunity are. It also assumes you have a basic idea of supervised machine learning: a model learns from examples with known outcomes. You do not need to have trained a model yourself.
What scoring automates
A CRM holds more leads than a sales team can contact. Lead scoring ranks them so people spend time on the ones most likely to buy. Opportunity scoring does the same for open deals, estimating which ones are likely to close.
Scoring is a predictive feature (see the chapter on the four kinds of AI feature). It does not generate text or label content. It takes a record, looks at its attributes, and returns a number. That number is usually a probability between 0 and 1, or a rescaled version such as 0 to 100.
| Row | Lead score | Opportunity score |
|---|---|---|
| Object scored | A person or company that has not yet been qualified | An open deal with a stage, amount, and close date |
| Question answered | Will this lead become a customer? | Will this deal close as won? |
| Typical inputs | Demographics, firmographics, engagement | Stage, deal age, amount, contact activity, stakeholder count |
| Typical use | Routing and prioritizing follow-up | Pipeline review and forecasting |
Opportunity scores feed the forecasting features covered in a later chapter, so errors here carry forward.
Rule-based and predictive scoring
Most CRMs offer two approaches, and many teams use both.
Rule-based scoring assigns points by hand. For example: +20 for requesting a demo, +5 for each pricing-page visit, −10 for a free email domain. The team decides the weights. It is transparent and works with no history, but the weights are guesses and nobody updates them unless someone remembers to.
Predictive scoring learns the weights from past leads whose outcome is known. The platform trains a model on leads that became customers and leads that did not, then applies it to new leads. It adapts to your data, but it needs enough history and it is harder to explain.
The model behind predictive scoring
The common building blocks are logistic regression and gradient-boosted decision trees. Both are classifiers that output a probability. The example below uses logistic regression on three features.
import numpy as np
from sklearn.linear_model import LogisticRegression
# Columns: requested_demo, free_email_domain, pricing_page_views
X = np.array([
[1, 0, 3],
[0, 1, 0],
[1, 1, 5],
[0, 0, 1],
[1, 0, 4],
[0, 1, 0],
])
# 1 = lead became a customer, 0 = it did not
y = np.array([1, 0, 1, 0, 1, 0])
model = LogisticRegression().fit(X, y)
new_lead = np.array([[1, 0, 2]])
score = model.predict_proba(new_lead)[0, 1]
print(f"Conversion probability: {score:.2f}")The model learns one weight per column. predict_proba returns the probability of each class, and [0, 1] selects the probability of class 1, the lead converting. A real platform does the same thing with hundreds of features and many thousands of rows, and it retrains on a schedule.
Which data feeds the score
Scoring features fall into four groups.
- Fit (firmographic and demographic): company size, industry, job title, country. These describe whether the lead resembles your customers.
- Behavior (engagement): email opens and clicks, page views, demo requests, webinar attendance. These describe current interest.
- Source: campaign, referral, or channel the lead came from.
- Deal signals (opportunities): stage, days in stage, amount, number of contacts involved, and recent activity such as meetings or replies.
Fit changes slowly and behavior changes fast. Many platforms keep these as separate sub-scores so a team can see that a lead is a good match but cold, or a poor match but very active.
The quality of activity data matters here. If emails and meetings are not logged, an active deal looks dormant. The next chapter covers how platforms capture and clean this data.
Preparing training data
The label is the outcome you want to predict. Defining it takes decisions that affect everything downstream.
- Pick the outcome. "Became a customer" is a typical label. "Became a sales-qualified lead" is an easier label to collect but predicts a weaker outcome, and it bakes in whatever your qualifying reps already believed.
- Allow time to mature. A lead created last week has not had time to convert. Treating it as a negative teaches the model that recent leads are bad. Exclude leads younger than your typical sales cycle, or label them as unknown.
- Use only information available at scoring time. If a feature is recorded after the outcome, such as "contract sent", the model will score very well in testing and be useless in practice. This mistake is called data leakage.
- Check volume. Platforms often require a minimum number of won and lost records. A few dozen wins is rarely enough for a stable model.
Thresholds and routing
A score becomes useful when it triggers an action. Teams pick thresholds that map ranges to treatments, for example:
- 80 and above: route to a salesperson today.
- 40 to 79: enroll in a nurture sequence.
- Below 40: keep in the database, no outreach.
The right threshold depends on capacity and cost. A team that can call 50 leads a week should set the threshold so roughly 50 leads qualify, not at a fixed number such as 80. Raising the threshold gives you higher precision (a larger share of routed leads convert) and lower recall (more eventual customers are missed). Lowering it does the reverse.
Failure modes and edge cases
- Class imbalance. If 2% of leads convert, a model that predicts "no" for everyone is 98% accurate and worthless. Judge scoring by ranking quality, such as how many wins fall in the top 10% of scores, not by accuracy.
- Score is not calibrated. A "score of 70" might not mean 70% likely to convert. Some platforms output a rank-like number. Check by comparing score bands with actual conversion rates before treating the number as a probability.
- Feedback loops. If sales only contact high-scoring leads, only those leads can ever convert, so retraining confirms the model's own bias. Leaving a small random sample of low-scoring leads in outreach lets you measure whether the model is right.
- Drift. When you change your product, pricing, or ad channels, the old patterns stop holding. Scores degrade silently, so track performance over time and retrain.
- Proxy bias. Features like company domain, location, or job title can stand in for protected characteristics. A model can then systematically deprioritize groups of people without any rule saying so. Review which features drive scores.
- Cold start. A new business has no history. Use rule-based scoring first, or a vendor's pretrained model built on pooled data from other customers, and check that its assumptions fit your market.
- Opportunity scores that restate the stage. Late-stage deals close more often, so a model may mostly learn "later stage means higher score." That is true but adds nothing the pipeline view does not already show. Ask what the score adds beyond stage.
Explaining a score
Reps trust a number more when they see why it was assigned. Platforms usually show the top contributing factors, such as "requested a demo" or "visited pricing 4 times." With logistic regression these are read from the weights. With tree ensembles, platforms use attribution methods that estimate each feature's contribution for one record. Treat these explanations as hints about the model's behavior, not proof of cause. A pricing-page visit may raise the score without being the reason someone buys.
Checking that scoring works
Before relying on a score, compare it against a baseline. A simple baseline is the old rule-based score, or random ordering. Then test it on leads the model did not train on. A sound check is to sort held-out leads by score, split them into bands, and compare actual conversion in each band. A good model shows conversion falling steadily from the top band to the bottom. The final evaluation chapter covers baselines and holdout groups in more detail.
Exercise
Your CRM's predictive lead score shows 99% accuracy in testing, but sales say high-scoring leads do not convert more than average. Name two likely causes and one check for each.
Show answer
One likely cause is data leakage: a feature recorded after the outcome, such as "contract sent" or "opportunity created", was included in training. Check by listing the model's top features and asking whether each is known at the moment a lead is first scored. A second likely cause is class imbalance: if only a small share of leads convert, accuracy is high even for a model that predicts "no" every time. Check by comparing conversion rates across score bands on held-out leads, or by looking at precision and recall for the converting class instead of accuracy.
Exercise
A team can follow up on 40 leads per week, and the platform's default threshold routes 300 leads per week to sales. What should they do, and what trade-off do they accept?
Show answer
Raise the threshold, or route only the top 40 by score, so the volume matches capacity. They gain precision, because a larger share of the routed leads are likely to convert. They lose recall, because some leads who would have converted score below the cutoff and receive no personal follow-up. They can reduce that loss by sending lower-scoring leads to an automated nurture sequence.