Selected work

Case study 13

Master Protection. A WhatsApp agent that files the lead.

An agent named Timo collects the customer’s details, answers from company knowledge, creates the lead in SuiteCRM, and escalates a price question to sales. The human salesperson is left for the close.

Client
Master Protection, car protection services
Type
WhatsApp sales agent connected to SuiteCRM
Role
End-to-end owner: workflow, state, prompts, WhatsApp, CRM, knowledge base, and escalation

The business problem

Paint protection filmNano ceramicNano grapheneHeat insulation
  • Product and warranty questions depended on a salesperson being available.
  • Name, car type, model, and service were collected by hand.
  • A WhatsApp thread did not become a CRM lead.
  • A technical question and a price question were not separated.
  • Company knowledge sat in files, not in one layer.

What the agent changes

First-reply time and monthly lead counts are not listed. No phone numbers are shown.

A reply at any hour

Answers come from company files, not from the model guessing.

One missing fact at a time

Name, then car type, then model, then service. Each message updates the saved state.

A complete customer becomes a lead

SuiteCRM Fresh Lead, source WhatsApp. The lead id is stored on the session.

Price intent escalates

A question about price, cost, or offers becomes a Hot Lead. The customer is told a salesperson will follow up with the figures.

No invented specifications

The agent answers from files: PDF, TXT, and DOCX.

How a message moves

  1. 01Evolution API webhook
  2. 02Ignore the company’s own messages, empty text, and a duplicate within 60 seconds
  3. 03Load Redis. On a first visit, Timo welcomes and starts collection
  4. 04GPT-4o-mini returns name, car, model, and service as JSON
  5. 05On completion: SuiteCRM token, Fresh Lead, lead id saved, confirmation sent
  6. 06Later answers come from Supabase. A price mark becomes Hot Lead. The mark is removed before the customer sees the message

Design decisions

  • Redis is the source of truth for the customer, the lead id, and the step. State is not only inside the prompt.
  • Extraction is separate from the reply.
  • The escalation mark is PRICE_INTENT_DETECTED. Code strips it before send.
  • Evolution keys and CRM credentials live in environment variables.
  1. TimoHello, I am Timo from Master Protection. I can help with protection services. Your name?
  2. CustomerAhmed
  3. TimoWhich car would you like to protect?
  4. CustomerA 2022 BMW. I want a paint protection film.
  5. CustomerWhat is the difference, and how much is it?
  6. TimoAnswers the difference from the knowledge base, then says a salesperson will send the price.

Technical architecture

Orchestrationn8n
WhatsAppEvolution API
SessionRedis, one key per number
ExtractionGPT-4o-mini, JSON
QuestionsGPT-4.1-mini
KnowledgeSupabase pgvector. Pinecone is an alternate index for the same services
CRMSuiteCRM API v8