Mission Gap: AI-Powered Deal Pipeline & Lead Scoring
Mission Gap: AI-Powered Deal Pipeline & Lead Scoring
Status: Not Implemented
This page documents a critical gap identified in v1.0.42. The Deal Pipeline & Lead Scoring feature does not currently exist in the platform despite being marked as implemented in the feature manifest.
What This Feature Is Supposed To Do
The AI-Powered Deal Pipeline & Lead Scoring system is a planned core component of the platform's Sales & Revenue section. When implemented, it will provide:
- A structured deal pipeline with configurable stages (e.g. Prospect → Qualified → Proposal → Closed)
- A lead records table tracking prospects and their attributes
- An AI lead scoring engine that ranks leads by conversion likelihood
- A sales pipeline UI for visualising deal progress and lead quality at a glance
- Integration with the existing CRM, billing, and customer health data
Current State
As of v1.0.42, none of the above exists in the codebase. The gap was identified through an automated audit of the feature manifest against the live codebase.
| Component | Expected | Actual |
|---|---|---|
| Deal pipeline schema | ✅ Required | ❌ Missing |
| Lead records table | ✅ Required | ❌ Missing |
| Lead scoring router | ✅ Required | ❌ Missing |
| Sales pipeline UI | ✅ Required | ❌ Missing |
Existing schemas (billing-schema.ts, crm-schema.ts, support-schema.ts) are unrelated to sales pipeline functionality — they handle customers, health scores, and support tickets respectively.
What Is Affected
- Sales & Revenue dashboard — deal and lead data will not appear
- Revenue projections — any model relying on pipeline stage data will be incomplete
- Automated lead routing — no routing rules can execute without a lead records layer
- AI scoring workflows — lead scoring automations are non-functional
Planned Resolution
This feature has been re-queued as a critical priority in the development pipeline. The implementation plan includes:
1. Database Schema
dealstable — id, stage, value, customer_id, created_at, updated_atleadstable — id, source, score, status, metadata, created_atpipeline_stagestable — id, name, order, conversion_rate- Migrations and foreign key relationships to existing
customerstable
2. Lead Scoring Engine
- Scoring model integrating customer health, usage signals, and firmographic data
- API router exposing score retrieval and refresh endpoints
- Background job for periodic score recalculation via Inngest
3. Sales Pipeline UI
- Kanban-style deal board with drag-and-drop stage transitions
- Lead list view with sortable score column
- Deal detail page with activity timeline
- Scoring explanation panel (why a lead scored as it did)
4. CRM Integration
- Link leads and deals to existing customer records
- Surface lead score and deal stage in the customer health dashboard