← Back to projects

BAZ Customer Support Platform

Multi-Tenant SaaS with AI Orchestration

Founder & CTO (Kennis)Sep 2025 - Present

Overview

Founded AI-focused company and launched BAZ, a multi-tenant SaaS platform for automated customer support and workflow orchestration. The platform integrates GLPI service desk, Chatwoot messaging, n8n workflow automation, WhatsApp Business API, and AI orchestration to enable intelligent, context-aware customer service.

The Business Problem

Small and medium businesses struggle with customer support at scale:

  • Manual ticket triaging wastes 30-40% of support agent time
  • Customers expect instant responses on WhatsApp, but hiring 24/7 staff is expensive
  • Knowledge is fragmented across Confluence, tickets, and agent heads
  • No visibility into support workflows or SLA compliance

Goal: Build a platform that uses AI to automate Level 1 support while seamlessly escalating complex issues to human agents, reducing response time and support costs.

Technical Architecture Decisions

Decision: Build vs Buy for Service Desk

Choice: Integrate GLPI (open-source ITIL service desk) instead of building from scratch

Rationale:

  • GLPI provides battle-tested ITIL workflows (incident, problem, change management) out of the box
  • Building a full service desk would take 6+ months - not a competitive differentiator
  • Our differentiation is AI orchestration, not ticketing workflows
  • GLPI's REST API allows deep integration without forking the codebase

Trade-off: Less control over ticketing UX, but 80% faster time-to-market and can focus engineering on AI features.

Decision: Multi-Tenancy Strategy

Choice: Shared infrastructure with tenant-isolated PostgreSQL schemas

Rationale:

  • Rejected: Database-per-tenant - too expensive for SMB target market
  • Rejected: Shared tables with tenant_id column - higher security risk (one WHERE clause bug leaks all data)
  • Chosen: PostgreSQL schemas provide strong isolation with reasonable operational overhead
  • Can move high-value tenants to dedicated databases later without application changes

Security Benefit: Schema-level isolation enforced by PostgreSQL, not just application logic. Reduces data leak risk.

Decision: AI Orchestration Architecture

Choice: n8n workflow engine with custom AI nodes

Rationale:

  • AI response workflows involve multiple steps: intent detection → knowledge base search → response generation → confidence scoring
  • n8n's visual workflow editor allows non-engineers to modify AI logic (critical for customer-specific tuning)
  • Built-in integrations for OpenAI, webhooks, databases reduce custom integration work
  • Can A/B test different AI strategies by cloning workflows

Result: Customer success team can tune AI responses without engineering involvement, reducing iteration time from days to hours.

Technical Stack

AWSPostgreSQLRedisKubernetesDockerGLPIChatwootn8nWhatsApp APIOpenAI APIGitHub Actions

Key Features & Implementation

1. AI-Powered Ticket Triaging

  • Inbound WhatsApp messages analyzed for intent (billing question, technical issue, sales inquiry)
  • Auto-routing to appropriate GLPI ticket category and priority level
  • Knowledge base RAG (Retrieval-Augmented Generation) for instant answers to common questions
  • Confidence threshold: < 70% confidence = escalate to human agent

2. Multi-Channel Communication

  • WhatsApp Business API integration for customer-facing messaging
  • Chatwoot as unified inbox for agents (handles WhatsApp, email, web chat)
  • Bidirectional sync: GLPI tickets ↔ Chatwoot conversations
  • Agent handoff: AI responds until it needs help, then seamlessly transfers to human

3. Workflow Automation

  • n8n workflows for complex business logic (SLA monitoring, escalation rules, follow-up messages)
  • Custom nodes for OpenAI API calls, PostgreSQL queries, and GLPI API integration
  • Example workflow: New ticket → Check SLA → If overdue → Notify manager → Auto-prioritize

DevOps & Infrastructure

  • CI/CD: GitHub Actions for automated testing, Docker image builds, and Kubernetes deployments
  • Kubernetes: Separate namespaces for dev, staging, and production environments
  • Scaling: Redis for session management and rate limiting; PostgreSQL read replicas for reporting queries
  • Monitoring: CloudWatch for AWS metrics; custom dashboards for tenant-specific SLA tracking
  • Security: Tenant data encrypted at rest (AWS KMS); WhatsApp webhook signature validation; OAuth2 for agent authentication

Impact & Results

60%
Reduction in Level 1 ticket volume through AI automation
< 2 min
Average AI response time for common questions
Multi-tenant
Schema-isolated architecture for customer data security
24/7
AI-powered support availability without agent staffing costs

Challenges & Solutions

  • Challenge: WhatsApp API rate limits (80 messages/second)
    Solution: Redis-based token bucket rate limiter with message queuing for burst traffic
  • Challenge: AI hallucinations giving incorrect support answers
    Solution: Confidence scoring + citation tracking (AI must cite knowledge base article). Low confidence = escalate to human.
  • Challenge: Tenant-specific knowledge bases (each customer has different products)
    Solution: Per-tenant vector embeddings in PostgreSQL pgvector extension for RAG retrieval

Lessons Learned

  • Integration Over Custom Build: Using GLPI + Chatwoot + n8n got us to market in 3 months vs 12+ months to build everything custom. Integrations are underrated.
  • Multi-Tenancy is Hard: Schema-per-tenant adds operational complexity (migrations, backups), but data isolation is critical for B2B SaaS. Worth the trade-off.
  • AI Needs Guardrails: Can't just throw GPT-4 at customer support. Need confidence thresholds, citation tracking, and fallback to humans. AI augments agents, doesn't replace them (yet).