Chapter 1 · AI Customer Support Platform Playbook
Elexa Build AI Customer Support Platform Chapter 01
By the Elexa AI Team
Free preview
This is one chapter of the AI Customer Support Platform playbook.
Get every chapter, the complete source code and lifetime updates.
See the full playbook →COMPLETE PRODUCT BUILD
Build an AI Customer Support Platform
Chapter 1 — Product Requirements & System Planning
Before writing code, we define exactly what we are building, who uses it, how AI participates, when humans take over, and what 'finished' means. This chapter becomes the product contract for the remaining nineteen chapters.
Figure 1.1 — Core journey from customer question to AI answer or human resolution.
◆ Chapter Deliverable
A Product Definition Pack covering vision, roles, journeys, requirements, AI boundaries, entities, acceptance criteria and the build roadmap.
1.1 What Are We Building?
We are building a multi-tenant SaaS support platform where organizations connect their own knowledge, serve customers through an AI assistant, escalate difficult cases to human agents, manage tickets and measure support performance.
- Customer-facing AI support widget.
- Company-specific RAG knowledge base.
- Grounded answers with sources.
- Human escalation and ticket creation.
- Real-time agent/customer conversations.
- AI-assisted agent workspace.
- Admin knowledge/team management.
- Support analytics.
1.2 Product Vision
Enable organizations to answer repetitive customer questions instantly from approved knowledge while preserving a clear route to human support when AI cannot safely or confidently resolve the request.
1.3 Target Users
- Customer
- Support Agent
- Organization Admin
- Platform/System
1.4 Customer Experience
- Start/continue a conversation.
- Ask natural-language questions.
- Receive grounded answers.
- View sources.
- Request a human.
- Create a ticket.
- Follow support state.
1.5 Agent Experience
- See queues and assigned work.
- Receive handoffs.
- View customer/conversation context.
- Use AI summaries and suggested replies.
- Search knowledge.
- Reply, transfer and resolve.
1.6 Admin Experience
- Manage agents/roles.
- Upload knowledge.
- Track ingestion.
- Manage categories/settings.
- Review analytics.
- Configure allowed AI behavior.
Figure 1.2 — Three distinct product experiences.
1.7 Core Customer Journey
Step | System Behavior |
Ask | Message enters an organization-specific conversation. |
Retrieve | Search only that organization's approved knowledge. |
Generate | LLM receives controlled instructions and retrieved context. |
Ground | Return answer with useful source information. |
Decide | Apply insufficient-context/escalation rules. |
Escalate | Create ticket/handoff when human support is needed. |
Resolve | Agent/customer continue until resolution. |
Figure 1.3 — Planned AI answer decision flow.
◆ AI Must Know When Not to Answer
Prefer transparent escalation over an unsupported confident-looking answer.
1.8 Functional Requirements
Area | Must Have |
Organizations | Tenant account and isolation |
Authentication | Login, JWT, role authorization |
Chat | Conversation/message persistence |
AI | Controlled response generation |
Knowledge | Upload/process/manage documents |
RAG | Tenant-filtered vector retrieval |
Tickets | Create/assign/prioritize/resolve |
Handoff | AI-to-human transfer |
Agent | Queue, context, AI assistance |
Admin | Agents, knowledge, settings |
Analytics | Operational metrics and trends |
1.9 Non-Functional Requirements
- Security and tenant isolation.
- Reliable message/ticket persistence.
- Responsive chat; asynchronous ingestion.
- Scalable multi-organization design.
- Diagnosable failures and processing states.
- Clear service boundaries and maintainability.
- Privacy and data minimization.
- Explicit AI grounding and escalation controls.
1.10 Multi-Tenant Model
Figure 1.4 — Support objects remain inside an organizational boundary.
◆ Tenant Isolation Is Security
Organization A must never retrieve Organization B's tickets, messages, knowledge chunks or analytics.
1.11 Initial Data Entities
Entity | Purpose |
Organization | Tenant boundary |
User | Admin/agent identity |
Customer | Support customer/session |
Conversation | Chat thread |
Message | Customer/AI/agent message |
Ticket | Escalated issue |
Ticket Event | Status/assignment history |
Knowledge Document | Uploaded source |
Document Chunk | Retrievable text + embedding |
AI Configuration | Tenant AI settings |
1.12 Knowledge & RAG Requirements
- Support PDF, DOCX and TXT initially.
- Extract and normalize text.
- Chunk content for retrieval.
- Generate embeddings.
- Store vectors with tenant/document metadata.
- Embed customer query.
- Retrieve only relevant tenant chunks.
- Build a controlled prompt.
- Return grounded response and sources.
- Handle weak/missing evidence and escalation.
Figure 1.5 — Knowledge ingestion lifecycle.
1.13 AI Features Beyond Customer Chat
Feature | Purpose |
Suggested Reply | Assist agents |
Conversation Summary | Fast handoff context |
Ticket Classification | Suggest category |
Priority Assistance | Suggest urgency for review |
Knowledge Search | Internal agent retrieval |
Escalation Assistance | Identify weak context/human-needed cases |
Analytics Summaries | Summarize support patterns |
◆ AI Suggests; Workflow Decides
AI assists authorized staff. It should not silently make consequential workflow decisions.
1.14 Locked Technology Stack
Layer | Technology |
Frontend | React + TypeScript |
UI | Tailwind CSS |
Backend | Python + FastAPI |
Schemas | Pydantic |
ORM | SQLAlchemy |
Database | PostgreSQL |
Vector | pgvector |
AI | OpenAI API |
RAG | Custom Python pipeline |
Jobs | Celery + Redis |
Real-Time | WebSockets |
Files | S3-compatible storage |
Auth | JWT + password hashing |
Testing | Pytest + frontend testing |
Containers | Docker + Docker Compose |
Figure 1.6 — High-level technology architecture.
Question → Query Embedding → Tenant-Filtered Vector Search → Relevant Chunks → Controlled Prompt → LLM → Grounded Answer + Sources
1.15 Version 1 Scope Boundary
- No telephony/voice call-center integration.
- No WhatsApp/social channels initially.
- No Kubernetes/Kafka.
- No multiple vector databases.
- One primary LLM provider initially.
- No complex autonomous support agents.
- No billing engine.
- No native mobile apps.
- No enterprise SSO/SAML.
◆ Scope Discipline
Production-oriented does not mean adding every enterprise technology. Version 1 must remain complete and teachable.
1.16 User Stories
- As a customer, I want fast support answers without waiting for an agent.
- As a customer, I want human help when AI cannot resolve my issue.
- As an agent, I want conversation context so customers do not repeat themselves.
- As an agent, I want AI suggestions while retaining control.
- As an admin, I want approved documents to become searchable knowledge.
- As an admin, I want ingestion status and support analytics.
- As an organization, I require strict tenant isolation.
1.17 Product-Level Acceptance Criteria
- Admin can authenticate.
- Admin can upload a supported document.
- Document becomes retrievable knowledge.
- Customer can start a conversation.
- AI can retrieve tenant-specific context and generate a grounded answer.
- Customer can request human support.
- Ticket/handoff reaches an agent.
- Agent can reply and resolve.
- Admin can view basic analytics.
- Cross-organization access is rejected.
- Application runs through documented Docker setup.
1.18 Product Build Roadmap
Figure 1.7 — Twenty-chapter build from foundation to production readiness.
Phase | Chapters | Outcome |
Foundation | 1–5 | Requirements, architecture, setup, database, authentication |
AI Chat | 6–8 | Customer chat, messaging, LLM |
Knowledge + RAG | 9–13 | Documents, embeddings, pgvector, RAG, guardrails |
Support Operations | 14–16 | Tickets, handoff, agent workspace |
SaaS Completion | 17–20 | Admin, analytics, security/testing, deployment |
1.19 Build Checkpoint
◆ BUILD CHECKPOINT — Chapter 1
✓ Product vision defined
✓ Roles defined
✓ Core journeys defined
✓ Functional/non-functional requirements defined
✓ AI/human boundaries defined
✓ Multi-tenant requirement locked
✓ Technology stack locked
✓ MVP scope locked
✓ Acceptance criteria defined
✓ Build roadmap confirmed
1.20 Planning Tasks
- Task 1: Describe a fictional organization that will use the platform.
- Task 2: Create five support questions answerable from knowledge.
- Task 3: Create three requests that should escalate.
- Task 4: Define initial ticket categories.
- Task 5: List five knowledge documents to upload.
- Task 6: Write a tenant-isolation acceptance criterion.
- Task 7: Write one customer-facing AI limitation.
1.21 Common Planning Mistakes
◆ Building Chat First
Product workflows and boundaries should be defined first.
◆ RAG = Guaranteed Truth
Retrieval improves grounding but does not guarantee correctness.
◆ Too Many Technologies
Every dependency needs a concrete requirement.
◆ Ignoring Tenant Boundaries
Multi-tenancy cannot safely be bolted on later.
◆ Over-Automating
Start with AI assistance and explicit workflow controls.
◆ No Definition of Done
Acceptance criteria prevent endless scope.
1.22 Knowledge Check
- Why is this more than a chatbot?
- What are the three primary user experiences?
- Why must retrieval include an organization filter?
- When should AI escalate?
- What does pgvector do?
- Why use Celery for document ingestion?
- What is the difference between an AI suggestion and a workflow decision?
- Why define acceptance criteria before implementation?
1.23 Chapter Summary
We now have the product contract for the AI Customer Support Platform: organization-specific RAG, customer chat, ticketing, human handoff, an AI-assisted agent workspace, administration and analytics inside a multi-tenant SaaS architecture.
◆ Up Next — Chapter 2
System Architecture & Technology Stack: translate these requirements into concrete frontend, backend, database, AI, storage, background-job and real-time architecture.
Free preview
This is one chapter of the AI Customer Support Platform playbook.
Get every chapter, the complete source code and lifetime updates.
See the full playbook →