Software Engineering20. August 20269 min read

Chatbots for the Tunisian Market: French, Arabic and Derja Done Right

Tunisian customers write in French, Arabic, derja and Arabizi — often in the same message. Here is how to build a chatbot that understands them, on the channels they actually use.

Von Innovation T Team


A Tunisian customer opens WhatsApp and types: "3aslema, 9adech el prix mte3 el pack pro w famma livraison lel Sahel?" A chatbot configured for French — or even standard Arabic — has no idea what just happened. That one message is why most off-the-shelf chatbots fail in Tunisia, and why building one that works here is a different engineering problem.

Why is a chatbot for Tunisia a three-language problem?

Because your customers genuinely use three written registers — French, Modern Standard Arabic, and derja (Tunisian dialect), the last written in either Arabic script or Arabizi (Latin letters with digits: 3 for ع, 7 for ح, 9 for ق) — and they switch mid-sentence. A bot that handles one register misunderstands a large share of real messages.

Concretely:

  • Code-switching is the norm: "Bonjour, n7eb na3ref les tarifs" mixes French vocabulary into derja grammar — there is no clean language boundary to detect.
  • Spelling is unstandardized: the same derja word appears as "chnowa", "chnoua", "shnowa" and "شنوة". Exact-match keywords are hopeless.
  • Register signals expectations: formal French deserves formal French back; Arabizi expects a relaxed tone.
  • Standard Arabic is not derja: an MSA-only bot sounds like a news broadcast and still misses dialect vocabulary entirely.

Rule one: detect the register per message, not per conversation, and reply in kind.

How do you handle derja and Arabizi in practice?

The practical answer in 2026: use a strong large language model as the understanding layer — leading LLMs now parse derja and Arabizi surprisingly well from exposure to North African web text — then constrain what the bot is allowed to do with strict business logic. You get dialect robustness without betting your business on free-form generation.

The architecture:

  • LLM for understanding: classify intent (price, delivery, complaint, order status) and extract entities (product, city, quantity) from the raw message, whatever the register.
  • Business logic for decisions: prices, stock and delivery rules come from your systems, never from the model's imagination.
  • Tightly-prompted replies: the model drafts the answer in the customer's register, from facts you supplied.

Before building the bot, build a derja test set — fifty real messages from your Messenger history make an honest benchmark:

"9adech ykalfni el shipping lel Kef?"        → intent: delivery_cost, city: Le Kef
"el produit wsel mkasser, chnowa na3mel?"    → intent: complaint_damaged
"Bonjour, vous livrez à Bizerte?"            → intent: delivery_area, city: Bizerte
"عندكم حجم كبير من الموديل هذا؟"              → intent: stock_check, variant: size L

Run every candidate model or vendor against your set and count the misses — a vendor who refuses this test has told you everything.

Which channels come first — and why not your website?

WhatsApp and Facebook Messenger first, Instagram DMs second, your website widget last. That order simply follows where Tunisian customers already message businesses — Meta platforms dominate daily communication, and a chatbot succeeds by joining existing conversations, not by changing customer habits.

Channel by channel:

  • WhatsApp Business API (Cloud API): the serious channel for order updates and after-sales. Note the constraints: template approval for business-initiated messages, the 24-hour window for free-form replies, and per-conversation pricing in foreign currency — verify current Meta pricing before budgeting.
  • Messenger: often the highest raw volume, driven by Facebook page traffic; the API is mature and webhook-friendly.
  • Instagram: matters for fashion, beauty, food and anything visual; same Meta infrastructure, cheap to add once Messenger works.
  • Website chat: worth having for SEO visitors and B2B, but usually a fraction of volume — the last mile, not the start.

One bot brain, many channels: build understanding and business logic once, behind an API, and plug each channel in as a thin adapter.

LLM or rule-based: which approach fits your business?

Use rules for flows where wording is predictable and errors are costly (order status, opening hours, structured forms), and an LLM for understanding messy input and drafting natural replies. In Tunisia the deciding factor is derja: pure rule-based bots degrade badly against dialect spelling variance, so most real systems end up hybrid.

An honest comparison:

  • Rule-based (menus, buttons, keywords): predictable, cheap, auditable, independent of any AI provider — but it fails on free-text derja and every new phrasing needs manual work.
  • LLM-driven: handles all three registers and typos, drafts natural replies, adapts tone — but costs per message, can hallucinate if unconstrained, and needs monitoring.
  • Hybrid (our default recommendation): LLM classifies and extracts; deterministic flows execute; buttons carry structured steps like choosing a delivery governorate.

Pure rules still win in two cases: very low volume (under ~10 conversations a day, where a human is simply better) and regulated replies that must be pre-approved verbatim. For the deeper engineering of guardrails and tool use, see our guide to building AI agents for business; this post stays on the Tunisian specifics.

How do you connect the bot to the tools you already use?

A chatbot that cannot check stock or record an order is a fancy FAQ. Plan the integration layer from day one: most Tunisian SMEs run some mix of Odoo or Sage, Excel or Google Sheets, and a WooCommerce or custom web shop — all connectable, with effort ranging from an afternoon to a few weeks.

Integrations, easiest first:

  • Google Sheets / Excel: a shared sheet for orders or leads is a legitimate first integration — unglamorous, immediate, already mastered by your team.
  • E-commerce platform: catalog, stock and order status pulled live, so the bot answers "famma stock?" with today's truth.
  • Odoo / ERP: customer lookup, order creation, invoice status. Budget real engineering time — ERP integrations are where timelines slip.
  • Human handoff: route to a shared team inbox with full context — the most important integration of all.
  • Payments: most Tunisian flows still end in cash on delivery or a transfer reference; if you take online payment, hand off to your existing payment page rather than processing inside chat.

Data caution: conversations contain names, phones and addresses — personal data under Tunisian law overseen by the INPDP. Minimize what reaches foreign AI APIs, define retention, and secure your webhooks; ANCS guidance on internet-facing services applies. Our data protection checklist for SMBs walks through the basics.

How do you keep quality under control after launch?

Treat the bot like a junior employee on probation: give it a narrow scope, review its conversations weekly, and make escalation to a human effortless. Quality control is not a launch task — it is the operating routine that decides whether the bot builds or burns customer trust.

The control loop:

  • Confidence thresholds: when classification is uncertain, the bot asks a clarifying question or hands off — it never guesses at prices or commitments.
  • Instant human takeover: a customer typing "n7eb nkalem 3abd" (I want a human), in any register, must reach one fast, transcript attached.
  • Weekly transcript review: read 20–30 conversations, tag failures, feed fixes back into prompts, flows and the derja test set.
  • Hard guardrails: never invent discounts, never confirm unchecked stock, never argue with an angry customer — angry goes straight to a person.
  • Measure what matters: containment rate, handoff time, and accuracy on your test set — not vanity message counts.

What does a multilingual chatbot cost in Tunisia?

As hedged orders of magnitude: a scoped WhatsApp/Messenger bot with LLM understanding and one or two integrations typically runs 6,000–25,000 TND to build, plus monthly running costs of generally 80–400 TND (LLM usage, hosting, WhatsApp fees) at SME volumes. Deep ERP integration or custom flows push the build higher.

Where the money actually goes:

  • Understanding layer and derja testing: the differentiating work — prompts, test sets, register mirroring.
  • Channel plumbing: Meta business verification, webhooks, template approvals. Tedious but bounded.
  • Integrations: the biggest variable; a Sheets integration is trivial, an ERP one is not.
  • Foreign-currency costs: LLM APIs and WhatsApp fees are billed abroad; Tunisian companies generally pay via the capped international payment mechanisms under BCT exchange regulations — confirm current ceilings with your bank.

A rational rollout: pilot on Messenger with your top 10 intents, measure containment for a month, then add WhatsApp and deeper integrations.

How Innovation T can help

Innovation T builds customer-service automation for the Tunisian market from Sousse: trilingual understanding tested on real derja and Arabizi messages, WhatsApp and Messenger deployment, integration with Odoo, e-commerce platforms or spreadsheets, and human-handoff design that keeps your team in control. We scope in dinars and hand over transcripts, metrics and test sets — not a black box.

Want a bot your customers can write to in derja? Contact our team and bring 50 real messages — we will show you what is possible.

FAQ

Can a chatbot really understand Tunisian derja and Arabizi?

Yes, with the right architecture. Leading large language models now parse derja in both Arabic script and Arabizi well enough for intent classification and entity extraction, thanks to training on North African web text. Accuracy is not perfect — so test against real messages from your own history, and add confidence thresholds with human handoff for uncertain cases.

Should the bot reply in derja too, or stick to French?

Mirror the customer. Formal French gets formal French; derja or Arabizi gets a relaxed derja-flavored reply that feels natural and builds trust. Many Tunisian businesses choose French for written commitments (quotes, order confirmations) and mirrored register for conversation. Decide the policy explicitly and encode it — do not leave tone to chance.

Do I need the official WhatsApp Business API, or is the free app enough?

The free WhatsApp Business app works for a solo operation but cannot connect to a chatbot or your systems. Automation requires the WhatsApp Business (Cloud) API: Meta business verification, approved message templates, and per-conversation fees billed in foreign currency. For most SMEs the sensible path is piloting on Messenger first, then adding WhatsApp once volume justifies the overhead.

What happens when the bot does not understand a message?

A well-built bot fails gracefully: it asks one clarifying question, and if still uncertain, hands the conversation to a human with the full transcript attached — ideally within your team's normal response time. The failure mode to refuse is silent guessing, especially on prices, stock or delivery promises. Make escalation behavior part of your acceptance tests before launch.

Is customer conversation data safe with an LLM-based bot?

It is manageable, not automatic. Conversations contain personal data — names, phones, addresses — governed by Tunisian data-protection law under the INPDP. Good practice: send the AI provider only what understanding requires, strip identifiers where possible, define retention periods, secure your webhooks. Verify your obligations with the INPDP, and put the commitments in your vendor contract.

#chatbot#derja#WhatsApp Business#customer service#NLP#Tunisia

Bereit, mit Innovation T zu bauen?

Ob Sicherheit, Wachstum oder Engineering, unser Team hilft Ihnen, es gut umzusetzen.