Conversational Commerce
Full E-commerce capabilities within the chat interface – enabling catalog browsing, booking, and payments without leaving WhatsApp.
UC-BOT-005: Booking & Shopping
Purpose: Enable revenue generation without leaving the chat app.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | Intent "I want to book" / "Show me services" |
| Priority | P0 |
Use Case List (Structured)
P0 – Core Revenue Enablement (MVP MUST-HAVE)
| UC ID | Use Case | Description | Status |
|---|---|---|---|
| UC-BOT-010 | Catalog Browsing | WhatsApp native catalog, service listing, filters | 🟢 Ready |
| UC-BOT-011 | Cart Management | Multi-service cart, add/remove, price calc | 🟡 Planned |
| UC-BOT-012 | Slot Selection | Real-time slot fetch, day/time selection | 🟢 Ready |
| UC-BOT-013 | Slot Hold / Lock | 5-min temporary lock to avoid double booking | 🟢 Ready |
| UC-BOT-014 | Stylist Assignment | Preferred stylist, fallback suggestions | 🟡 Planned |
| UC-BOT-015 | In-Chat Payments | Razorpay/Stripe links, UPI support | 🟢 Ready |
| UC-BOT-016 | Booking Confirmation | WhatsApp confirmation + invoice | 🟡 Planned |
| UC-BOT-017 | Appointment Backend | Create/update booking, sync calendar | 🟡 Planned |
P1 – Drop-off Reduction & Flexibility (High ROI)
| UC ID | Use Case | Description | Status |
|---|---|---|---|
| UC-BOT-020 | Multi-Service Booking | Haircut + Beard, different stylists | 🟡 Planned |
| UC-BOT-021 | Reschedule / Cancel | Self-service reschedule via chat | 🟡 Planned |
| UC-BOT-022 | Fallback Flow | Auto-suggest alt dates/stylists on conflict | 🟡 Planned |
| UC-BOT-023 | Language Support | English + Hindi intent handling | 🟡 Planned |
P1.5 – Engagement & Retention (High Impact)
| UC ID | Use Case | Description | Status |
|---|---|---|---|
| UC-BOT-040 | Abandoned Booking Recovery | Auto follow-up on incomplete bookings with discount nudge | 🟡 Planned |
| UC-BOT-041 | Personalized Offers | Auto-suggest add-ons based on service history | 🟡 Planned |
| UC-BOT-042 | Dynamic Promotions Broadcast | Scheduled outreach for slow days/time slots | 🟡 Planned |
| UC-BOT-043 | Lead Capture & Qualification | Capture intent, ask preferences, nudge to checkout | 🟡 Planned |
| UC-BOT-044 | Delivery/Status Updates | Post-booking reminders and confirmation requests | 🟡 Planned |
P2 – Growth & Intelligence (Phase-2)
| UC ID | Use Case | Description | Status |
|---|---|---|---|
| UC-BOT-030 | Offers & Discounts | Targeted offers for frequent users | 🔵 Future |
| UC-BOT-031 | Customer Segmentation | LTV, visit frequency analysis | 🔵 Future |
| UC-BOT-032 | Analytics Dashboard | Drop-off, conversion, slot utilization | 🔵 Future |
| UC-BOT-033 | Web Booking Bridge | Optional web UI fallback | 🔵 Future |
Platform & Operations (Cross-Cutting)
| UC ID | Use Case | Description | Status |
|---|---|---|---|
| UC-BOT-050 | Conversation Analytics & Drop-off Tracking | Funnel tracking, drop-off analysis, repeat attempts | 🟡 Planned |
| UC-BOT-051 | Session State & Resume | Persist booking state, enable mid-flow recovery | 🟡 Planned |
| UC-BOT-052 | Business Rules Engine | Configurable rules for discounts, priority, capacity | 🟡 Planned |
| UC-BOT-053 | Agent & Workflow SLA Monitoring | Response times, failed bookings, retry tracking | 🟡 Planned |
| UC-BOT-054 | Consent, Audit & Compliance | Opt-in logs, payment trail, data retention | 🟢 P0 (Enterprise) |
Detailed Use Case Specifications
UC-BOT-010: Catalog Browsing
Purpose: Allow customers to explore services without leaving WhatsApp.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | "Show me services" / "What do you offer?" |
| Priority | P0 |
Capabilities:
- WhatsApp Catalog: Native list messages displaying Service Menu with images and prices
- Filters: "Show me Haircuts under ₹500" / "Men's services only"
- Search: Natural language search across catalog items
- Categories: Organized by Hair, Skin, Spa, Packages
Acceptance Criteria:
- [ ] Catalog syncs with main inventory every 10 mins
- [ ] List message displays max 10 items with "See More" pagination
- [ ] Each item shows: Name, Price, Duration, Image thumbnail
UC-BOT-011: Cart Management
Purpose: Enable multi-service selection before checkout.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | User adds first service to cart |
| Priority | P0 |
Capabilities:
- Add to Cart: "Add haircut" / Tap "Add" button
- View Cart: "Show my cart" → List of selected services
- Remove Item: "Remove beard trim" / Tap "Remove"
- Price Calculation: Running total with taxes displayed
- Clear Cart: "Start over" / "Clear cart"
Acceptance Criteria:
- [ ] Cart persists for 24 hours per session
- [ ] Max 5 services per booking
- [ ] Price updates in real-time on add/remove
UC-BOT-012: Slot Selection
Purpose: Let customers pick available appointment times.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | Cart confirmed / "Book for tomorrow" |
| Priority | P0 |
Capabilities:
- Day Selection: Interactive list → "Today", "Tomorrow", "Pick a date"
- Time Slots: Dynamic buttons showing available times (10:00 AM, 2:00 PM, etc.)
- Real-time Availability: Queries backend, latency < 2s
- Duration Awareness: Slots account for total service duration
Acceptance Criteria:
- [ ] Slots shown are real-time available (latency < 2s)
- [ ] Unavailable slots are not displayed
- [ ] Shows next 7 days of availability
UC-BOT-013: Slot Hold / Lock
Purpose: Prevent double-booking during checkout.
| Property | Value |
|---|---|
| Actor | System |
| Trigger | User selects a time slot |
| Priority | P0 |
Capabilities:
- Temporary Lock: 5-minute hold on selected slot
- Lock Release: Auto-release if payment not completed
- Conflict Prevention: Other users see slot as unavailable during hold
- Extend Option: "Need more time?" → Extend by 2 mins (once)
Acceptance Criteria:
- [ ] Slot locked within 500ms of selection
- [ ] Lock auto-expires after 5 minutes
- [ ] Concurrent booking attempts are blocked
UC-BOT-014: Stylist Assignment
Purpose: Match customers with preferred or available stylists.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | Slot selected |
| Priority | P0 |
Capabilities:
- Preference Check: "Do you have a preferred stylist?"
- Stylist List: Show available stylists for selected slot with ratings
- Auto-Assignment: Default to first available if no preference
- Fallback Suggestions: "Ray is unavailable. How about Sam (4.8/5)?"
Acceptance Criteria:
- [ ] Stylist availability synced with backend
- [ ] Customer history considered for repeat preferences
- [ ] Fallback offered within 2 suggestions
UC-BOT-015: In-Chat Payments
[!NOTE] Deferred to Phase 2. Payment gateway API access costs (Razorpay, UPI) to be provided by X-tics.
Purpose: Complete payment without leaving WhatsApp.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | Booking details confirmed |
| Priority | P0 (Deferred) |
Capabilities:
- Payment Link: Generates Razorpay pre-filled checkout link
- UPI Support: Direct UPI intent for Indian customers
- Card Payments: Secure card entry via Razorpay gateway
- Net Banking: Supported via Razorpay
- Wallets: Paytm, PhonePe, etc. via Razorpay
- Pay Later: Option to pay at venue (configurable)
Cost Dependency:
X-tics to provide API access and credentials for: - Razorpay integration - UPI payment configuration
Acceptance Criteria:
- [ ] Payment link generated in < 3 seconds
- [ ] Supports: UPI, Cards, Net Banking, Wallets
- [ ] Payment confirmation received within 30 seconds
UC-BOT-016: Booking Confirmation
Purpose: Provide instant confirmation and invoice.
| Property | Value |
|---|---|
| Actor | System |
| Trigger | Payment successful |
| Priority | P0 |
Capabilities:
- Confirmation Message: Rich message with booking details
- PDF Invoice: Auto-generated invoice sent as document
- Calendar Invite: .ics file for adding to calendar
- Reminder Setup: Confirm reminder preferences (1 hour before, etc.)
Message Content:
Booking Confirmed!
Date: Saturday, 30 Dec 2024
Time: 10:00 AM
Service: Haircut + Beard Trim
Stylist: Ray
Total: ₹750 (Paid)
Location: Cazo Salon, MG Road
[Add to Calendar] [View Invoice]
Acceptance Criteria:
- [ ] Confirmation sent within 5 seconds of payment
- [ ] Invoice PDF includes GST details
- [ ] Booking ID generated and displayed
UC-BOT-017: Appointment Backend
Purpose: Sync bookings with backend systems.
| Property | Value |
|---|---|
| Actor | System |
| Trigger | Booking confirmed |
| Priority | P0 |
Capabilities:
- Create Booking: POST to appointment API
- Update Booking: Handle reschedules, cancellations
- Calendar Sync: Google Calendar / Outlook integration
- Staff Notification: Alert assigned stylist via WhatsApp/SMS
Acceptance Criteria:
- [ ] Backend receives booking within 2 seconds
- [ ] Stylist calendar updated automatically
- [ ] Conflict detection prevents overlapping bookings
UC-BOT-020: Multi-Service Booking
Purpose: Book multiple services, potentially with different stylists.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | "Book haircut and facial" |
| Priority | P1 |
Capabilities:
- Service Stacking: Add multiple services to single booking
- Duration Calculation: Total time = Sum of all services
- Multi-Stylist: Different stylists for different services
- Sequential Scheduling: Services scheduled back-to-back
Example Flow:
User: "Book haircut with Ray and facial"
Bot: "Got it! Haircut (30 min) + Facial (45 min) = 1h 15m
Ray is available for haircut at 10 AM.
Facial with available esthetician at 10:30 AM.
Total: ₹1,200. Proceed?"
Acceptance Criteria:
- [ ] Supports up to 5 services per booking
- [ ] Handles different service providers per service
- [ ] Buffer time (5 min) added between services
UC-BOT-021: Reschedule / Cancel
Purpose: Self-service booking modifications via chat.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | "Reschedule my booking" / "Cancel appointment" |
| Priority | P1 |
Capabilities:
- View Bookings: "Show my appointments"
- Reschedule: "Move to 3 PM" → Show available alternatives
- Cancel: "Cancel booking" → Confirm with refund policy
- Policy Enforcement: No-show fees, cancellation windows
Cancellation Flow:
User: "Cancel my Saturday booking"
Bot: "Found: Haircut on Sat, 10 AM
Note: Cancellation within 24 hours: ₹100 fee applies.
[Confirm Cancel] [Keep Booking]"
Acceptance Criteria:
- [ ] Reschedule allowed up to 2 hours before appointment
- [ ] Cancellation policy displayed before confirmation
- [ ] Refund processed within 5-7 business days
UC-BOT-022: Fallback Flow
Purpose: Gracefully handle unavailability with alternatives.
| Property | Value |
|---|---|
| Actor | System |
| Trigger | Requested slot/stylist unavailable |
| Priority | P1 |
Capabilities:
- Alternative Dates: "Saturday is full. How about Sunday 11 AM?"
- Alternative Stylists: "Ray is booked. Sam is available (4.8/5)"
- Waitlist Option: "Join waitlist for Saturday 10 AM?"
- Callback Request: "We'll notify you if a slot opens"
Acceptance Criteria:
- [ ] Minimum 2 alternatives suggested
- [ ] Alternatives shown within 2 seconds
- [ ] Waitlist notifications sent within 5 minutes of opening
UC-BOT-023: Language Support
Purpose: Handle conversations in multiple languages.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | Message in non-English language |
| Priority | P1 |
Capabilities:
- Language Detection: Auto-detect Hindi/English
- Response Localization: Reply in detected language
- Intent Handling: NLP works across supported languages
- Language Switch: "Reply in Hindi" / "Switch to English"
Supported Languages (MVP):
- English (en)
- Hindi (hi)
Acceptance Criteria:
- [ ] Language detected with 95% accuracy
- [ ] All templates available in both languages
- [ ] Seamless mid-conversation language switching
UC-BOT-030: Offers & Discounts
Purpose: Drive repeat visits with personalized offers.
| Property | Value |
|---|---|
| Actor | System / Marketing |
| Trigger | Customer segment criteria met |
| Priority | P2 |
Capabilities:
- Auto-Apply Codes: "You have 10% off! Applied automatically"
- Birthday Offers: Special discount on birth month
- Loyalty Points: "You have 500 points = ₹50 off"
- Flash Sales: Time-limited offers broadcast
Acceptance Criteria:
- [ ] Offers applied before payment calculation
- [ ] Discount stacking rules enforced
- [ ] Offer expiry clearly communicated
UC-BOT-031: Customer Segmentation
Purpose: Classify customers for targeted engagement.
| Property | Value |
|---|---|
| Actor | System |
| Trigger | Transaction / Interaction data |
| Priority | P2 |
Segments:
| Segment | Criteria |
|---|---|
| VIP | LTV > ₹10,000 or 10+ visits |
| Regular | 3-9 visits in last 6 months |
| At-Risk | No visit in 60+ days |
| New | First booking |
Acceptance Criteria:
- [ ] Segmentation updated daily
- [ ] Segments trigger automated campaigns
- [ ] Dashboard shows segment distribution
UC-BOT-032: Analytics Dashboard
Purpose: Monitor bot performance and conversion funnel.
| Property | Value |
|---|---|
| Actor | Business Owner / Admin |
| Trigger | Dashboard access |
| Priority | P2 |
Metrics:
| Metric | Description |
|---|---|
| Conversation Volume | Messages per day/week |
| Booking Conversion | Started → Completed % |
| Drop-off Points | Where users abandon |
| Slot Utilization | Booked vs Available slots |
| Revenue via Bot | GMV through WhatsApp |
Acceptance Criteria:
- [ ] Real-time dashboard updates
- [ ] Export to CSV/PDF supported
- [ ] Date range filtering available
UC-BOT-033: Web Booking Bridge
Purpose: Fallback to web UI for complex scenarios.
| Property | Value |
|---|---|
| Actor | Customer |
| Trigger | "Open full booking page" / Complex request |
| Priority | P2 |
Capabilities:
- Seamless Handoff: Link pre-fills customer details
- Session Continuity: Cart transferred to web
- Return to Chat: "Booking complete! Back to WhatsApp?"
- Complex Flows: Group bookings, package customization
Acceptance Criteria:
- [ ] Web link includes session token
- [ ] Cart state preserved across channels
- [ ] Booking confirmation sent to WhatsApp regardless
UC-BOT-040: Abandoned Booking Recovery
Purpose: Re-engage users who started but didn't complete bookings.
| Property | Value |
|---|---|
| Actor | System (Automated) |
| Trigger | Slot selected but payment not completed within 30 mins |
| Priority | P1.5 |
Capabilities:
- Smart Timing: First reminder after 30 mins, second after 4 hours
- Friendly Nudge: "Still thinking about that haircut?"
- Incentive Offer: 5-10% discount on abandoned booking
- One-Click Resume: Pre-filled cart with saved preferences
- Suppression Logic: No reminder if user booked elsewhere
Message Template:
Hey! You were about to book:
Service: Haircut with Ray
Time: Saturday, 10 AM
Still interested? Here's 10% off to complete your booking!
[Complete Booking - ₹450] [Not Now]
Acceptance Criteria:
- [ ] First reminder sent 30 mins after abandonment
- [ ] Max 2 reminders per abandoned session
- [ ] Discount code auto-generated and single-use
- [ ] Conversion rate tracked in analytics
UC-BOT-041: Personalized Offers Based on History
Purpose: Increase average order value with relevant add-on suggestions.
| Property | Value |
|---|---|
| Actor | System |
| Trigger | User adds service to cart / During checkout |
| Priority | P1.5 |
Capabilities:
- History Analysis: Review past 5 bookings for patterns
- Smart Suggestions: "Last time you added Beard Trim. Add it again?"
- Complementary Services: Haircut → Suggest Hair Wash, Styling
- Seasonal Offers: "Summer special: Add scalp treatment for ₹199"
- Frequency-Based: "It's been 45 days since your last facial"
Example Flow:
User: "Book a haircut"
Bot: "Added Haircut (₹400)
Note: Based on your history:
• Beard Trim (+₹150) - you get this 80% of the time
• Hair Wash (+₹100) - complements your haircut
[Add Beard Trim] [Add Hair Wash] [Proceed]"
Acceptance Criteria:
- [ ] Suggestions based on last 5 bookings
- [ ] Max 2 suggestions shown to avoid overwhelm
- [ ] Add-on conversion rate tracked
- [ ] Suppression if user declined same add-on 3x
UC-BOT-042: Dynamic Promotions Broadcast
Purpose: Fill slow slots with targeted promotional outreach.
| Property | Value |
|---|---|
| Actor | System / Marketing |
| Trigger | Scheduled campaign / Slot utilization < 50% |
| Priority | P1.5 |
Capabilities:
- Slot Analysis: Identify under-booked time slots
- Segment Targeting: Active customers, at-risk, new users
- Scheduled Broadcast: "Tomorrow's lunch slots: 20% off!"
- Flash Sales: 2-hour window promotions
- Opt-out Handling: "Reply STOP to unsubscribe"
Campaign Types:
| Campaign | Trigger | Discount |
|---|---|---|
| Slow Day Fill | < 50% booked for tomorrow | 15-20% |
| Last Minute | < 3 hours to slot, still open | 25% |
| Weekly Special | Every Monday morning | 10% |
| Seasonal | Festivals, holidays | Custom |
Message Template:
Flash Sale Alert!
Tomorrow's lunch appointments (12-3 PM) are 20% OFF!
Haircut: ₹400 → ₹320
Beard Trim: ₹150 → ₹120
Limited slots available!
[Book Now] [Remind Me Later]
Acceptance Criteria:
- [ ] Broadcasts sent between 9 AM - 8 PM only
- [ ] User can opt-out; preference respected
- [ ] Max 2 promotional messages per week per user
- [ ] UTM tracking for campaign ROI
UC-BOT-043: Lead Capture & Qualification
Purpose: Convert casual inquiries into qualified booking leads.
| Property | Value |
|---|---|
| Actor | Customer (New/Returning) |
| Trigger | First message / "Hi" / Ambiguous intent |
| Priority | P1.5 |
Capabilities:
- Intent Capture: "Are you looking to book, ask a question, or browse?"
- Preference Collection: Service type, preferred day, budget range
- Progressive Profiling: Collect info over multiple interactions
- Lead Scoring: Hot (ready to book) / Warm (considering) / Cold (browsing)
- Nudge to Checkout: "Based on your preferences, I found 3 perfect slots!"
Qualification Flow:
User: "Hi"
Bot: "Hey! Welcome to Cazo Salon!
What brings you here today?
[Book Appointment] [View Services] [Ask a Question]"
User: Taps "Book Appointment"
Bot: "Great! What service are you interested in?
[Haircut] [Facial] [Spa] [See All]"
User: Taps "Haircut"
Bot: "Perfect! When works best for you?
[Today] [Tomorrow] [This Weekend] [Other]"
Lead Data Captured:
| Field | Source |
|---|---|
| Phone Number | WhatsApp auto |
| Service Interest | Button selection |
| Preferred Timing | Button selection |
| Budget Sensitivity | If asks about prices first |
| Lead Score | Engagement depth |
Acceptance Criteria:
- [ ] 3-step qualification flow max
- [ ] Lead data stored in CRM
- [ ] Hot leads get immediate slot suggestions
- [ ] Warm leads get follow-up after 24 hours
UC-BOT-044: Delivery/Status Updates
Purpose: Keep customers informed and reduce no-shows.
| Property | Value |
|---|---|
| Actor | System (Automated) |
| Trigger | Booking confirmed / Time-based triggers |
| Priority | P1.5 |
Notification Schedule:
| Timing | Message Type | Action Required |
|---|---|---|
| Immediately | Booking Confirmation | None |
| 24 hours before | Reminder | Confirm/Reschedule |
| 1 hour before | Final Reminder | Get directions |
| 15 mins after slot | No-show check | Mark attended/missed |
| 1 hour after | Feedback request | Rate experience |
Message Templates:
24-Hour Reminder:
Reminder: Your appointment is tomorrow!
Service: Haircut + Beard Trim
Time: 10:00 AM
Stylist: Ray
Location: Cazo Salon, MG Road
Reply YES to confirm or CHANGE to reschedule.
[YES] [CHANGE] [Cancel]
1-Hour Reminder:
See you in 1 hour!
Service: Haircut + Beard Trim @ 10:00 AM
Location: Cazo Salon, MG Road
[Get Directions] [Running Late?]
Feedback Request:
Thanks for visiting Cazo Salon!
How was your experience with Ray today?
[5/5 Loved it!]
[3/5 It was okay]
[1/5 Could be better]
Acceptance Criteria:
- [ ] 24-hour reminder sent automatically
- [ ] "YES" response updates booking status
- [ ] No-show marked if no check-in after 15 mins
- [ ] Feedback collected within 2 hours of appointment
- [ ] Negative feedback triggers manager alert
Main Success Scenario (End-to-End)
sequenceDiagram
participant C as Customer
participant B as WhatsApp Bot
participant S as Backend System
participant P as Payment Gateway
C->>B: "Book a haircut for Saturday"
B->>S: Fetch available slots
S-->>B: [10 AM, 2 PM, 4 PM]
B-->>C: "Available: 10 AM, 2 PM, 4 PM"
C->>B: Taps "10 AM"
B->>S: Hold slot (5 min lock)
S-->>B: Slot locked ✓
B-->>C: "Confirm with Stylist Ray? ₹500"
C->>B: Taps "Pay Now"
B->>P: Generate payment link
P-->>B: Payment URL
B-->>C: [Pay ₹500 - Razorpay]
C->>P: Completes payment
P-->>B: Payment success webhook
B->>S: Create booking
S-->>B: Booking ID: #12345
B-->>C: "✅ Confirmed! Booking #12345"
Platform & Operations Specifications
UC-BOT-050: Conversation Analytics & Drop-off Tracking
Purpose: Understand why users don't complete bookings.
| Property | Value |
|---|---|
| Actor | System / Business Analyst |
| Trigger | Continuous event logging |
| Priority | P1 |
Funnel Stages Tracked:
flowchart LR
A[Start Chat] --> B[Catalog View]
B --> C[Service Selected]
C --> D[Slot Selected]
D --> E[Payment Initiated]
E --> F[Booking Confirmed]
B -.-> X1[Drop: No Interest]
C -.-> X2[Drop: Price Concern]
D -.-> X3[Drop: No Suitable Slot]
E -.-> X4[Drop: Payment Failed]
Metrics Captured:
| Metric | Description |
|---|---|
| Drop-off Point | Exact step where user abandoned |
| Time Spent | Duration at each funnel stage |
| Repeat Attempts | User tried same step multiple times |
| Session Duration | Total conversation time |
| Intent Clarity | Was user intent understood correctly? |
Dashboard Views:
- Funnel Visualization: Conversion rates at each step
- Drop-off Heatmap: By time of day, day of week
- Cohort Analysis: New vs returning users
- Bottleneck Alerts: Auto-flag if step drops >20%
Acceptance Criteria:
- [ ] Events logged for each funnel stage transition
- [ ] Drop-off report generated daily
- [ ] Real-time funnel visible in dashboard
- [ ] Alerting when conversion drops below threshold
UC-BOT-051: Session State & Resume
Purpose: Persist conversation state for seamless recovery.
| Property | Value |
|---|---|
| Actor | System |
| Trigger | User leaves mid-conversation |
| Priority | P0.5 |
State Persisted:
| Data | TTL | Purpose |
|---|---|---|
| Cart Contents | 24 hours | Resume service selection |
| Selected Slot | 5 minutes | Slot lock period |
| Stylist Preference | 7 days | Remember preference |
| Conversation Context | 30 minutes | Resume from last message |
| Payment Attempt | 1 hour | Retry failed payment |
Recovery Scenarios:
| Scenario | Trigger | Bot Action |
|---|---|---|
| Mid-cart abandon | User returns within 24h | "Welcome back! You had Haircut in cart." |
| Slot expired | Lock timed out | "Your 10 AM slot expired. Here are new options." |
| Payment failed | User returns | "Want to retry payment for your booking?" |
| Session timeout | 30+ min inactive | "Let's start fresh. What can I help with?" |
Technical Implementation:
- Storage: Redis (TTL-based expiry) or Database
- Session Key: WhatsApp phone number + timestamp
- State Machine: Tracks current flow position
Acceptance Criteria:
- [ ] State persisted within 500ms of each action
- [ ] Graceful recovery message on return
- [ ] Expired states cleaned up automatically
- [ ] State recovery success rate >95%
UC-BOT-052: Business Rules Engine
Purpose: Enable smart behavior without ML complexity.
| Property | Value |
|---|---|
| Actor | Business Admin |
| Trigger | Rule conditions met during conversation |
| Priority | P1 |
Rule Categories:
| Category | Example Rules |
|---|---|
| Pricing | Slow day → 15% auto-discount |
| Capacity | High demand → No coupons allowed |
| Priority | VIP customer → Show premium slots first |
| Availability | Stylist on leave → Auto-reassign |
| Promotions | First booking → 10% welcome discount |
Rule Definition Format:
rule: slow_day_discount
condition:
- slot_utilization < 50%
- day_type: weekday
- time_range: 11:00-15:00
action:
- apply_discount: 15%
- message: "Lunch special! 15% off today."
priority: medium
active: true
Rule Examples:
| Rule Name | Condition | Action |
|---|---|---|
| Slow Day Discount | Utilization < 50% | Auto-apply 15% off |
| VIP Priority | Customer LTV > ₹10,000 | Show premium slots first |
| New User Welcome | First booking | 10% discount + free add-on |
| High Demand Block | Utilization > 90% | Disable discount codes |
| Stylist Preference | Repeat customer | Pre-select last stylist |
Admin Interface:
- Create/edit rules via web dashboard
- Enable/disable rules with toggle
- Set rule priority for conflict resolution
- View rule execution logs
Acceptance Criteria:
- [ ] Rules evaluated in < 100ms
- [ ] Admin can create rules without code changes
- [ ] Rule conflicts resolved by priority
- [ ] Audit log of all rule executions
UC-BOT-053: Agent & Workflow SLA Monitoring
Purpose: Ensure operational reliability and enterprise readiness.
| Property | Value |
|---|---|
| Actor | Operations Manager |
| Trigger | Continuous monitoring |
| Priority | P1 |
SLA Metrics Tracked:
| Metric | Target | Alert Threshold |
|---|---|---|
| First Response Time | < 5 seconds | > 10 seconds |
| Booking Completion Rate | > 80% | < 60% |
| Payment Success Rate | > 95% | < 85% |
| Bot Uptime | 99.9% | < 99% |
| Unanswered Chats | 0 | > 5 in queue |
Monitored Events:
- Unanswered Chats: Messages without bot response
- Failed Bookings: Backend API errors
- Payment Retries: Multiple payment attempts
- Escalations: Requests for human agent
- Error Rates: NLP failures, API timeouts
Alerting Channels:
| Severity | Channel | Response Time |
|---|---|---|
| Critical | SMS + Slack | Immediate |
| High | Slack + Email | 15 minutes |
| Medium | 1 hour | |
| Low | Dashboard only | Next business day |
Dashboard Components:
- Real-time health status
- SLA compliance trend (7-day, 30-day)
- Incident timeline
- Performance degradation alerts
Acceptance Criteria:
- [ ] Metrics updated every 30 seconds
- [ ] Critical alerts delivered within 1 minute
- [ ] Historical data retained for 90 days
- [ ] SLA reports exportable (PDF/CSV)
UC-BOT-054: Consent, Audit & Compliance
Purpose: Enable safe scaling for enterprise and regulated industries.
| Property | Value |
|---|---|
| Actor | Compliance Officer / System |
| Trigger | User actions, system events |
| Priority | P0 (Enterprise) |
Compliance Components:
| Component | Description |
|---|---|
| Broadcast Opt-in | Explicit consent before marketing messages |
| Payment Trail | Complete transaction audit log |
| Conversation Audit | Immutable chat history with timestamps |
| Data Retention | Configurable retention policies |
| Right to Delete | GDPR/DPDP compliant data erasure |
Consent Management:
Bot: "Would you like to receive booking reminders
and special offers on WhatsApp?"
[Yes, Send Updates] [No, Thanks]
User: Taps "Yes, Send Updates"
Bot: "Great! You can change this anytime by
saying 'STOP' or 'Unsubscribe'."
Audit Log Schema:
| Field | Description |
|---|---|
| Timestamp | ISO 8601 format |
| User ID | Hashed phone number |
| Event Type | message, payment, booking, consent |
| Action | sent, received, confirmed, cancelled |
| Payload | Encrypted event data |
| IP/Device | For fraud detection |
Data Retention Policies:
| Data Type | Retention | Post-Retention |
|---|---|---|
| Chat Messages | 2 years | Archive/Delete |
| Payment Records | 7 years | Archive (legal) |
| Consent Logs | Indefinite | Never delete |
| Analytics | 1 year | Aggregate only |
Compliance Standards Supported:
- GDPR: EU data protection
- DPDP: India Digital Personal Data Protection
- PCI-DSS: Payment card security
- HIPAA: Healthcare (if applicable)
Acceptance Criteria:
- [ ] Consent recorded before any broadcast
- [ ] Audit logs immutable and tamper-proof
- [ ] Data deletion completes within 72 hours
- [ ] Compliance report generated on demand
- [ ] Encryption at rest and in transit
Related Use Cases
- Inventory Management: Stock check for product sales
- Appointment Management: Backend booking logic
- Customer Onboarding: First-time user registration
- NLP & Fallback: Intent handling and error recovery
Technical Dependencies
| Component | Technology | Purpose |
|---|---|---|
| WhatsApp Business API | Meta Cloud API | Message handling |
| Payment Gateway | Razorpay / Stripe | Payment processing |
| Booking Engine | Custom API | Slot management |
| NLP Engine | Dialogflow / Rasa | Intent recognition |
| Database | PostgreSQL | Booking records |