Telecaller & Leads
Overview

Telecaller & Lead Management Module

The Telecaller module manages the complete lifecycle of sales leads — from ingestion through Facebook webhooks and manual entry, through AI-powered auto-calling, telecaller assignment, follow-up tracking, and manager review.

System Architecture

Key Business Rules

RuleDescription
4-Day Mobile CheckBefore assigning a new lead, the system checks if the same mobile number was handled in the past 4 days
Staff ReuseIf the same mobile was recently handled, the lead is reassigned to the same telecaller
Cross-Call AlertWhen logging a call, if another TC handled the same number within 5 days, an alert is raised
AI Auto-CallerFacebook leads can be routed through Millis AI for automated first-contact calling
Auto-CloseLeads older than a configured threshold are automatically closed by a Quartz scheduler
Follow-up WindowManagers review follow-ups where ReviewDateTime is within the next 4 hours

Lead Status Flow

Module Components

ComponentSource FilePurpose
ExternalLeadBOExternalLeadBO.csLead assignment with mobile dedup
FaceBookLeadProcessorFaceBookLeadProcessor.csFacebook webhook ingestion + AI routing
CallLogBOCallLogBO.csCall logging, rectification, cross-call alerts
FollowupBOFollowupBO.csFollow-up summary for managers
AIAutoCallerFactoryAIAutoCallerFactory.csReflection-based AI caller provider factory
MillisAIAutoCallerMillisAIAutoCaller.csMillis AI API integration
TeleLeaderManagerTeleLeaderManager.csTeleLeader to ManagedUsers lookup with 15-min cache
CallSourceBOCallSourceBO.csDID number to CallSource mapping
ReassignFollowupCallsBOReassignFollowupCallsBO.csOverdue follow-up reassignment
ExternalLeadsAutoCloseSchedulerExternalLeadsAutoCloseScheduler.csQuartz cron for auto-closing stale leads
WeeklyLeadHistorySchedulerWeeklyLeadHistoryScheduler.csTuesday 6AM weekly aggregation
PostPendingLeadsToAISchedulerPostPendingLeadsToAIScheduler.csEvery 30s AI lead posting

Configuration

SettingValueDescription
Mobile dedup window4 daysSame-number check before assignment
Cross-call window5 daysAlert if another TC handled same number
Follow-up review horizon4 hoursUpcoming follow-ups shown to managers
TeleLeader cache TTL15 minutesCache for leader-to-staff mapping
Auto-close scheduleEvery 5 min, 9AM–8PMQuartz cron for stale lead closure
Weekly historyTuesday 6:00 AMAggregation of lead stats by hierarchy
AI posting intervalEvery 30 secondsPending leads pushed to AI caller