Project · 2025–2026

CRM Omnichannel de Captação

Production omnichannel CRM at a higher-education institution — from the first WhatsApp contact to the enrollment confirmed in the academic system, with a bot, voice calls, email and executive dashboards.

An entire CRM — channels, operations and BI — built on one simple discipline: every number on screen must be true, explainable, and match the official source.

Illustration: an acquisition funnel with channels (WhatsApp, email, voice) converging to enrollment, dark theme with amber.

It's the system a higher-education institution's recruitment teams use every day: leads arrive from the website, from ads and from WhatsApp; a bot qualifies them and opens the conversation; a queue distributes them to operators on a kanban — and the funnel runs all the way to the enrollment confirmed in the academic system. I started building it in late 2025 and I'm its lead developer.

WhatsApp is the heart: a qualification bot, bulk campaigns and voice calls answered right in the browser (WebRTC against the official API). Around it, email campaigns and inbox, public forms, and access profiles for operators, supervisors, directors and management.

The data layer is where the project shows its character: an academic-system (Oracle) integration reconciled to the cent against the official statement, Meta and Google ad costs imported daily, parameterizable first-touch attribution, and an executive dashboard served only by materialized facts — no operational query on the user's path.

It runs on Docker Swarm with continuous deployment and end-to-end OpenTelemetry observability. That telemetry guided the hardest chapters: production incidents diagnosed by trace, queries rewritten with before/after proof, and database cleanup at scale — an automatic sweep of forgotten conversations and a deduplication engine that mapped 9.4k duplicates across 128k customers.

By the numbers

180k+
Leads managed
2,4M
WhatsApp messages
128k
Customers on file
700+
Commits in 2026
100×
Incident reverted

Engineering decisions

  1. 01

    Materialized facts for the executive dashboard

    The management dashboard never queries the operational collections: a worker builds aggregated facts on a fixed schedule and the endpoint reads only from them. The heavy aggregation that used to bring the database down left the user's path, and an idempotent backfill rebuilds the CRM's entire history when needed.

  2. 02

    One yardstick for every number

    The same filter must yield the same number on every screen — card totals ≡ funnel base ≡ KPI, locked by tests. That discipline replaced a misleading average with the median (validated over 149k accepts: 4.6 minutes, not “19 days”) and killed impossible 130%+ conversion rates.

  3. 03

    Honest marketing attribution

    The service bot was “stealing” the origin of paid leads, making the channel look 7× smaller than it was. Attribution became parameterizable first-touch, with an idempotent recompute that fixed tens of thousands of customers — and campaigns with a computable CPL/CAC went from 1 to 54.

  4. 04

    Telemetry-driven performance

    A measured baseline (46k queries in 3 hours, 5.5 ms average) and every incident diagnosed by trace: the query scanning 176k documents, the cache stampede that degraded the database 100×. The fixes — single-flight, time limits at 31 call sites, 4 queries fused into 1 — brought latency back to baseline, with before-and-after proof.

  5. 05

    Voice in the browser with real audio

    WhatsApp calls answered in the browser over WebRTC. Quality demanded signal engineering: a 127-tap FIR resampler, a jitter buffer, per-call forensic instrumentation — until a ghost keepalive injecting silence every 100 ms was found. Result: ~90% fewer clicks and defect counters down from 46 to 0.

  6. 06

    Academic integration reconciled to the cent

    The financial sync with the academic system (Oracle) matches the official statement 1:1: 71 discount types covered automatically, student financing separated by rule — and an audit that uncovered a six-figure discrepancy hiding behind a DISTINCT.

Architecture

Canais

WhatsApp · Email · Voice · Web

Bot, campaigns, inbox and WebRTC calls.

API + Workers

Express & jobs

REST + Socket.IO; syncs and loads run in the background.

Dados

MongoDB + Oracle

Operations in Mongo; enrollments and finance reconciled in Oracle.

Fatos & BI

Executive dashboards

Materialized facts; zero operational queries per request.

Stack

Node.jsExpressReactMongoDBSocket.IOWebRTCOracleOpenTelemetryDocker Swarm