The challenge
We wanted reps to be able to:
Add notes in real-time during or after calls
Mention teammates (
@carlos
) with notification logicView comment history alongside call summaries and pipeline data
Never refresh the page
But we didn’t want to:
Maintain presence states
Deal with long-lived WebSocket pain
Bloat the UI with a full “chat UX”
Core constraint: one thread per deal
Every Deal Room is tied to a single deal ID. That gave us a clean scoping mechanism:
On the backend, we mapped this to a Redis pub/sub channel for lightness and speed:
Real-time without state: the trigger trick
Instead of syncing comment history through a big cache layer, we used PostgreSQL triggers to broadcast events:
This let us avoid full polling — and meant that the DB was the source of truth, not some middle-layer buffer.
Mentions: just enough parsing
We didn’t need full NLP for @mentions
. We used a simple regex + user map:
Then we validate them against the current deal’s team context. If valid, we trigger a notification event with:
Author ID
Deal ID
Mentioned usernames
Message text
The result
Deal Rooms feel fast and human — like lightweight sales-focused Slack threads. Reps collaborate without switching tools. Managers see conversation and activity in one place. And we didn’t over-engineer anything.
All of it runs on:
1 Redis instance
1 DB trigger
1 socket server
< 500 lines of orchestration logic
Final Thought
Real-time doesn’t have to mean complex. By building for our exact use case — not a generic chat SDK — we created something lighter, clearer, and more durable.