artysan/lead-qualifierConfidential

WhatsApp lead qualification

Multi-tenant SaaS that messages leads on WhatsApp, has a voice agent call them, qualifies them and books the meeting. In production since March 2026.

The problem
Anyone getting many leads from different campaigns spends hours calling them back by hand, and the cold ones get lost.
What I built
An agent that messages leads on WhatsApp and has them called, qualifies them with each project's rules and books the salesperson's meeting only for the ready ones.

103production releases since March 2026

TypeScriptNodeReactPostgresRedisWhatsApp Business
Start

01 / 08The problem

A lead nobody calls back is a lost lead.

Leads come in from several campaigns and need a reply while they are still interested. Calling them all back by hand keeps salespeople on the phone, and the cold ones fall behind.

To call back

Example

  1. Giulia R.via form · just nowhot
  2. Paolo M.via webhook · this morninghot
  3. Sara T.via CSV file · yesterdaywarm
  4. Luca B.via form · Mondaycold
  5. Anna F.via CSV file · last weekcold
To call back

02 / 08The conversation

The agent asks the project's questions and looks for answers in its documents.

Each project has its own questions and its own knowledge base. When the lead asks something, the agent goes through the list of the project's documents, opens the ones it needs and searches the text.

  • The lead comes in from a form, a webhook or a CSV file, and the agent messages them on WhatsApp.
  • If they don't reply, it follows up later on its own.
  • In the first months the search went by keyword; in June I rebuilt it this way.
Example Ltdbusiness account
  1. New lead · via form
  2. Agent: Hi Giulia, I'm writing about the request you left on our website. Do you have two minutes for a few questions?6:42 PM

  3. Giulia: Sure, go ahead6:43 PM

  4. Agent: So I know how to help: what exactly are you looking for?6:43 PM

  5. Giulia: I'd like to understand the timing, first of all.6:45 PM

  6. opens 2 project documents · searches “timing”
  7. Agent: We usually start within a couple of weeks of the first meeting. Would you like to book it with one of our consultants?6:45 PM

  8. Giulia: Yes, this week if possible.6:46 PM

Example: names and replies are made up

03 / 08The voice channel

Or a phone call, made by a voice agent.

Calls are made by an external voice agent that I integrated. The outcome goes into the same flow as the messages.

Giulia R.Phone call · voice agent
  1. AgentI'm calling to book your first meeting. Does Thursday morning work for you?
  2. GiuliaYes, Thursday at 11 is perfect.

Call ended · outcome saved

Example

04 / 08The lead is ready

The meeting lands on the salesperson's calendar, with the outcome in the CRM.

Once the lead has answered the planned questions, the agent books the meeting on the salesperson's calendar and assigns the lead to them. The outcome goes to the client's CRM.

Marco's calendar · sales

Example

MonTueWedThuFri
Mon 9:30 AM–11:00 AM: busyMon 2:00 PM–4:00 PM: busy
Tue 10:00 AM–12:30 PM: busyTue 3:00 PM–4:00 PM: busy
Wed 9:00 AM–10:00 AM: busyWed 11:30 AM–1:00 PM: busyWed 2:30 PM–5:00 PM: busy
Thu 9:00 AM–10:30 AM: busyThu 3:00 PM–5:00 PM: busyGiulia R. 11:00 AMfirst meeting
Fri 10:00 AM–12:00 PM: busyFri 2:00 PM–3:00 PM: busy

Client's CRM

  • Lead assigned to Marco
  • Outcome: meeting booked
Marco's calendar · sales: Thu 11:00 AM–12:00 PM, Giulia R., first meeting

05 / 08Behind the scenes

Each client has its own projects, and each project its own rules.

The system is multi-tenant. Permissions per account and per project are computed on the server, and the interface shows only what the server allows.

Accounts and projects

Example

  • Client Aaccount

    • Project 1

      • Laura · operator
      • Marco · sales
    • Project 2

  • Client Baccount

    • Project 3

Project 1's rules

  • The qualification questions and criteria
  • The knowledge base documents
  • The salespeople's calendars
  • Where the outcome goes: the CRM or a webhook

Who sees what

  1. Laura opens the board
  2. The server checks account, project and role
  3. She only gets Project 1's conversations

Project 3 · Client B

Next

06 / 08Reliability

If an external service fails halfway, the job picks up where it stopped.

Messages, follow-ups and calls go through a job queue. If a service doesn't respond, the job goes back in the queue and runs again a few minutes later, without repeating the sends that already went through.

First attempt

  1. Message 1sent
  2. Message 2the external service doesn't respond

Queued

retries in a few minutes

A few minutes later

  1. Message 1already sent, skipped
  2. Message 2sent

Example: one reply in two messages

07 / 08The pace

103 releases since March, never fewer than six in a full month.

Datereleasesautomated tests
March from the 30th1
April 17
May 6
June 14
July 14Jul 15: 71, Jul 31: 167
August 10Aug 15: 272, Aug 31: 507
September 23Sep 15: 701, Sep 30: 1,105
October 17Oct 15: 1,432, Oct 31: 1,779
November to the 9th1Nov 11: 2,032

Source: the release log, from 30 March to 9 November 2026; tests counted in the code every two weeks

103

production releases, from 30 March to 9 November 2026

I'm the only developer on the project, and a project manager handles priorities with the client. I usually release once a week, plus urgent fixes. In July, with version 2, I wrote the first automated tests: since then they run on every change, and today there are about 2,000.

08 / 08Now

A check rereads closed conversations and flags what's wrong.

Now it also points to the causes. A page collects failed sends and stuck queues, and I'm extending the voice channel.

  • The database only changes through versioned migrations: 221 so far.
  • I confirm production writes one at a time.
Sara T.Conversation closed · reviewed
  1. Agent: So I know how to help: what exactly are you looking for?

  2. Sara: Mostly the timing.

  3. Agent: Sure. And what exactly are you looking for?

    Flagged: question already askedLikely cause: the project's instructions

  4. Sara: I just told you.

Example: conversation and flag are made up

The end

The rest is in the details.

Below is the project README. For questions, or to work on something together, get in touch.

Details

README.md

Anonymised case study: client, data and code are confidential. I don't say who the client is, which vendors it uses or how many leads go through the system. The people and conversations in the slides are made up.

Technical choices

Everything is written in TypeScript, from the server to the interface, with Postgres for the data and Redis for the job queue.

Each project is configured on its own: questions, documents, salespeople's calendars and where the outcome goes, whether that's one of the two lead management systems already connected or a webhook. Team alerts arrive on a messaging channel.

Operators have a board that updates in real time. They can take over a conversation, and the agent pauses in the meantime.

What I learned

On a product that changes every week while clients use it, the biggest risk is breaking what already worked. That is why, since version 2, every change goes through automated tests and every database change through a migration.

Artysan.

Custom software, automation and integrations. From Rome.

© 2026 Samuel Tagliacozzo · Artysan