AI, Agents & Automation

An AI Agent on WhatsApp for After-Sales Service: What We Learned

Architecture, Darija and French, handing over to a human, measuring satisfaction: our hands-on experience building WhatsApp AI agents for after-sales service, and the five lessons we took away.

S

By Sudo System Team

AI Agents & Automation Practice

22/04/2026 7 min read 337 views
An AI Agent on WhatsApp for After-Sales Service: What We Learned

In Morocco, your customers don't email you. They send you a WhatsApp voice note at 10 p.m., in Darija, to ask where their order is or why their machine is making a strange noise. In many companies, after-sales on WhatsApp has become a phone that never stops buzzing, handled from the personal smartphones of two or three employees. We have built several AI agents to take over part of that load. Some things worked right away; others took several iterations. Here is what we learned, without the gloss.

The starting point: an after-sales team drowning in repetitive questions

Take a case we see often: a home appliance distributor selling both directly and through resellers, handling a few hundred WhatsApp conversations a day. When we analyse a sample of these exchanges, the pattern is almost always the same. A large majority of requests revolve around five or six topics: order or delivery tracking, warranty terms, service centre addresses and opening hours, booking a technician, and sending an invoice or a user manual. The rest, a minority but time-consuming, involves complex breakdowns, complaints and disputes.

That split is what makes an AI agent worthwhile. The goal is not to replace the team, but to take the repetitive questions off its plate so it can focus on those that require genuine human judgement. If your flow looks more like a series of unique, technical cases, an agent will add much less value, and we will tell you so.

The architecture we use

The design is deliberately lean. Messages come in through the official WhatsApp Business API, via Meta or an approved provider; unofficial solutions put the number at risk of being banned outright, which no business can afford. An orchestrator, often n8n or a small Python service depending on complexity, receives each message, identifies the customer from their number and decides what happens next.

Smartphone showing a WhatsApp after-sales conversation between a customer and an AI agent, with a ticket dashboard in the background
The customer stays on WhatsApp; behind the scenes, the agent checks the knowledge base and Odoo before replying.

The orchestrator then calls a large language model, which never answers "from memory". It relies on a knowledge base queried through RAG (retrieval-augmented generation): product sheets, warranty terms, procedures and answers approved by the after-sales team. For anything related to an order, the agent reads from Odoo: order status in Sales, delivery order in Inventory, existing ticket in Helpdesk. When a request needs follow-up, it creates a Helpdesk ticket itself, with a summary of the conversation.

ComponentRoleTypical choice
WhatsApp Business APIReceiving and sending messages, approved message templatesMeta or an official approved provider
OrchestratorRouting, customer identification, escalation rules, loggingn8n or a Python service
Language model (LLM)Understanding the request and drafting the replyHosted model, chosen for cost and multilingual quality
Knowledge base (RAG)Single source of approved answersValidated, indexed after-sales documents
OdooOrders, deliveries, tickets, customer historySales, Inventory, Helpdesk

Darija, French, Arabic, English: multilingual support in practice

The same customer might start in French, switch to Darija written in Latin script, then send a voice note. Recent models understand Darija surprisingly well, including the style that uses digits (3, 7, 9) for certain sounds. Writing is trickier: a Darija reply that sounds too "translated" rings false and erodes trust. Our rule is simple. The agent replies in the customer's language; in Darija it favours short sentences, and it gives precise information (amounts, lead times, warranty terms) in unambiguous wording, even if that means writing it in French or Modern Standard Arabic.

Voice notes are transcribed before processing. Darija transcription has improved a lot but remains fragile with background noise. When confidence is low, the agent politely asks the customer to clarify in writing rather than guessing. Here is a typical exchange, the kind we aim for:

Customer: Salam, la commande dyali mazal ma wslatch, drtha nhar l'jem3a. (Hello, my order still hasn't arrived, I placed it on Friday.)

Agent: Wa alaykum salam! Let me check right away. Your order no. 4821 left our warehouse yesterday and is with the carrier. Delivery is expected tomorrow before 6 p.m. Bghiti nsifet lik le lien de suivi? (Would you like me to send you the tracking link?)

Customer: Iyeh 3afak. W ila ma jatch ghda? (Yes, please. And if it doesn't arrive tomorrow?)

Agent: Here is the tracking link. If it hasn't arrived by tomorrow evening, just type "advisor" and someone from our team will pick up your case as a priority, without you having to explain everything again.

Escalation, brand voice and sensitive cases

Always a way out to a human

Being able to talk to a person is not optional; it is a requirement. The agent escalates in four situations: an explicit request from the customer, clear frustration, a financial matter (refund, credit note, dispute) and no progress after two exchanges. It then passes a structured summary to the shared inbox, and the advisor picks up the conversation without making the customer repeat themselves. Nothing is more irritating than a bot going round in circles.

Brand voice is written down like a document

Formal or informal address, greetings, level of formality, what the agent never promises: all of this is written down, with examples of good and bad replies. We review it with the after-sales manager the way you would review a charter. It is this document, far more than the choice of model, that makes customers feel they are talking to your company and not to a generic tool.

Sensitive cases

The agent never decides on a refund or a goodwill gesture. It never asks for banking details. Any mention of a safety risk (smell of gas, sparks, overheating) triggers immediate safety instructions and priority escalation. On personal data, we apply the principles of Morocco's Law 09-08: informing the customer, minimising the data kept and setting a defined retention period.

Measuring: what we track every week

An agent that isn't measured drifts without anyone noticing. We track the autonomous resolution rate, meaning conversations closed without human intervention and without the customer getting back in touch within 48 hours. We also track the escalation rate, time to first response and a satisfaction score collected through a single question at the end of the exchange. Finally, a human reviews a sample of conversations every week to spot inaccurate or clumsy answers. On a well-defined scope, it is realistic to aim for a significant share of requests, often around half, to be handled end to end by the agent after a few weeks of tuning. But that figure depends above all on the nature of your flow.

The five lessons we keep

After several projects, the same principles always make the difference:

  1. Start small. Two or three contact reasons handled well beat an agent that claims to know everything. Order tracking is often the best place to start.
  2. The knowledge base matters more than the model. An up-to-date, clear FAQ approved by the after-sales team improves answers far more than switching LLMs.
  3. Always a "talk to a human" button. Visible, simple and actually working, including in the evening with a commitment to follow up the next day.
  4. Log everything. Every message, every document consulted, every call to Odoo. Without logs, you can neither understand an error nor explain it to a customer.
  5. Iterate every week. Thirty minutes reviewing failed conversations, then fixes to the knowledge base or instructions. That rhythm is what makes the agent improve.

Key takeaway — A good after-sales AI agent is not the one that answers everything. It is the one that answers correctly within a clear scope, knows when to hand over to a human and improves every week thanks to logged and reviewed conversations.

Where to start

Before choosing any technology, export two or three hundred recent WhatsApp conversations and sort them by contact reason. If three or four reasons account for most of the volume and the answers already exist somewhere, in procedures or in Odoo, you have an excellent candidate for a first agent that can be deployed in a few weeks. If you would like an outside perspective on that analysis, the Sudo System team can run it with you and tell you honestly whether an agent makes sense in your case.

Share this article LinkedIn X Facebook WhatsApp

Related Articles

Comments & Questions (0)

Leave a comment