eCommunications Industry | Day 2 - Topic 5

Real-Time Analytics

What is Real-Time Analytics?

Real-Time Analytics provides live data updates (seconds/minutes vs hours/days), enabling immediate decision-making.

Real-Time vs Batch

Aspect Batch Reporting Real-Time Analytics
Data Freshness Yesterday's data (24-hour lag) Live (< 1 minute lag)
Update Frequency Nightly (12 AM run) Continuous (every 30 seconds)
Use Case Monthly executive reports Call center queue monitoring
Performance Fast (reads from data warehouse) Slower (queries live database)

Real-Time Use Cases

Use Case 1: Call Center Queue Dashboard
  • Metric: # SRs Waiting in Queue
  • Update: Every 30 seconds (live count)
  • Display: Large wall monitor (visible to all agents)
  • Alert: Queue > 50 → Notification to supervisors (bring in backup agents)
  • Impact: Reduced wait time from 8 min to 3 min (better customer experience)
Use Case 2: Sales Activity Tracking
  • Metric: # Calls Made Today (team total)
  • Update: Every 2 minutes (as reps log calls)
  • Display: Dashboard widget (manager's screen)
  • Goal: 200 calls/day (team target)
  • Action: 2 PM check: Only 80 calls → Manager sends motivational message to team
Use Case 3: Promotional Campaign Monitoring
  • Campaign: "Black Friday Sale" (website + email + SMS)
  • Metrics: Orders per minute, revenue per hour, inventory remaining
  • Update: Every 1 minute (live stream)
  • Alert: Hot product inventory < 100 units → Notification to warehouse (restock immediately)
  • Result: Avoided stockouts, captured $2M in sales

Technical Architecture

Data Flow

  1. Event Trigger: User creates SR (or updates opportunity, logs call, etc.)
  2. Database Write: Siebel writes to S_SRV_REQ table
  3. Change Detection: Database trigger fires (detects new row)
  4. Message Queue: Pushes event to message queue (e.g., Kafka, Oracle AQ)
  5. Analytics Engine: Consumes message → Updates aggregated metrics (increment counter)
  6. Dashboard Update: WebSocket pushes update to browser (no page refresh)
  7. Display: Chart/KPI updates in real-time (user sees new count)

Technologies

  • Streaming Platform: Apache Kafka (handles 1M events/sec)
  • In-Memory Database: Redis (stores latest metrics for instant retrieval)
  • WebSocket: Pushes updates to browser (no polling, efficient)
  • Visualization: D3.js or Chart.js (animated chart updates)

Configuration Example

Step 1: Define Real-Time KPI

  • Name: "Open SRs - Live Count"
  • Metric: COUNT(Service Request) WHERE Status = 'Open'
  • Refresh Mode: Real-Time (vs Scheduled)
  • Data Source: Live Database (not data warehouse)

Step 2: Configure Dashboard Widget

  • Widget Type: KPI Tile (large number display)
  • Auto-Refresh: Enabled (30-second interval)
  • Animation: Number increments/decrements with smooth transition
  • Threshold Alert: Background turns red if > 100 open SRs

Step 3: Test

  1. Open dashboard in browser (shows current count: 87 open SRs)
  2. Create new SR in Siebel (in separate tab)
  3. Wait 30 seconds (or manually refresh)
  4. Dashboard updates to 88 (new SR counted)

Real-Time Visualizations

Live Trend Charts

Example: Orders per minute (last 60 minutes)

  • Display: Line chart with rolling 60-minute window
  • Update: Every minute, new data point added (oldest point drops off)
  • Insight: Spot sudden spike (8:45 AM: 500 orders/min vs usual 50) → Viral social media post → Marketing investigates

Animated Gauges

Example: SLA Compliance (current hour)

  • Display: Speedometer gauge (0-100%)
  • Update: Needle moves in real-time as SRs are resolved
  • Zones: Green (> 95%), Yellow (90-95%), Red (< 90%)
  • Action: Needle drops into yellow → Supervisor reassigns cases to faster agents

Heat Maps

Example: Agent Workload (live)

  • Display: Grid of agent names (color-coded by # open cases)
  • Colors: Green (0-5 cases), Yellow (6-10), Red (11+)
  • Update: Every 2 minutes (as agents work cases)
  • Action: 3 agents show red → Supervisor routes new cases to agents in green

Performance Considerations

Challenges

  • Database Load: 100 users refreshing dashboards every 30 seconds = 200 queries/min (strain on database)
  • Network Bandwidth: Streaming data to browsers (high data transfer)
  • Browser Performance: Updating 20 charts simultaneously (CPU intensive)

Optimizations

  • Caching Layer: Store aggregated metrics in Redis (read from cache, not database)
  • Throttling: Limit updates to 1 per 30 seconds (not 1 per second)
  • Lazy Loading: Load only visible widgets (if user scrolls, load more)
  • Server-Side Aggregation: Database pre-calculates totals (don't count rows in real-time)
  • WebSocket: Push updates from server (don't poll every 10 seconds - wasteful)

Alerts & Actions

Threshold Alerts

  • Trigger: Open SRs > 100 for 5 consecutive minutes
  • Action: Send SMS to on-call supervisor + Email to service director
  • Escalation: If > 150 for 10 minutes → Auto-page VP of Customer Service

Automated Actions

  • Trigger: Average response time > 4 hours (target: 2 hours)
  • Action: Auto-assign next 10 SRs to "Overflow Team" (specialists handle backlog)
  • Result: Response time drops to 2.5 hours within 1 hour

Best Practices

  • Use Sparingly: Real-time for critical metrics only (not all reports - expensive)
  • Appropriate Refresh: 30 seconds for call center, 15 minutes for sales pipeline (balance freshness vs performance)
  • Fallback: If real-time fails, show cached data + "Last updated: 5 min ago" message
  • Testing: Load test with 100 concurrent users (ensure system handles load)
  • Mobile Caution: Real-time drains battery (use longer refresh on mobile, 5 min vs 30 sec)
  • User Training: Explain what "real-time" means (30-sec refresh, not instant)