LeadClassification (scoring_engine.py)

Sambhaash_AI · Backend/services/scoring/scoring_engine.py · python · Apache-2.0
database, Database / ORM, crm, ai, tag:scoring-engine

Main Scoring Engine - Orchestrates intent, engagement, and sentiment scores. Calculates composite lead score by combining: - Intent Score (33.3%): Interest, objections, timeline - Engagement Score (33.3%): Duration, questions, objections handled, response rate - Sentiment Score (

# Source: https://github.com/Rahul-8283/Sambhaash_AI | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""
Main Scoring Engine - Orchestrates intent, engagement, and sentiment scores.

Calculates composite lead score by combining:
- Intent Score (33.3%): Interest, objections, timeline
- Engagement Score (33.3%): Duration, questions, objections handled, response rate
- Sentiment Score (33.3%): Emotional tone, trajectory

Classifies leads into HOT/WARM/COLD based on composite score:
- HOT (≥0.75): High-quality leads ready for RM handoff
- WARM (0.50-0.74): Nurture candidates for WhatsApp messaging
- COLD (<0.50): Low-priority leads for future follow-up

Also triggers RM assignment if H

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key