Lead qualification and follow-up automation (B2C)
Audit and stabilization of a conversational-AI lead-qualification automation for a B2C solar-energy client, eliminating lead duplication and a messaging channel that was silently failing.
- Workflow automation platform
- Conversational AI agent
- Cloud CRM
- Relational database
- Async message queue
Context
A B2C solar-energy client with a meaningful volume of leads coming from social-media ad campaigns and intake forms. The operation already had a conversational-AI qualification automation and a scheduled follow-up routine, but the system had grown in successive layers — with no documentation, no versioning, and no diagnostic instrumentation.
Problem
- Duplicate leads re-entering the follow-up queue due to a missing concurrency guard.
- A “dead” messaging channel — configured, but not actually sending any messages — without the team knowing.
- An AI qualification flow that didn’t resume correctly when a lead already in follow-up responded spontaneously.
- Ended-sequence records that kept being processed indefinitely.
Approach
Freeze and fix critical issues first (full system mapping, removal of obsolete automations, fixing the highest-impact bugs), then add idempotency and concurrency guards at the orchestration layer, plus a discipline of snapshotting state before any production change.
Outcome
- Duplicated/stuck leads in the follow-up queue reduced from roughly 1,300 to under 40 active records.
- Re-engagement flow fixed: leads that responded during follow-up started getting AI responses again.
- Dozens of obsolete automations removed, reducing the system’s maintenance surface.
Lessons
Always snapshot a workflow’s state before editing it in production, and treat any scheduled routine that writes state as requiring an explicit idempotency guard — an “insert” without a prior existence check is the most common cause of duplication in automation systems.