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
| Rule | Description |
|---|---|
| 4-Day Mobile Check | Before assigning a new lead, the system checks if the same mobile number was handled in the past 4 days |
| Staff Reuse | If the same mobile was recently handled, the lead is reassigned to the same telecaller |
| Cross-Call Alert | When logging a call, if another TC handled the same number within 5 days, an alert is raised |
| AI Auto-Caller | Facebook leads can be routed through Millis AI for automated first-contact calling |
| Auto-Close | Leads older than a configured threshold are automatically closed by a Quartz scheduler |
| Follow-up Window | Managers review follow-ups where ReviewDateTime is within the next 4 hours |
Lead Status Flow
Module Components
| Component | Source File | Purpose |
|---|---|---|
| ExternalLeadBO | ExternalLeadBO.cs | Lead assignment with mobile dedup |
| FaceBookLeadProcessor | FaceBookLeadProcessor.cs | Facebook webhook ingestion + AI routing |
| CallLogBO | CallLogBO.cs | Call logging, rectification, cross-call alerts |
| FollowupBO | FollowupBO.cs | Follow-up summary for managers |
| AIAutoCallerFactory | AIAutoCallerFactory.cs | Reflection-based AI caller provider factory |
| MillisAIAutoCaller | MillisAIAutoCaller.cs | Millis AI API integration |
| TeleLeaderManager | TeleLeaderManager.cs | TeleLeader to ManagedUsers lookup with 15-min cache |
| CallSourceBO | CallSourceBO.cs | DID number to CallSource mapping |
| ReassignFollowupCallsBO | ReassignFollowupCallsBO.cs | Overdue follow-up reassignment |
| ExternalLeadsAutoCloseScheduler | ExternalLeadsAutoCloseScheduler.cs | Quartz cron for auto-closing stale leads |
| WeeklyLeadHistoryScheduler | WeeklyLeadHistoryScheduler.cs | Tuesday 6AM weekly aggregation |
| PostPendingLeadsToAIScheduler | PostPendingLeadsToAIScheduler.cs | Every 30s AI lead posting |
Configuration
| Setting | Value | Description |
|---|---|---|
| Mobile dedup window | 4 days | Same-number check before assignment |
| Cross-call window | 5 days | Alert if another TC handled same number |
| Follow-up review horizon | 4 hours | Upcoming follow-ups shown to managers |
| TeleLeader cache TTL | 15 minutes | Cache for leader-to-staff mapping |
| Auto-close schedule | Every 5 min, 9AM–8PM | Quartz cron for stale lead closure |
| Weekly history | Tuesday 6:00 AM | Aggregation of lead stats by hierarchy |
| AI posting interval | Every 30 seconds | Pending leads pushed to AI caller |