AI-Powered CRM Agent
An always-on agent that enforces deal hygiene, enriches contacts and chases follow-ups inside the CRM, so the revenue team spends less time on manual upkeep and more time selling.
- Role
- Automation Architect & Developer
- Timeline
- 3 days, prototype to deployment
- Impact
- 100% audit traceability, zero manual CRM configuration
- Stack
- Claude CodeSalesforceTypeScriptClaude APIClayApolloSlack APIVitestRailway
- 220 Automated tests across engine, jobs and safeguards
- 24/7 Pipeline observability
- 10+ Hours saved weekly on manual CRM upkeep
01 / Challenge
Validation rules catch a missing field. They cannot judge whether a deal is really ready for the next stage, whether a client email has gone unanswered, or whether a contact is real.
- 01
Dirty pipeline data
Deals were pushed to later stages before they were ready, and new deals were often missing required fields.
- 02
Missed handoffs
Contacts were missing vital emails, follow-ups slipped through the cracks, and client emails sat unanswered.
- 03
Revenue impact
Manual upkeep and dropped balls quietly cost the business time and revenue.
Inside the system
02 / Process
How it was built.
- 01
Iterative AI development
Built with Claude Code as an engineering pair, favouring durable architecture, git-backed continuous deployment and tests written alongside features.
- 02
Pure rule engine
A side-effect-free engine, evaluate(context) โ { allowed, failures[] }, isolated from I/O. The business rulebook maps one-to-one to the spec and is verified by fast unit tests.
- 03
Hybrid orchestration
Real-time webhooks for stage-gate validation and enrichment, plus timezone-aware scheduled jobs for AI task generation and SLA nudges.
- 04
Write nothing unverified
Only verified work emails are attached, and at most two high-confidence follow-up tasks are created per email, so AI output never adds noise to the CRM.
- 05
Hardening & shadow testing
A self-write loop guard, rate-limit circuit breakers, notification dedup and retry backoff, plus a global DRY_RUN switch to shadow-test against the live CRM before switching writes on.
03 / Results
An observant, always-on agent running five core capabilities in production without failing silently.
- 01
Stage-gate validation
Unqualified stage moves are auto-reverted, and the owner gets the exact fix in Slack and deal notes.
- 02
Contact enrichment
Verified work emails are found and attached by role and company size whenever a relevant account is added.
- 03
AI-generated follow-ups
A daily sweep reads recent correspondence and uses the Claude API to propose deduplicated, high-confidence tasks with due dates inferred from urgency.
- 04
Unanswered-email SLAs
Client emails unanswered past the SLA (48 hours early in the pipeline, 24 once integrating) become a reply task and an owner ping.
- 05
New-deal setup nudges
An hourly sweep reminds owners, once, when a fresh deal is still missing the fields its stage needs, with every action logged to an alerts channel.