DEV Community

Subhendu Das
Subhendu Das

Posted on

Smart Routing: AI-Driven Conversation Flow for India SMBs

Smart Routing: AI-Driven Conversation Flow for India SMBs

The Problem

Small businesses in India often juggle customer messages across WhatsApp, Instagram, SMS, Web Chat, and Email. Without a single view, agents miss replies, response times balloon, and customers feel ignored. Managing each channel in isolation also forces teams to duplicate effort, leading to inconsistent follow‑ups and revenue leakage.

What Smart Routing Changes

GoSumo’s smart routing feature consolidates all inbound conversations into one AI‑driven interface and automatically assigns each message to the most suitable team member. The result is a predictable, efficient flow that keeps every lead on track and every customer satisfied.

How It Works

Intention Detection – When a message arrives, the platform forwards its content to OpenRouter AI. The model classifies the intent (order inquiry, support, billing question, etc.) and tags it with relevant skills like order‑processing or technical‑support.

Skill‑Based Assignment – The backend, built with NestJS and TypeScript, consults a PostgreSQL table that maps agents to skill sets. A quick lookup, now indexed thanks to the recent perf(db): index the lookups that run before a tenant is known, returns the best candidate.

Queue Management – BullMQ queues the routing job. Redis serves as a cache for real‑time availability data, ensuring that an agent who is currently offline or busy is skipped. The system then pushes the conversation to the agent’s inbox in the Next.js dashboard.

Fallback & Escalation – If no agent matches the skill or is available, the system triggers an automated response that informs the customer of an expected reply time. This maintains a professional tone while protecting agents from manual triage.

The User Experience

  1. From the Customer’s View – A shopper clicks a “Chat with us” button on Instagram. The message lands in GoSumo’s unified inbox.
  2. From the Agent’s View – The agent logs into the web dashboard. The new conversation appears in his queue with a badge indicating the required skill. Clicking it opens the chat, showing the full message history across all channels.
  3. From the Admin’s View – The business owner sees a real‑time heatmap of incoming channels and can adjust skill assignments via a simple drag‑and‑drop interface. Role‑based access, reinforced by the recent fix(auth): make VIEWER read‑only across the API, ensures that only authorized users can change routing rules.

Under the Hood

  • NestJS & TypeScript orchestrate the API layer, handling authentication and routing logic.
  • Prisma provides type‑safe database access to PostgreSQL, storing conversation metadata and agent skill mappings.
  • Redis caches agent availability and message指定.
  • BullMQ queues routing jobs, allowing the system to scale with concurrent conversations.
  • Qdrant offers vector similarity search for advanced intent matching, complementing OpenRouter’s textual classification.
  • OpenRouter AI supplies the core natural‑language understanding that powers intent detection.

Security & Performance Enhancements

Recent commits tightened the platform’s security posture. fix(auth): close the privilege escalation in team management and fix(auth): stop bcrypt cost 12 from timing out the suite under parallel load ensure that role checks are enforced consistently and that password hashing does not degrade performance under heavy traffic. These updates give India SMBs confidence that customer data is handled securely while maintaining rapid response times.

The Bottom Line

Smart routing turns a chaotic, multi‑channel inbox into a streamlined, AI‑directed conversation hub. By automatically matching messages to the right agent, it shortens response times, reduces missed opportunities, and frees teams to focus on higher‑value work. For small businesses in India looking to elevate their customer communication, GoSumo’s AI‑powered client management platform offers a scalable, secure, and efficient solution.

Top comments (0)