Legend
Purple: Entry Points (all customer touchpoints)
Red: Current State Pain Points (what's broken)
Orange: Decision Points & Routing Logic
Green: Future State Agents (the solution)
Blue: Systems & Databases
flowchart TD
%% Top Row - Entry Points (How Customers Contact Us)
WebChat["👥 Website Chat"]
SMS["📱 SMS Text Messages"]
Email["📧 help@ Email Inquiries"]
DirectCS["☎️ Direct Customer Service"]
NursingInq["🏥 Nursing/Medical Inquiries"]
%% Current State Pain Points (Clean Layout)
subgraph PainPoints["⚠️ CURRENT STATE PAIN POINTS"]
direction TB
ChatPains["💬 Website Chat Problems"]
SMSPains["📱 SMS Marketing Problems"]
EmailPains["📧 Email Support Problems"]
CSPains["👤 Customer Service Problems"]
end
%% Decision Row (Smart Routing Points)
PreChatDecision{"🤔 Pre-Chat Qualification"}
LeadQualified{"✅ SMS Lead Scoring"}
CSRoutingDecision{"🎯 Support vs Sales Routing"}
%% Agent Layer - Left to Right Flow (The New Smart Agents)
RetailAgent["🛍️ Retail Agent (RA)"]
PatientAgent["🏥 Patient Agent (PA)"]
RouteToSalesAgent["💼 Route-to-Sales Agent (SA)"]
CSTriageAgent["🎯 Customer Service Triage Agent"]
NursingAssistAgent["👩⚕️ Nursing Assistant Agent (NA)"]
SharedOrderLogic["⚙️ Shared Order Status System"]
%% Integration Layer
n8nWebhook["🔗 n8n Automation Platform"]
%% Systems Row - Bottom (The Backend Systems)
ZohoCRM["🗄️ Zoho CRM"]
Five9["📞 Five9 Auto-Dialer"]
MySQL["🗃️ MySQL Order Database"]
ZohoDesk["🎫 Zoho Desk Ticketing"]
ZohoBookings["📅 Zoho Bookings Scheduler"]
EventBus["📊 Event Bus (Compliance)"]
%% MAIN FLOW PATHS - Clean Left-to-Right, Top-to-Bottom
%% Website Chat Flow (Most Complex - New vs Returning Customers)
WebChat -->|"Customer starts chat"| PreChatDecision
PreChatDecision -->|"I am shopping for new product"| RetailAgent
PreChatDecision -->|"I am a patient, need order help"| PatientAgent
RetailAgent -->|"Creates qualified lead"| RouteToSalesAgent
PatientAgent -->|"Looks up order details"| SharedOrderLogic
%% SMS Marketing Flow (Lead Qualification Process)
SMS -->|"Marketing reply received"| LeadQualified
LeadQualified -->|"High interest, ready to buy"| RouteToSalesAgent
LeadQualified -->|"Low interest, just curious"| ZohoCRM
%% Email Support Flow (Direct Order Status)
Email -->|"Customer asks about order"| SharedOrderLogic
%% Direct Customer Service Flow (Human Escalation Path)
DirectCS -->|"Human agent receives inquiry"| CSTriageAgent
CSTriageAgent -->|"Agent categorizes the request"| CSRoutingDecision
CSRoutingDecision -->|"This is a sales question"| RouteToSalesAgent
CSRoutingDecision -->|"This is a support issue"| ZohoDesk
%% Medical/Nursing Flow (Healthcare Consultation)
NursingInq -->|"Patient needs medical advice"| NursingAssistAgent
NursingAssistAgent -->|"Schedules consultation"| ZohoBookings
%% Backend System Connections (How Data Flows)
RouteToSalesAgent -->|"Sends lead data via API"| n8nWebhook
n8nWebhook -->|"Adds to sales call queue"| Five9
RouteToSalesAgent -->|"Saves lead record"| ZohoCRM
SharedOrderLogic -->|"Queries order information"| MySQL
SharedOrderLogic -->|"Logs interaction for compliance"| EventBus
%% System Integrations (Automated Background Processes)
ZohoCRM -->|"Automated: Monitors for new leads"| RouteToSalesAgent
EventBus -->|"Creates support ticket if needed"| ZohoDesk
ZohoCRM -->|"Syncs customer data"| ZohoDesk
%% Styling
classDef painPoint fill:#ffebee,stroke:#c62828,stroke-width:2px
classDef futureState fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px
classDef system fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
classDef decision fill:#fff3e0,stroke:#ef6c00,stroke-width:2px
classDef entryPoint fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef integration fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px
%% Apply Styling
class ChatPains,SMSPains,EmailPains,CSPains painPoint
class RetailAgent,PatientAgent,CSTriageAgent,RouteToSalesAgent,SharedOrderLogic,NursingAssistAgent futureState
class ZohoCRM,Five9,MySQL,ZohoDesk,ZohoBookings,EventBus system
class PreChatDecision,LeadQualified,CSRoutingDecision decision
class WebChat,SMS,Email,DirectCS,NursingInq entryPoint
class n8nWebhook integration