Switch to English?
Yes
Переключитись на українську?
Так
Переключиться на русскую?
Да
Przełączyć się na polską?
Tak
The Situation
A B2B sales agency ran high-volume lead qualification for its own clients. Prospects reached out through 4 channels: the website widget, phone calls, Telegram, and WhatsApp. The agency wanted to automate first-touch conversations across all of them without hiring more SDRs.

The Problem
Most sales automation tools are channel-specific. A chatbot for the website. A separate Telegram bot. A different vendor for voice. Each tool has its own lead records, its own scripts, no shared intelligence. When the same prospect reached out on Telegram and later called the main number, nobody connected the two interactions. Lead scores were fragmented. Knowledge base answers were inconsistent across channels. And outbound calling still required a human SDR dialing through a spreadsheet.

The agency needed one brain behind every channel, not four bolted-together tools.

The Solution
I built a unified sales platform where every message flows through the same AI agent. Voice, chat, Telegram, WhatsApp: each channel has a thin adapter that normalizes incoming messages, then hands off to a shared ChatService. That service looks up the lead, retrieves relevant knowledge via RAG (Voyage AI embeddings in pgvector), and passes conversation history to the agent, which answers questions grounded in the company's actual product docs, pricing, and FAQs. Same lead records, same knowledge base, same scoring across all 4 channels.

For outbound, operators upload a contact list, attach a voice script, and launch a campaign from the admin dashboard. BullMQ workers dial contacts through Retell AI at a rate-limited 1 call/second. Retell handles telephony and speech; my custom WebSocket endpoint feeds each call's transcript to the agent in real time. After each call, Retell webhooks deliver the transcript, call summary, and sentiment analysis back to the platform, which automatically adjusts lead scores (+10 for positive sentiment, -5 for negative).

The embeddable widget is a 53KB single-file Vite IIFE bundle that drops onto any website with one script tag, renders inside a Shadow DOM to avoid CSS conflicts, and restores chat history across page reloads via localStorage.

Tech Stack: NestJS, TypeScript, Claude API (Anthropic SDK), Retell AI, Voyage AI embeddings, OpenAI Whisper, Supabase (PostgreSQL + pgvector), BullMQ, Redis, Next.js, Vite, Docker, nginx, Cloudflare Tunnel

The Results
- 4 channels unified under 1 AI pipeline: voice calls, website chat, Telegram, WhatsApp share lead records, knowledge base, and scoring
- Outbound calling fully automated: operators configure a campaign once, the system dials, converses, transcribes, and scores every contact with no SDR involvement
- Multi-tenant ready: organizations, RBAC, and per-org knowledge bases built in, so the platform can host multiple agency clients
- Live in partner testing with 7 Docker services, signed webhook verification, and test coverage across 34 test files (unit, integration, AI behavior, E2E)

How It Works
1. Prospect reaches out on any of 4 channels (widget, phone, Telegram, WhatsApp)
2. Channel adapter normalizes the message and creates or looks up the lead
3. ChatService retrieves conversation history and runs semantic search against the company knowledge base
4. The agent generates a response grounded in retrieved documents
5. Response routes back through the same channel adapter
6. Lead score updates based on message signals or (for voice) post-call sentiment analysis
Детали работы
Добавлена 7 апреля
76 просмотров
Фрилансер
Андрей Бойко
Украина Харьков
Нет отзывов

Свободен для работы Свободен для работы
На сервисе 9 лет