AI Based Sales Coaching System
Introduction
Client Background
This project was designed to automate sales agent performance coaching using AI. The original system was a functional proof of concept and could pull call recordings, transcribe them, and attempt basic coaching analysis. However, as real users began relying on the system, various key issues were identified. These include:
- Data wasn’t reliably stored.
- AI responses were unstable.
- Reports weren’t being delivered.
The goal of this engagement was to fix, harden, and scale the system to ensure that it could support daily operations and eventually evolve into a fully autonomous AI coaching agent.
Challenges
The core challenges we faced during the project were mainly around data stability, AI reliability, and communication workflows. These challenges include:
- Scorecard data not being saved correctly to Supabase, breaking all downstream automations.
- OpenAI Assistant timeouts and unpredictable outputs.
- Incomplete integration with weekly/monthly coaching email delivery.
- Workflow bloats in Pipedream, causing inefficiencies and leading to a waste of tokens.
- The need to expand the system to a new use case (BFF enrollment call coaching).
System Design
We re-architected the solution to focus on stability, modularity, and extensibility by breaking the flows into reusable components that could cleanly handle each stage of the coaching cycle. All the different aspects of the system design included:
Call Analysis Pipeline
Built a complete ingestion and processing system for sales calls by retrieving metadata from Supabase and PhoneBurner, transcribing recordings via OpenAI Whisper, and analyzing transcripts in GPT-4 using prompt-engineered coaching templates focused on objection handling, rapport, and closing skills.
Storage and Delivery
Saved structured coaching results in Supabase as JSON aligned with dashboard schemas, indexed by call ID, agent, and tags. Generated dynamic weekly and monthly digest emails personalized by performance data, with reusable payloads designed for future Slack or SMS delivery.
Workflow Refactoring and Debugging
Rebuilt legacy Pipedream flows into modular stages (data fetch, transcription, scoring, storage, delivery) with retry logic, token optimization, and reusable code blocks for consistency and easier debugging.
OpenAI Assistant Stabilization
Handled edge cases and timeouts with fallback prompts and structured parsing to ensure clean responses. Redesigned prompts for deterministic outputs with labeled sections, improving reliability and downstream parsing.
Testing and QA
Validated accuracy and consistency by running real and mock transcripts through the full pipeline. Confirmed Supabase storage, dashboard visibility, and email rendering for multiple roles, with full error logging and timestamp tracking for quality assurance.
Development Process
We approached the rebuild step by step, making sure each part of the system could stand on its own before putting everything together. First, we broke the sales coaching workflow into smaller modules, like transcription, scoring, storage, and delivery. By developing and testing each module separately, we could spot problems early and fix them without risking the rest of the system.
We also set clear rules for how data moved in and out of each module so that the flow stayed consistent. Using GitHub for version control kept our work organized, and short development cycles helped us make quick improvements based on what we saw in testing. After the core modules were working smoothly, we focused on making the system faster, more reliable, and more cost-efficient.
We added retry logic to handle API timeouts, fine-tuned prompts to cut token use, and put in place strict checks to stop bad AI responses from causing errors later in the workflow. For Supabase, we used schema validation and automated indexing to make sure data showed up correctly in dashboards. Throughout development, we tested with real sales calls, checked every output, and ran regression tests after each change. This steady, hands-on process helped us move from a fragile MVP to a tool that’s ready for daily use.
Conclusion
This project highlights how fragmented MVP systems can be used to stabilise and upgrade into production-ready AI workflows. With structured pipelines, LLM integration, and modular delivery, the sales coaching platform now provides immediate and scalable value. Lastly, it ensures that personalised weekly digests are sent as per the requirements.
Launch and Results
After cleanup and rebuild, we ensured the system was production-ready and fully operational, and when launched, the following results were obtained:
- Successful write-through from PhoneBurner to Whisper to GPT to Supabase.
- Automated coaching digests were sent weekly/monthly with high personalization accuracy.
- System now ready for onboarding of BFF enrollment reps via GoHighLevel.
- Reduced failed coaching runs due to stabilized data storage
Successful write-through from PhoneBurner to Whisper to GPT to Supabase
Improvement in automated coaching digests sent weekly/monthly
System now ready for onboarding of BFF enrollment reps via GoHighLevel
Reduction in failed coaching runs after stabilizing data storage