What a Lead Scoring System actually does
Predicts the probability that a given lead converts to closed-won by combining a per-tenant gradient-boosted classifier trained on historical CRM outcomes with LLM-powered feature extraction and plain-English score explanations.
The core of a production lead scoring system is not an LLM — it's a per-tenant LightGBM or XGBoost classifier trained on the tenant's own closed-won/closed-lost data. The LLM layer plays two narrower but important roles: GPT-5.4 nano extracts structured firmographic features (company size, industry, technology stack) from messy CRM notes and free-text fields; Claude Haiku 4.5 translates SHAP (Shapley) feature-importance values into a plain-English explanation per lead ('This lead scored 87/100 because it matches your top-revenue segment in FinTech, has a VP-level title, and has engaged with 3 email campaigns in the last 14 days'). Enrichment passthroughs from Clay ($0.07–0.15/lookup) and Apollo ($0.05/credit) add intent and firmographic signals the CRM doesn't capture natively.
The market gap this fills in 2026 is structural: HubSpot Predictive Lead Scoring is locked in Marketing Hub Enterprise at $3,600+/mo, Salesforce Einstein is bundled in Sales Cloud (no standalone), and the standalone predictive vendors (6sense ~$60K+/yr, MadKudu — custom quote) require enterprise minimums that no mid-market RevOps consultancy can resell profitably. A CRM-agnostic API that plugs into any CRM via webhook and prices at $799/mo per tenant covers a market with essentially zero white-label SaaS competition.
AI capabilities involved
Per-tenant gradient-boosted classification on closed-won/lost outcomes
Free-text CRM note extraction into structured firmographic features
Plain-English SHAP-value score explanation per lead
Embedding-based firmographic similarity search
Who uses this
- RevOps consultancies serving mid-market companies whose HubSpot or Salesforce plan doesn't include native predictive scoring
- Sales-ops agencies building a recurring advisory product around lead prioritisation and pipeline health
- B2B SaaS founders building a vertical CRM overlay product for a specific industry where generic CRM scoring underperforms
- Marketing technology consultancies who want to resell a data-science product without hiring data scientists
SaaS alternatives on the market
Real products you can sign up for today — with current 2026 pricing, honest pros and cons.
HubSpot Predictive Lead Scoring
HubSpot-native companies on Marketing Hub Enterprise with 500+ leads/mo and no interest in white-labelling
No — Marketing Hub Enterprise required
$3,600/mo (Marketing Hub Enterprise, annual)
Pros
- +Trains automatically on the tenant's own CRM data with no ML engineer required
- +Native HubSpot integration — scores appear in contact views and lists without any API setup
- +Bundled at no extra cost inside Marketing Hub Enterprise
- +Low maintenance once configured — model retrains automatically
Cons
- −Only available inside HubSpot — not white-labelable, not CRM-agnostic
- −The $3,600+/mo Marketing Hub Enterprise floor is unacceptable for mid-market resale
- −No SHAP or feature-importance explanations — sales reps can't understand why a score was given
- −Model quality degrades on small datasets — tenants with under 200 historical conversions get unreliable scores
Salesforce Einstein Lead Score
Salesforce-native enterprise sales teams with clean conversion history in Salesforce
No — Sales Cloud Einstein required
Bundled in Sales Cloud Einstein (custom quote, ~$50/user/mo add-on)
Pros
- +Deeply integrated with Salesforce CRM — zero data plumbing required
- +Automatic model retraining as new conversion data comes in
- +Einstein Activity Capture provides enriched intent signals
- +SOC 2 and GDPR compliant at the Salesforce platform level
Cons
- −Salesforce-only — not applicable to non-Salesforce CRMs
- −No standalone product, no white-label path
- −Score explanations are present but not SHAP-based — limited interpretability for sales coaching
- −Setup requires Salesforce admin expertise — significant onboarding cost per tenant
6sense Revenue AI
Enterprise B2B companies with large sales teams and complex buying-committee dynamics where account-level intent data justifies the $60K+ spend
No
~$60,000+/yr (enterprise quote only)
Pros
- +Intent data from 6sense's proprietary buyer-signal network — goes beyond CRM data
- +Account-level buying stage prediction, not just lead scoring
- +Pre-built integrations with Salesforce, HubSpot, Outreach, and major MAPs
- +Strong enterprise track record and analyst recognition
Cons
- −Enterprise-only floor at $60K+/yr — completely inaccessible for mid-market resale
- −No white-label or reseller programme
- −Intent data is 6sense-proprietary — not portable if you leave
- −Implementation takes 6–12 weeks even for enterprise clients
MadKudu
PLG-motion SaaS companies with product-usage telemetry and a RevOps team to own the integration
No
Custom quote only
Pros
- +Purpose-built for PLG (product-led growth) companies — scores product-qualified leads, not just MQLs
- +Strong data science team does model setup — lower ML expertise required from the client
- +Native Segment and Salesforce integrations
- +Customer case studies from B2B SaaS companies with measurable pipeline improvements
Cons
- −No public pricing or white-label path — all enterprise, all custom
- −Optimised for PLG companies — less effective for companies without product-usage signals
- −Proprietary model — no interpretability or SHAP access
- −Long implementation timeline
The AI stack
The production stack for per-tenant lead scoring is unusual in that the core model is not an LLM — it's a gradient-boosted classifier trained on each tenant's conversion history. LLMs play supporting roles: feature extraction from free text and score explanation. The most expensive part of the build is not the AI API cost but the per-tenant training pipeline infrastructure.
Core ML classifier (per tenant)
Predicts closed-won probability for each lead by learning patterns from the tenant's historical CRM outcomes
LightGBM (open source)
Free — compute cost only (~$0.05/training run on Railway or Modal)Primary classifier for all tenants — the industry standard for tabular classification problems
XGBoost (open source)
Free — compute cost onlyTenants who require a specific XGBoost model for internal compliance documentation
Our pick: LightGBM for all tenants. Train models in a Python FastAPI service on Modal.com (serverless GPU/CPU) — keep model artefacts in Supabase Storage versioned by tenant_id + training_date. Retrain weekly when new closed-won/lost events arrive.
Free-text feature extraction
Extracts structured fields (company size, industry, technology stack, decision-maker title) from messy CRM notes and unstructured contact fields
GPT-5.4 nano
$0.20/$1.25 per M tokensDefault feature extraction for all tenants
DeepSeek V4 Flash
$0.14/$0.28 per M tokensHigh-volume tenants with 10K+ leads/mo where per-lead cost matters
Our pick: GPT-5.4 nano as default — the cost difference vs DeepSeek is negligible at typical lead volumes, and schema reliability is higher.
Score explanation
Translates SHAP feature-importance values from the ML model into a plain-English explanation per lead for the salesperson
Claude Haiku 4.5
$1/$5 per M tokens; cache-hit $0.10/MDefault explanation layer with prompt caching enabled from day one
GPT-5.4 nano
$0.20/$1.25 per M tokensBudget-tier tenants where explanation depth is less critical
Our pick: Claude Haiku 4.5 with prompt caching on the explanation template. Cache-hit cost is $0.10/M — at 1,000 explanations/tenant/mo with ~1K tokens each, monthly cost per tenant is ~$0.10 in explanation COGS.
Firmographic embeddings
Powers 'looks-like-my-best-customers' similarity search across the tenant's historical closed-won accounts
voyage-3.5
$0.06/M tokensTenants where the 'lookalike ICP' feature is marketed as a differentiator
text-embedding-3-small
$0.02/M tokensStandard similarity indexing where cost matters more than precision
Our pick: voyage-3.5 for tenants with a complex ICP (e.g., FinTech CFOs at Series B companies with 50–200 employees); text-embedding-3-small for simpler ICPs.
Reference architecture
The platform has two distinct services: a Next.js multi-tenant dashboard (React frontend + Supabase) and a Python FastAPI scoring service (LightGBM training + inference + SHAP) running on Modal or Railway. The hardest engineering challenge is per-tenant model lifecycle management — training, versioning, and serving a separate LightGBM artefact per tenant without cross-contaminating training data. A CRM webhook receiver routes new lead and outcome events to the right tenant's training queue.
Tenant connects their CRM via webhook or API sync
Next.js webhook receiver + SupabaseThe platform provides a webhook URL that the tenant configures in HubSpot, Salesforce, or Pipedrive. New lead events and deal-closed events are received and stored in Supabase `leads` and `outcomes` tables, partitioned by tenant_id.
Free-text fields extracted into structured features
Supabase Edge Function → GPT-5.4 nanoOn each new lead event, GPT-5.4 nano extracts: company_size, industry, job_title_level (IC/Manager/VP/C-suite), technologies_mentioned, and intent_keywords from notes/description fields. Output stored as JSONB in leads.features.
Enrichment lookup (optional)
Edge Function → Clay or Apollo APIFor tenants on the enrichment tier, Clay ($0.07–0.15/lookup) or Apollo ($0.05/credit) supplements the CRM data with company funding stage, headcount, and technographic data. Enrichment cost is tracked per tenant for billing passthrough.
Weekly per-tenant model training
Python FastAPI on Modal (scheduled job)A weekly cron dispatches a training job per tenant with at least 50 outcomes. LightGBM trains on the tenant's features + labels (closed-won = 1, closed-lost = 0). Model artefact stored in Supabase Storage as tenant_id/model_YYYYMMDD.pkl. Requires minimum 50 historical outcomes to produce a model — tenants below this threshold get a rules-based fallback.
Score inference on new leads
Python FastAPI inference endpointOn each new lead, the scoring service loads the tenant's latest model artefact, runs inference, and returns: score (0–100), shap_values (dict of feature → contribution), and tier label (Hot/Warm/Cold). Stored in leads.score + leads.shap_json.
Plain-English explanation generated
Supabase Edge Function → Claude Haiku 4.5Haiku 4.5 receives the top 5 SHAP features and their values, and generates a 2–3 sentence explanation. Prompt caching on the shared explanation template reduces cost. Stored in leads.explanation.
Scores surfaced in CRM and dashboard
CRM webhook pushback + Next.js dashboardScore and explanation are written back to the CRM via API (HubSpot custom property, Salesforce custom field). The Next.js dashboard shows a prioritised lead list with score, explanation, and trend chart. Tenants can filter by tier and sort by score.
Estimated cost per request
~$0.001 per scored lead (LightGBM inference ~near-zero + Haiku 4.5 explanation ~$0.001 cached + GPT-5.4 nano feature extraction ~$0.0002). Enrichment passthrough $0.07–0.15/lead additional if enabled.
Cost calculator
Drag the sliders to model your actual usage. The numbers update in real time so you can stress-test economics before writing a single line of code.
Models a multi-tenant lead scoring API. Baseline assumes 500 new leads per tenant per month, weekly model retraining, and Haiku 4.5 score explanations with prompt caching.
Estimated monthly cost
$126
≈ $1,513 per year
Calculator notes
- At 10 tenants × 500 leads, total AI COGS is ~$7.25/mo — against $7,990/mo revenue at $799 ARPU, this is 99.9% gross margin on the AI line
- Enrichment passthrough (Clay/Apollo) is the real variable cost — at $0.10/lead × 500 leads × 10 tenants = $500/mo; pass this through to tenants as a per-lookup add-on charge
- Per-tenant LightGBM training costs $0.05/run on Modal serverless compute; weekly training for 10 tenants = $2/mo
- SOC 2 audit cost ($15K+) and compliance maintenance are not included — budget this separately before targeting mid-market sales-ops buyers
Build it yourself with vibe-coding tools
A weekend build can produce a rules-based scoring MVP that grades leads by job title, company size, and engagement signals — not a trained ML model, but enough to demonstrate the concept to a prospect and validate that they'll pay.
Time to MVP
1 weekend (rules-based) / 4–6 weeks (real ML)
Total cost to MVP
$25 Lovable Pro + $30 OpenAI API credits
You'll need
Starter prompt
Build a white-label AI lead scoring dashboard called [YOUR BRAND NAME]. Tech stack: Vite + React + TypeScript + Tailwind CSS + Supabase (Auth + PostgreSQL). IMPORTANT: This MVP uses rules-based scoring, not ML. A Python ML backend will be added later. Database schema: - tenants (id, name, scoring_rules JSONB, webhook_secret) - leads (id, tenant_id, name, company, title, email, features JSONB, score INT, tier TEXT, explanation TEXT, created_at) - outcomes (id, lead_id, tenant_id, result TEXT, closed_at) Core features: 1. CSV import: upload a leads CSV with columns (name, company, title, email, notes, company_size, industry). Parse into leads table. 2. Feature extraction: an Edge Function that calls GPT-5.4 nano with: 'Extract these fields from the lead data as JSON: { job_title_level: IC/Manager/VP/Director/C-suite, company_size_tier: small/mid/enterprise, industry_category, has_intent_keywords: boolean }. Input: {lead data}.' 3. Rules-based scoring: a Supabase function that scores leads by: job_title_level (C-suite=40, VP/Director=30, Manager=20, IC=10) + company_size_tier (enterprise=30, mid=20, small=10) + has_intent_keywords (20 if true). Returns 0–100. 4. Score explanation: Edge Function calls Claude Haiku 4.5 with the score and top contributing factors, returns a 2-sentence explanation. 5. Lead list: table showing name, company, title, score, tier badge (Hot >75 / Warm 50-75 / Cold <50), and explanation tooltip. 6. Outcome recording: a checkbox or dropdown per lead to mark as 'Won', 'Lost', or 'No decision'. Store in outcomes table for future ML training. Tenant onboarding: simple form to create a tenant with name and webhook secret. Each tenant sees only their own leads (RLS).
Paste this into Lovable
Follow-up prompts (run in order)
- 1
Replace the rules-based scoring with a real ML backend: set up a Python FastAPI service on Railway (not Modal for MVP simplicity) that loads a pre-trained LightGBM model from a pickle file. Add an Edge Function in Lovable that POSTs lead features to the Railway endpoint and receives a score + shap_values JSON. Display the top 3 SHAP contributors in the explanation.
- 2
Add CRM webhook receiver: create a Supabase Edge Function that receives HubSpot contact.created and deal.updated webhooks. Parse the webhook payload into the leads table, verify the webhook signature using the tenant's webhook_secret, and trigger the scoring pipeline automatically.
- 3
Add a training data export: a 'Download training CSV' button that exports all leads with recorded outcomes (won/lost) in a format ready for LightGBM training. Include engineered features and the outcome label column. This lets you run the first real ML training run offline before wiring up the full training pipeline.
- 4
Add tenant-level scoring rule customisation: a rules editor in the tenant admin panel where the agency can adjust the weight of each scoring factor (job_title_level, company_size_tier, industry, intent_keywords) per tenant. Store weights in tenants.scoring_rules JSONB.
- 5
Add enrichment integration: add an optional 'Enrich with Apollo' button per lead that calls the Apollo API, returns company headcount, funding stage, and technographics, and stores them in leads.features. Display enriched fields alongside CRM fields in the lead detail view.
Expected output
A working lead scoring dashboard that imports CRM data via CSV, extracts features with GPT-5.4 nano, applies rules-based scoring, and shows each lead with a score, tier badge, and Haiku 4.5 plain-English explanation — presentable to a paying prospect.
Known gotchas
- !Real predictive accuracy requires at least 200 historical closed-won/lost outcomes per tenant — the rules-based MVP will have poor accuracy on tenants with unusual ICPs. Be transparent with prospects that the ML model needs 3–6 months of historical data to outperform rules.
- !LightGBM and XGBoost cannot run in Vercel Edge Functions or Supabase Edge Functions — they require a Python runtime. Budget for a Railway or Modal Python service from the start, even for the MVP.
- !SHAP computation on large datasets adds latency — pre-compute SHAP values at inference time and cache them in the leads table rather than computing on demand per-request.
- !Cross-tenant data leakage is the most dangerous architectural failure in this product: a mistake in Supabase RLS policies could expose one tenant's training data to another. Test RLS policies exhaustively before onboarding real clients.
- !Class imbalance (typically 5–30% closed-won, 70–95% closed-lost) will cause a naive LightGBM model to predict 'lost' for everything. Use scale_pos_weight or SMOTE oversampling — handle this in the training pipeline, not in the scoring API.
- !GDPR Art. 22 compliance on automated decision-making: if the score is used to gate outreach (e.g., only leads above 75 get called), it may constitute automated decision-making on individuals. Ensure the explanation is always surfaced to the human salesperson and that the score is advisory, not determinative.
Compliance & risk reality check
Lead scoring on individual person-level CRM data touches GDPR automated decision-making rules and US employment-adjacent discrimination risks when firmographic proxies correlate with protected characteristics.
GDPR Article 22 — automated decision-making on individuals
If a lead score is used to gate outreach — e.g., only leads scoring above 75 receive a follow-up call — this may constitute automated decision-making with significant effects on the individual under GDPR Art. 22. The regulation requires: the right to explanation, the right to human review, and the right to object. Even in a B2B context, when individual contacts' data drives the scoring, Art. 22 applies to EU contacts.
Mitigation: Surface SHAP-based explanations to the salesperson for every scored lead. Design the UX so that scores are advisory inputs to a human decision, not automated gates. Include a 'Request manual review' button. Document the decision process in the tenant's privacy notice.
Model bias on demographic-correlated firmographics
Firmographic features (job title, company size, industry, geography) can correlate with protected characteristics (race, gender, national origin) in ways that produce discriminatory scoring outcomes. If a model trained on historical data reflects biased historical hiring patterns, it may perpetuate them. This is particularly relevant for HR-tech-adjacent use cases where the leads are individuals.
Mitigation: Audit model feature importance monthly for demographic proxies. Log all model decisions with tenant_id and timestamp. Exclude features that have high correlation with protected characteristics from the training pipeline. Provide tenants with a bias-audit report as part of the product.
Data Processing Agreement with each tenant
Processing individual-level CRM contact data on behalf of tenant companies constitutes data processing under GDPR. A DPA is required for each EU-based tenant and recommended for all tenants as a liability-limiting practice.
Mitigation: Include a standard DPA template in the tenant onboarding flow. Store EU-tenant data in Supabase's EU region. Implement data retention policies — delete lead records after the retention period agreed in the DPA (typically 24 months).
SOC 2 Type II for mid-market sales-ops buyers
Mid-market and enterprise sales-ops buyers (the primary target audience for a $799/mo lead scoring product) will require SOC 2 Type II certification before sharing CRM data with a third-party platform. Without it, the sales cycle will stall at security review for every deal over $5K ACV.
Mitigation: Begin SOC 2 Type II audit process within 6 months of launch using a vendor like Vanta or Drata ($5K–$15K/yr). Use hyperscaler infrastructure (Supabase on AWS, Vercel) which covers most infrastructure controls. Budget 6–12 months and $15K–$25K for the initial certification.
Build vs buy: the real math
10–16 weeks
Custom build time
$25,000–$45,000
One-time investment
6–12 months
Breakeven vs buying
At $799/mo per tenant and 12 tenants, monthly revenue is $9,588. Against $125/mo in infrastructure + AI COGS (at 10 tenants, 500 leads each), contribution margin per month is $9,463 — the $35K midpoint build cost pays back in under 4 months at that scale. The $25K–$45K band reflects the real cost driver: ML engineer time for the per-tenant training pipeline, not the LLM API costs. 6sense at $60K+/yr is structurally impossible to resell at a healthy margin — every mid-market RevOps agency that contacts 6sense and gets a $60K quote is a potential customer for a $800/mo alternative. As enrichment API costs (Clay, Apollo) continue to fall in 2026, the COGS per lead scored will decrease while the ARPU stays flat.
Skip the DIY — RapidDev builds the production version
A Lovable MVP gets you a demo. Production needs auth that doesn't leak data, AI calls that don't bankrupt you, observability when models drift, and code you can audit. That's what we ship.
Discovery call (free)
30 minWe map your exact Lead Scoring System use case: who uses it, target volume, AI model choice, integrations, compliance scope. You get a detailed scope document and fixed-price quote within 48 hours.
AI-accelerated build
10–16 weeksOur engineers use Claude Code, Lovable, and custom tooling to ship 3–5x faster than agencies. You see weekly progress in a staging environment — not a black box.
Launch + handoff
1 weekWe deploy to your infrastructure, transfer the GitHub repo, set up CI/CD and monitoring, and train your team. You own 100% of the source code, prompts, and model configurations.
What you get
Timeline
10–16 weeks
Investment
$25,000–$45,000
vs SaaS
ROI in 6–12 months
30-min call. Fixed-price quote within 48 hours. No commitment.
Frequently asked questions
How much does it cost to build a white-label AI lead scoring system?
RapidDev builds this at $25,000–$45,000 (10–16 weeks). The range reflects the scope of the ML training pipeline: the lower end covers a per-tenant LightGBM scoring API with Haiku 4.5 explanations and a Next.js dashboard. The upper end adds enrichment passthrough integrations (Clay, Apollo), SOC 2 compliance infrastructure, and Microsoft 365 / Salesforce deep-sync. Monthly infrastructure after launch is $400–$800 plus enrichment passthrough costs.
How long does it take to ship this?
10–16 weeks for a production system with per-tenant ML training. A rules-based MVP (no real ML) can be built in a weekend using Lovable — useful for demonstrating the concept to a prospect but not the finished product. The 10–16 week timeline is dominated by the Python training pipeline setup, CRM integration testing, and per-tenant model lifecycle management, not the frontend or LLM integrations.
Can RapidDev build this for my agency?
Yes. RapidDev has built production ML-in-the-loop applications including classification pipelines and multi-tenant SaaS platforms. A lead scoring system is one of the more complex builds in our portfolio — it requires both an ML engineer and a full-stack developer — which is why the build cost is at the upper end of our standard band. Start with a free 30-minute consultation at rapidevelopers.com to scope the CRM integrations and training-data requirements.
How many historical leads does a tenant need for the ML model to be useful?
A minimum of 200 historical outcomes (closed-won + closed-lost) per tenant is needed to train a reliable LightGBM model. Below that threshold, the model will overfit and produce unreliable scores. For new tenants below 200 outcomes, use the rules-based scoring fallback and set expectations clearly: 'The ML model activates after you record 200 wins and losses in our platform.' Most RevOps clients reach 200 outcomes within 3–6 months of connecting their CRM.
What is the difference between this and HubSpot Predictive Lead Scoring?
Three key differences: (1) CRM-agnosticism — this platform works with HubSpot, Salesforce, Pipedrive, or any CRM that fires webhooks; HubSpot Predictive only works inside HubSpot. (2) White-label — you resell this under your agency brand; HubSpot's scoring is locked inside HubSpot's UI. (3) Interpretability — SHAP-based plain-English explanations help sales reps understand and act on scores; HubSpot's model is a black box. The tradeoff: HubSpot's model is zero-setup if you're already on Marketing Hub Enterprise; this platform requires onboarding and a minimum outcome dataset.
Does lead scoring on individual contacts create GDPR compliance exposure?
Yes. If scores are used to gate outreach decisions on EU contacts (e.g., automatically excluding low-scoring contacts from follow-up), this may constitute automated decision-making under GDPR Article 22, which requires the right to explanation and human review. Design scores as advisory inputs to a human salesperson, always surface the SHAP explanation, and include a 'request manual review' option. DPAs with each EU tenant are also required. See the compliance section for full mitigation guidance.
Can enrichment (Clay, Apollo) be included in the platform?
Yes — enrichment is built as a passthrough layer that calls Clay ($0.07–0.15/lookup) or Apollo ($0.05/credit) on new leads and adds firmographic and intent signals to the feature set before scoring. The enrichment cost is tracked per tenant and can be passed through to tenants as a per-lookup charge or absorbed in the subscription. At $0.10/lead average and 500 leads/tenant/month, enrichment adds $50/tenant/mo in COGS — model this into your ARPU pricing.
Want the production version?
- Delivered in 10–16 weeks
- You own 100% of the code
- AI cost monitoring built in
30-min call. No commitment.