Phase 4 — CRM & Customer Retention
Customer profiles, lead pipeline, segmentation, missed-call recovery, review requests, and lifetime value tracking — giving businesses a full picture of every customer.
What It Does
Every caller automatically gets a customer record created. The CRM shows full history: all calls, transcripts, appointments, and spend. Customers are automatically segmented (lead/active/inactive/VIP) and can be moved through a 5-stage sales pipeline. Missed calls are caught in a recovery queue so no lead is lost.
Key Routes
| URL | Description |
|---|---|
GET /customers | Customer list with segmentation filters |
GET /customers/create | Create customer manually |
GET /customers/{id} | Customer profile — calls, appointments, spend, notes |
PUT /customers/{id} | Update customer details |
DELETE /customers/{id} | Delete customer (owner only) |
POST /customers/{id}/move-stage | Move customer to a pipeline stage |
POST /customers/{id}/send-review-request | Send review request SMS |
GET /leads | Lead pipeline — 5-stage Kanban view |
GET /missed-calls | Missed-call recovery queue |
POST /missed-calls/{id}/send-sms | Send follow-up SMS from recovery queue |
POST /missed-calls/{id}/mark-handled | Mark missed call as handled |
Key Files
| Type | Path |
|---|---|
| Controller | app/Http/Controllers/CustomersController.php |
| Service | app/Services/CustomerService.php — syncStats(), VIP auto-promote |
| Model | app/Models/Customer.php |
| Table | customers — name, phone, email, segment, pipeline_stage, source, total_appointments, total_spent, last_visit_at, review_requested_at |
Customer Segments
| Segment | Criteria |
|---|---|
| lead | Called or messaged, never booked an appointment |
| active | Has booked at least one appointment in the last 6 months |
| inactive | No activity in 6+ months — auto-set by CustomerService::syncStats() |
| vip | 10+ total appointments — auto-promoted by CustomerService::syncStats() |
Lead Pipeline Stages
- New Lead
- Contacted
- Appointment Set
- Converted
- Lost
Customers are moved between stages via the pipeline Kanban view or from the customer profile. Stage changes fire the lead_stage_changed automation trigger.
What's Complete
- Customer profiles: index page with segment + source filters
- Customer show page: booking history, call transcripts, total spent, notes
- Customer CRUD: create, update, delete
- Lead Pipeline page with 5 stages and one-click stage movement
- Missed-call recovery queue with manual SMS send or mark handled
- Review request SMS (one-click, tracks
review_requested_at) - Revenue/LTV display:
total_spentshown on customer profile - Auto-promote to VIP at 10+ appointments (CustomerService::syncStats)
- Auto-mark inactive after 6 months no activity
What's Deferred
- Loyalty programs (points, tiers, rewards)
- Customer reactivation campaigns ("We miss you" automated flows)
- Automated upsells (post-appointment offers)
- Referral system (customer referral tracking + rewards)
- Feedback loops (post-visit satisfaction surveys)
- Churn prediction (ML/heuristic at-risk scoring)