Skip to content

An Open-Source WhatsApp Sales System for Moroccan Businesses

WhatsApp Automation

By Elhabib Elhab · September 27, 2026 · 10 min read

Ask me about this on WhatsApp
An Open-Source WhatsApp Sales System for Moroccan Businesses

Project status: this is a guide and a reference stack, not a measured client deployment, so no results are reported. Prices and rules were checked on Meta's documentation and vendors' pricing pages on 27 September 2026, and they can change.

In Morocco, a lot of selling already happens in WhatsApp. A traveller asks a riad whether a room is free next weekend. A customer sends a product screenshot and asks "how much?". A patient wants to move an appointment. The channel is not the problem. The problem is that most businesses run it by hand, from one phone, with no system behind it.

Run by hand, it breaks: replies depend on who has the phone, the same questions are typed out every day, and nobody sees which chats became a booking and which were forgotten.

This is the system I use when I plan WhatsApp for a business: its parts, what Meta changes on 1 October 2026, my open-source stack, and the rollout order.

The Five Stages of a WhatsApp Sale

Every sale happens in one chat thread. Everything else brings people into that chat or follows up after it.

  1. Acquire: Instagram or TikTok content, Click-to-WhatsApp ads, a website button, QR codes on tables, flyers and vehicles.
  2. Showcase: a complete business profile and a catalog (services work too), so the answer to "how much?" is already in the chat.
  3. Converse: a fast first reply, one question per message, buttons instead of typing, and a human when needed.
  4. Convert: a quote, then a deposit or payment link or a confirmed cash-on-delivery order, then the practical details.
  5. Retain: labels used as a pipeline, a review request, and re-engagement only to people who opted in.

WhatsApp Business App or Cloud API?

There are three WhatsApps. The personal app has no business tools, which leaves two.

The WhatsApp Business app is free: business profile, catalog, labels, greeting and away messages, quick replies. Meta is adding its own AI agent in some markets; check availability for your number. For a small team on one phone, this is where I start.

The WhatsApp Cloud API is Meta's official platform for more: a shared team inbox, approved templates, automations, campaigns to opted-in contacts, and an AI agent you control. It can be used directly, without a paid middleman. It has rules the app does not. Every template is reviewed, which Meta says can take up to 24 hours, and can be paused if its quality drops. A new business portfolio starts with a messaging limit of 250 unique people per rolling 24 hours, shared by all its phone numbers; business verification is one route to 2,000. And messages are billed.

Move to the API when several people answer one number, or when you need automatic confirmations or your own AI agent.

What Changes on 1 October 2026

"Customer-started chats are free, you only pay for marketing" stops being true for Morocco on 1 October 2026.

First, Meta starts charging for service messages, the free-form replies sent in the 24-hour window after a customer writes. Each one is billed at the market's utility rate, with no volume tiers. Utility templates sent inside an open service window are charged from the same date.

Second, Morocco leaves the "Rest of Africa" group on Meta's rate card and gets its own rates:

Message type (Morocco, USD per message) Until 30 September 2026 From 1 October 2026
Marketing template $0.0225 $0.0414
Utility template $0.004 $0.023
Authentication template $0.004 $0.023
Service reply free $0.023
Any message in the 72-hour free entry point window free free

The last row matters. Every message is free for 72 hours when a customer starts the chat from a Click-to-WhatsApp ad or a Facebook Page call-to-action button and the business replies within 24 hours. From 1 October 2026, those ads are the cheapest way into a conversation.

Meta's own AI agent, the Meta Business Agent, has cost $2.00 per 1 million tokens since 1 August 2026; Meta's example message uses 20,000 to 25,000 tokens, roughly $0.04 to $0.05. It is optional: your own model can do the job.

If you quote WhatsApp work in Morocco, recompute every quote with the new rates.

The Open-Source Stack

Paid WhatsApp platforms charge a subscription on top of Meta's fees. Open source can remove the subscription, not Meta's fees or ad spend. My stack: the Cloud API used directly, Chatwoot as the inbox, Typebot or n8n for flows, and a language model for the agent.

Layer Tool Licence Official API?
Connection WhatsApp Cloud API, direct Meta service Yes
Team inbox, contacts, campaigns Chatwoot MIT, except the enterprise/ folder Yes
Menus and qualification Typebot FSL-1.1-Apache-2.0 (fair source) Yes
Automations and AI agent n8n Sustainable Use License (fair-code) Yes
Language model An LLM API of your choice Depends on the provider n/a

Read the Licences

  • n8n is fair-code, not open source. Its Sustainable Use License lets you build, run and maintain workflows for clients and charge for that work. It does not let you host n8n as a service where clients build or edit their own workflows. I still install it on each client's own server, so the client owns the system.
  • Typebot uses FSL-1.1-Apache-2.0. Building bots for clients is allowed; selling access to your instance or Typebot hosting is not. Each version becomes Apache-2.0 after two years.
  • Chatwoot is MIT except its enterprise/ folder, which includes the Captain AI agent and needs a paid licence.
  • Flowise, a popular AI agent builder, was archived on 13 August 2026. I do not start new work on it.

What It Costs to Run

Entry prices from each pricing page, checked on 27 September 2026 (pages can vary by country):

Option Entry price
Interakt Growth $55 per month
Respond.io Starter $79 per month
WATI Growth $99 per month
Gallabox Basic, billed quarterly $150 per month
Self-hosted on a VPS (4 vCPU, 8 GB RAM, 24-month term) about €5.50 per month

Meta's per-message fees apply in every row. Chatwoot's documentation lists 4 GB of RAM as a minimum, so 8 GB is my floor for the whole stack on one server. Self-hosting also makes someone the support desk: updates, backups and monitoring belong in the price.

Why Not Unofficial WhatsApp Web Tools

Baileys, whatsapp-web.js, WAHA, Whaticket, WPPConnect, Evolution API in Baileys mode and unoapi-cloud drive the WhatsApp Web protocol instead of the Cloud API. They are often sold as "unlimited free messages". The WhatsApp Terms of Service forbid "bulk messaging, auto-messaging, auto-dialing", and several of these projects warn in their own documentation that numbers can be blocked. The number at risk is the client's main business number. unoapi-cloud is the most misleading: it imitates the Cloud API's format while running on WhatsApp Web. I do not build client systems on any of them.

The Rollout, Phase by Phase

Each phase ends with a check the business can see for itself.

Phase 0: Audit

Where leads come from, chats per day, the most-asked questions, how customers pay (card link, transfer, cash on delivery) and who answers, and when. Then decide: Business app or API.

Done when: a one-page audit holds the decision and three baseline numbers from the business's own chats: chats per day, first-reply time, and the share of chats that end in a sale.

Phase 1: Foundation

A dedicated number, a finished profile, a catalog, a label pipeline (New lead, Hot, Deposit, Booked, Done, Review), greeting and away messages, quick replies for the top questions, and a website button and QR codes with a pre-filled message.

Done when: a test customer can find a price, ask a question and get a first reply without anyone touching the phone.

Phase 2: Cloud API

The client creates and owns the Meta business portfolio and adds me as a partner. Then: business verification with the client's documents (which Moroccan documents Meta accepts, I check on each project rather than assume), a Cloud API number, display-name approval, and utility templates first.

Done when: verification is complete, the display name is approved and the first utility templates are approved.

Phase 3: Inbox and Flows

Chatwoot becomes the team inbox with the same labels. A Typebot or n8n qualifier asks one question per message, with buttons. Tourism example: dates, group size, budget, three options, then a human.

Done when: every chat has an owner and a label, and the bot always offers a way to reach a person.

Phase 4: Money Flows

In n8n: booking or order confirmation, cash-on-delivery confirmation, a deposit or payment link, a day-before reminder, pickup details, a review request, and re-engagement to opted-in contacts only.

Done when: each flow has run once on a real order or booking and been checked in the inbox.

Phase 5: AI Agent in Darija and French

Grounded in this order: FAQs, policies (payment, cancellation), catalog, documents, current offers. It collects details, books slots, hands over to a human and labels its replies as AI. A grounded model can still invent answers, so it is tested on real Darija, in Arabic script and Latin letters, and on French before going live.

Done when: it answers a test set of real past questions (I use 30) without inventing a price or a policy.

Phase 6: Traffic

Click-to-WhatsApp ads with a WhatsApp-only destination and a first message built like a landing page, with FAQ buttons. The qualified or paid label goes back to Meta so the ads learn who buys.

Done when: a weekly report shows cost per conversation, cost per booking and block rate.

Moroccan Specifics

  • No WhatsApp Pay. Meta's Payments API documentation covers India and Brazil; Morocco is not listed. Use a payment link from a Moroccan gateway, a bank transfer, or a cash-on-delivery order confirmed with a utility template, which costs $0.023 outside a free window from 1 October 2026.
  • Darija. Understanding Darija comes from the language model, not from Chatwoot, Typebot or n8n, so test your chosen model on real messages.
  • The client owns the assets. The Meta business portfolio, the number and the payment card belong to the business; the developer is a partner. If we part ways, the business keeps everything.
  • Consent under Law 09-08. Morocco's law on personal data protection applies to contact lists. Collect an opt-in before any marketing template, record where and when it came from, and keep those records.

Conclusion

A WhatsApp sales system is an order of work more than a tool: the free app set up properly, the API when a team needs it, flows that handle money, an AI agent once the answers are written down, and traffic last. From 1 October 2026, every reply outside the ad window has a price in Morocco, one more reason to design the conversation instead of improvising it.


Run a riad, tour company, clinic or shop that already sells on WhatsApp? Tell me where your chats come from and who answers them, and I'll tell you, in plain language, which phase I would start with. Talk to me about your WhatsApp setup.

For real, delivered client work rather than prototypes, see case studies. Building something similar? See related services.

Free growth report

See what's costing you customers, and get the fixes

Paste your website. In about two minutes the report reads it, works out what you sell and who buys it, and hands you the exact fixes, your own AI assistant and a 90-day plan.

  • Free
  • About 2 minutes
  • No call needed

Built for any business

  • Restaurants & cafés
  • Clinics & dentists
  • Shops & online stores
  • Hotels & riads
  • Tours & activities
  • Salons & spas
  • Lawyers & accountants
  • Trades & home services