1.The Challenge
Service businesses, clinics, real estate agencies, and high-velocity support teams lose revenue across three broken boundaries:
- Missed Inbound Calls & Fragmented Channels: When a prospect calls after hours or messages across WhatsApp, Instagram DM, Email, and Web Chat, context is split across disconnected tools. Unanswered calls go cold within minutes.
- Predatory AI Token Markups: Legacy helpdesks charge $0.99+ per AI resolution or lock teams into opaque credit tiers, making high-volume AI automation prohibitively expensive at scale.
- Disconnected Support & Sales Execution: Support agents handle inquiries in one tool while sales reps track deals, quotes, and invoices in another — leaving no closed-loop attribution from first WhatsApp message to signed contract.
2. The Solution: Omenixa
Omenixa replaces fragmented chat widgets, shared inboxes, and bolted-on chatbots with a single multi-tenant operating system:
- 24/7 Autonomous AI Receptionist & Missed-Call Recovery: When an inbound call goes unanswered on a connected Twilio line, Omenixa triggers a personalized WhatsApp recovery flow in under 5 seconds, qualifies the caller's intent against the tenant's RAG Knowledge Base, and books appointments directly into the calendar.
- Zero-Markup BYOK Multi-LLM Gateway: Tenants connect their own OpenAI, Anthropic Claude, Google Gemini, or Groq API keys (encrypted at rest with AES-256-GCM) with automatic provider failover cascades (
OpenAI → Claude → Gemini) and per-workspace token telemetry. - Unified Omnichannel Shared Inbox: Real-time Socket.IO workspace combining WhatsApp Cloud API, Instagram DMs, Gmail/Microsoft OAuth2 Email sync, and an embeddable Web Chat widget — complete with AI Copilot draft generation, sentiment/intent classification, SLA breach timers, voice note transcription/playback, and duplicate ticket merging.
- Revenue CRM & Cryptographic CLM: Drag-and-drop Kanban deal pipelines, automated lead-to-contact conversion, low-code trigger-condition-action workflows, and commercial quotes with SHA-256 digital e-signatures and PDF invoicing.
- Bilingual Enterprise Architecture (English & Arabic RTL): Full localization with native right-to-left (RTL) layout mirroring, role-based access control (
Super Admin,Admin,Manager,Agent,Customer Portal), and 15-day trial / plan entitlement enforcement via Razorpay & Stripe.

4. System Architecture

5. Key Engineering Deep-Dives
A. Multi-LLM BYOK Gateway with Automatic Failover & PII Redaction
- Problem: Single-provider LLM outages halt customer operations, while storing raw tenant API keys poses a security risk.
- Implementation: Built an encrypted key vault (
AES-256-GCM) and an execution orchestrator with tool-calling registry (book_appointment,lookup_order,create_lead,escalate_to_human), global opt-out/suppression shield (STOP/UNSUBSCRIBEdetection), automated PII redaction before external prompt dispatch, and deterministic fallback across OpenAI, Anthropic, Gemini, and Groq.
B. Database-Backed API Idempotency & Multi-Tenant Isolation
- Problem: Webhook retries from Meta/Twilio/Razorpay and rapid client double-clicks can create duplicate tickets, leads, or billing charges.
- Implementation: Engineered
idempotency.middleware.tsusingIdempotency-Keyrequest locking in PostgreSQL. Concurrent duplicate requests poll until the primary transaction completes and receive the cached response payload;5xxcrashes automatically roll back the lock so retries succeed cleanly. Every query is scoped to the authenticatedcompanyIdwith granular RBAC (requirePermission).
C. Self-Serve Onboarding & Module Entitlement Engine
- Problem: Multi-persona SaaS products often overwhelm new tenants with unconfigured menus or lock them into rigid templates.
- Implementation: Designed a 5-step resumable onboarding wizard (
/setup) that provisions the tenant, generates live API credentials and<script>widget embed code, configures data-hosting region (ME,US,EU,APAC) and default language (EN/AR), seeds AI intent rules, and unlocks a unified workspace governed by live toggleable modules (tickets,ai_agents,leads,deals,marketing) and subscription plan gates.