AI Churn Management

{{-- ── Overview KPI Cards ─────────────────────────────────── --}}
Overall Risk Score
@if($loading)
@else {{ $avgProbability }}% @endif
Stable vs last run
High Risk Predictions
@if($loading)
@else {{ $highRiskCount }} @endif
Actionable targets remaining
Primary Risk Factor
@if($loading)
@else {{ $primaryFactor }} @endif
Dominant ML factor
Model Accuracy
@if($loading)
@else {{ $modelAccuracy }}% @endif
Latest active validation
{{-- ── Model Registry Panel ────────────────────────────────── --}} @if(!$loading && !empty($modelStats))
AI Model Performance Registry
@foreach([ ['label' => 'Accuracy', 'val' => $modelStats['accuracy']], ['label' => 'Precision', 'val' => $modelStats['precision']], ['label' => 'Recall', 'val' => $modelStats['recall']], ['label' => 'F1 Score', 'val' => $modelStats['f1']], ['label' => 'AUC-ROC', 'val' => $modelStats['auc']], ['label' => 'Version', 'val' => $modelStats['version']], ] as $stat)
{{ $stat['label'] }}
{{ $stat['val'] }}
@endforeach
@foreach([ ['label' => 'Training Samples', 'val' => $modelStats['samples']], ['label' => 'Positive Cases', 'val' => $modelStats['positives']], ['label' => 'Negative Cases', 'val' => $modelStats['negatives']], ['label' => 'Feature Columns', 'val' => $modelStats['features']], ['label' => 'Last Trained', 'val' => $modelStats['trained_at']], ] as $stat)
{{ $stat['label'] }}
{{ $stat['val'] }}
@endforeach
@endif {{-- ── Panels Row ──────────────────────────────────────────── --}}
{{-- Distribution Panel --}}
Probability Distribution
High (>80%)
@if($loading)
@else
@endif
@if($loading)
@else {{ $probHigh }} @endif
Medium (50-80%)
@if($loading)
@else
@endif
@if($loading)
@else {{ $probMed }} @endif
Low (<50%)
@if($loading)
@else
@endif
@if($loading)
@else {{ $probLow }} @endif
{{-- System Status Panel --}}
AI Pipeline Metrics
Feature Store Integrity 99.8% OK
Last Inference Run {{ now()->subMinutes(12)->format('d M Y H:i A') }}
Next Scheduled Run {{ now()->addHours(23)->format('d M Y H:i A') }}
Model Engine Status ONLINE
Version Endpoint LightGBM v2.4
{{-- ── Subscription Expiry vs AI Risk ─────────────────────── --}}
Subscription Expiry vs. AI Risk
@foreach([ ['label' => 'Expires in < 7 Days', 'val' => $e7, 'hi' => $e7h, 'pct' => $e7p, 'clr' => '#ef4444'], ['label' => 'Expires in 7 - 30 Days', 'val' => $e30, 'hi' => $e30h, 'pct' => $e30p, 'clr' => '#f59e0b'], ['label' => 'Expires in 30 - 45 Days','val' => $e45, 'hi' => $e45h, 'pct' => $e45p, 'clr' => '#f59e0b'], ['label' => 'Expires > 45 Days', 'val' => $e90, 'hi' => $e90h, 'pct' => $e90p, 'clr' => '#10b981'], ] as $bucket)
{{ $bucket['label'] }}
@if($loading)
@else {{ $bucket['val'] }} @endif
@if($loading)
@else
@endif
@if($loading)
@else {{ $bucket['hi'] }} High Risk ({{ $bucket['pct'] }}%) @endif
@endforeach
{{-- ═══════════════════════════════════════════════════════════ --}} {{-- WIN-BACK INTELLIGENCE SECTION --}} {{-- ═══════════════════════════════════════════════════════════ --}}
Subscribers who have previously churned and may be re-engaged
{{-- Win-Back KPI Cards --}}
Total Expired
@if($loading)
@else {{ $totalExpired }} @endif
Historical subscription drop-offs
Win-Back Eligible
@if($loading)
@else {{ $winBackEligible }} @endif
Priority reactivation targets
Already Won Back
@if($loading)
@else {{ $alreadyWonBack }} @endif
Successfully reactivated
{{-- Win-Back Potential Panel --}}
AI Win-Back Score

Powered by your LightGBM model. Subscribers with a low churn score who still left are your easiest win-backs — they were loyal but left for situational reasons.

High (≤ 30% churn)
@if($loading)
@else
@endif
@if($loading)
@else {{ $wbScoreHigh }} @endif
Med (31–60% churn)
@if($loading)
@else
@endif
@if($loading)
@else {{ $wbScoreMed }} @endif
Low (> 60% churn)
@if($loading)
@else
@endif
@if($loading)
@else {{ $wbScoreLow }} @endif
{{-- Reactivation Window Panel --}}
Reactivation Window

Time since subscription expired. Subscribers churned within 30 days are your hottest win-back targets.

@foreach([ ['cls' => 'wb-urgent', 'badge' => '🔥 Urgent', 'label' => 'Churned < 30 Days', 'val' => $r30, 'sub' => 'Highest win-back rate'], ['cls' => 'wb-warm', 'badge' => '⚡ Warm', 'label' => '31 – 60 Days Ago', 'val' => $r60, 'sub' => 'Still receptive'], ['cls' => 'wb-cool', 'badge' => '💤 Cooling', 'label' => '61 – 90 Days Ago', 'val' => $r90, 'sub' => 'Needs strong offer'], ['cls' => 'wb-cold', 'badge' => '❄️ Cold', 'label' => '> 90 Days Ago', 'val' => $rOld, 'sub' => 'Lower priority'], ] as $win)
{{ $win['badge'] }}
{{ $win['label'] }}
@if($loading)
@else {{ $win['val'] }} @endif
{{ $win['sub'] }}
@endforeach
@push('styles') @endpush