Context
A solar energy company selling B2C, with high lead volume from social ads and forms. It already had conversational AI qualification and scheduled follow-up, grown in layers with no documentation, no versioning and no instrumentation.
Problem
- Duplicate leads re-entering the follow-up queue for lack of a concurrency guard.
- A messaging channel that was configured but sent nothing.
- A lead in follow-up who replied on their own never got an AI reply again.
- Finished sequences that kept being processed.
What I did
- Freeze and critical fixes first: a full map of the system and removal of obsolete automations.
- Idempotency and concurrency guards in the orchestration, with a state snapshot before every change.
- Fixed the re-engagement flow so the AI replies again during follow-up.
Result
The follow-up queue dropped from about 1,300 duplicate or stuck records to fewer than 40 active ones, and dozens of obsolete automations were removed.