Welcome to Duhbi
Duhbi is a structured order-intake platform built on the official WhatsApp Business Platform. This documentation covers everything from your first setup to advanced configuration, training, and compliance.
What Duhbi does
When a customer messages your WhatsApp number, Duhbi runs a fixed 5-step sales workflow — greeting, qualifying, collecting delivery details, confirming the order, and following up. Every step happens automatically, in the customer's language, 24 hours a day.
Unlike generic chatbots, Duhbi is a finite-state workflow. It does not improvise or go off-topic. Every conversation follows the same proven funnel, which means consistent order rates and no surprises.
Quick navigation
How it works under the hood
Every inbound WhatsApp message passes through a message queue that batches rapid messages from the same sender. The workflow engine then processes the batch in a single pass, determines the current stage of the conversation, and generates a contextually correct reply.
Duhbi never stores payment information and never connects to your bank. It collects only what's needed to take a COD order: name, phone number, city, delivery address, and product details.
Quickstart — 10 minutes
From a blank account to your first automated order confirmation. Follow these steps in order.
Create your account
Go to duhbi.com/signup and sign up with Google or email. You'll land on the onboarding wizard automatically.
Connect your WhatsApp number
In the Connection page, click "Connect via Meta". A Meta popup will appear — select your Facebook Business, create a WhatsApp Business Account (WABA), add your number, and verify via OTP. Takes about 3 minutes.
Add your first product
Go to Catalog → Add product. Enter the product name, price, and at least 3 keywords customers might use (e.g. "sneakers", "chaussures", "جدي"). Add a description and image URL if you have them.
Set your delivery fees
In Settings → Delivery fees, add per-city fees or a flat national rate. This is injected automatically into the workflow when a customer gives their city.
Send yourself a test message
Message your connected WhatsApp number from your personal phone. You should get an automatic reply within 18 seconds. If nothing arrives within 60 seconds, check your WhatsApp connection status in the dashboard.
Link your Google Sheet (optional but recommended)
In Settings → Google Sheets, paste your Sheet ID and tab name. Every confirmed order will be logged automatically with customer name, phone, city, items, price, and timestamp.
Connect WhatsApp
Duhbi connects to your WhatsApp number via Meta's official Embedded Signup flow. Your number stays yours — Duhbi just handles the conversations on your behalf.
Prerequisites
- A Facebook Business account (personal accounts won't work)
- A phone number not currently registered on WhatsApp — or one you're willing to migrate. The number can be a Moroccan mobile (06xx, 07xx) or a landline.
- Access to receive an OTP on that number (SMS or voice call)
Embedded Signup step by step
Open Connection page
In your Duhbi dashboard, go to Connection in the sidebar.
Click "Connect via Meta"
A Meta-hosted popup appears. Log in with your Facebook account that has admin access to your Facebook Page.
Create or select a WABA
Select an existing WhatsApp Business Account or create a new one. Enter your business display name — this is what customers see in WhatsApp.
Add and verify your number
Enter your phone number, choose SMS or voice OTP, enter the code. Meta registers the number to your WABA.
Done
Duhbi stores your credentials securely and your Connection page shows Connected. The workflow is immediately active.
Connection status indicators
| Status | Meaning | Action needed |
|---|---|---|
| Connected | WhatsApp session is live and the workflow is active | None |
| Disconnected | Session heartbeat lost — bot is offline | Go to Connection page and reconnect |
| Pending | Embedded Signup in progress | Complete the Meta flow |
The sales workflow
Duhbi runs a fixed 5-stage funnel for every conversation. Understanding these stages helps you configure the workflow correctly and interpret what you see in the Inbox.
The 5 stages
| Stage | What happens | Moves to next when… |
|---|---|---|
| Greeting | Duhbi opens with a warm, language-matched greeting and invites the customer to describe what they're looking for | Customer mentions a product or intent |
| Qualifying | Identifies the product from the customer's message using keywords, confirms it with price and availability | Product is confirmed and customer accepts the price |
| Collecting | Asks for missing delivery fields — name, phone, city, size/color if applicable — one by one, never all at once | All required fields collected |
| Confirming | Presents a summary of the order and waits for explicit confirmation. Sends the confirmation message and reference number. | Customer confirms |
| Done | Order is logged to Supabase, synced to Google Sheets, owner is notified. Post-order message sent if configured. | — |
Escalation
When Duhbi encounters something it cannot handle — an off-topic question, an unknown city, or a customer expressing strong dissatisfaction — it escalates the conversation. This means:
- The conversation is marked Escalated in your Inbox
- You receive a WhatsApp alert on your owner number
- The workflow pauses — no more automatic replies until you take over or mark it resolved
- You can reply directly to the owner alert message to send a WhatsApp to that customer
Human takeover
You can take over any conversation at any time from the Inbox. Toggle the Human mode switch on any conversation — Duhbi stops replying and you type manually. Toggle it off to hand back to the workflow.
Product catalog
The catalog is how Duhbi knows what you sell. Every product you add is available to the workflow — it matches customer messages to products using keywords, then uses your product config to complete the order.
Product fields
| Field | Required | Notes |
|---|---|---|
| Name | Required | The product name shown to customers in confirmation messages |
| Price | Required | Base price in your local currency (DH, €, $) |
| Keywords | Required | Words or phrases customers might use. At least 3. Comma-separated. Include French and Arabic/Darija variants. |
| Description | Optional | Used by the workflow to answer product questions |
| Image URL | Optional | Sent to customer when they ask about the product |
| Sale price | Optional | If set, overrides the base price and triggers promo language |
| Sale label | Optional | E.g. "-30%" shown alongside the sale price |
| Free shipping | Optional | Toggle — if on, delivery fee is waived for this product |
| Variants | Optional | Define required variants (size, color) — workflow will ask for them before confirming |
| Qualifying questions | Optional | Extra questions the workflow asks before confirming this specific product |
| Objection scripts | Optional | Pre-written responses to common objections about this product (price too high, etc.) |
Keywords — the most important field
Keywords are how Duhbi identifies which product a customer is asking about. A customer saying "bgit les sneakers noires" will match a product with the keyword "sneakers". Add every variation you can think of:
- French: sneakers, chaussures, basket
- Darija: sniker, sbadel, jdway
- Arabic: حذاء, أحذية رياضية
- Brand names or model numbers if relevant
Languages & Darija
Duhbi is built for multilingual e-commerce. It detects the customer's language from their first message and replies in kind — including natural Darija code-switching with French.
Supported languages
| Language | Script | Notes |
|---|---|---|
| Moroccan Darija | Latin (Arabizi) + Arabic script | Primary language for Moroccan sellers. Handles ma…sh negation, ka- prefix, wach questions, French code-switching. |
| French | Latin | Full support. Preferred for formal or professional tone. |
| Modern Standard Arabic | Arabic | Used when customer writes in formal Arabic script |
| English | Latin | Full support for international sellers |
Darija code-switching
Natural Moroccan Darija in e-commerce mixes freely with French. A customer might write: "bgit les sneakers noires, wach kayna livraison gratuite?" — Duhbi understands this natively and replies in the same mixed register.
Duhbi's default language can be set per-business in Settings. If a customer writes in a different language, the workflow switches to match them automatically.
Training for your dialect
If your customer base uses specific regional vocabulary (Tangier, Marrakech, Casablanca dialect differences), you can teach the workflow using the Training section — adding your own example conversations so the workflow mirrors how your customers actually talk. See Training the workflow.
Lead scoring & tags
Duhbi automatically scores and tags every customer based on their conversation behaviour. This lets you prioritize your attention and target campaigns to the right people.
Lead scores
| Score | Meaning | Typical behaviour |
|---|---|---|
| Hot | High purchase intent, high engagement | Asked about specific product, gave delivery details, or placed an order before |
| Warm | Interested but not committed | Asked about price or delivery but didn't complete the order |
| Cold | Low engagement or early-stage inquiry | Just browsing, asked a generic question, no follow-up |
Automatic tags
Tags are applied automatically based on conversation patterns. You can also add tags manually from the Pipeline view.
- VIP — repeat buyer with multiple confirmed orders
- Price-sensitive — customer negotiated price or asked about discounts
- Objection — customer raised a specific objection during the workflow
- Escalated — conversation was escalated to a human at some point
- Abandoned — started the workflow but didn't complete an order, went silent for 48h+
Using scores in campaigns
When creating a broadcast campaign, you can filter recipients by score and tag. For example: send a re-engagement offer only to Warm leads tagged Price-sensitive. See Broadcast campaigns.
Orders & COD flow
Duhbi is built specifically for the COD (Cash on Delivery) model dominant in Moroccan and North African e-commerce. Every order goes through a consistent confirmation flow before being logged.
What triggers an order
An order is created when all three required delivery fields are collected and the customer explicitly confirms:
- Name — the customer's full name for the delivery slip
- Phone — contact number for the delivery driver
- City — used to calculate the delivery fee
Address is optional — for COD, the delivery company typically calls the customer before arrival, so city is sufficient for dispatch.
Order statuses
| Status | Meaning |
|---|---|
| New | Order confirmed by the workflow, not yet reviewed by you |
| Confirmed | You've reviewed and confirmed it for dispatch |
| Shipped | Handed to the delivery company |
| Delivered | Customer received the package |
| Cancelled | Cancelled before or after dispatch |
When you update an order status from the dashboard, Duhbi automatically sends a WhatsApp notification to the customer with the new status.
Multi-product cart
Customers can order multiple products in a single conversation. Duhbi tracks each item (product, quantity, size, color) and logs the full cart to your Google Sheet — one row per item, all linked by the same order reference.
Confirmations & follow-ups
Duhbi sends automatic messages at key moments in the order lifecycle — and lets you trigger custom follow-ups from the dashboard at any time.
Automatic messages
| Trigger | Message sent to customer |
|---|---|
| Order confirmed | Confirmation summary with order reference number, total, and delivery reminder ("be available for the driver's call") |
| Post-order (optional) | A custom message you configure in Settings, sent ~1 second after the confirmation — e.g. a thank you, a loyalty offer, or a care instruction |
| Status → Shipped | "Your order is on the way! The driver will call before arrival." |
| Status → Delivered | "Your order has been delivered. Thank you for your purchase!" |
| Status → Cancelled | Cancellation acknowledgment with your support contact |
Configuring your post-order message
In Settings → Post-order message, write any message you want sent after every order confirmation. This is a great place for:
- A warm thank you in Darija
- A care/usage instruction for the product
- A referral offer ("share with a friend, get 10% off your next order")
- Your social media handles
Manual follow-up from the dashboard
From any conversation in the Inbox, you can type and send a message manually at any time — even if the workflow is in Human mode. Use this for:
- Sending a specific shipping update with a tracking number
- Answering a post-delivery question
- Re-engaging a customer who abandoned their order
Google Sheets sync
Every confirmed order is automatically written to your Google Sheet — no copy-pasting, no manual entry. Your sheet becomes a live order log.
Setup
Create your sheet
Create a new Google Sheet and name the first tab whatever you like (e.g. "Orders").
Share with Duhbi
Share the sheet with Duhbi's service account email (found in Settings → Google Sheets). Give it Editor access.
Paste your Sheet ID
Copy the ID from your sheet URL: docs.google.com/spreadsheets/d/SHEET_ID/edit. Paste it into Settings along with your tab name.
What gets logged
Each confirmed order adds one or more rows to your sheet with:
- Order reference number
- Customer name, phone, city, address
- Product name, quantity, size, color
- Unit price, delivery fee, total
- Order date and time
- Order status (updated when you change it in the dashboard)
Retry queue
If a sheet write fails (network error, quota limit), Duhbi queues it for automatic retry. After 3 failed attempts, you receive a WhatsApp alert so you can resync manually from the dashboard.
Broadcast campaigns
Send a WhatsApp message to a targeted list of your leads — filtered by score and tag. Campaigns are rate-limited automatically to stay within WhatsApp's anti-spam guidelines.
Creating a campaign
Go to Campaigns
In the sidebar, click Campaigns then New campaign.
Write your message
Keep it under 1,000 characters. Write it the way you'd write a WhatsApp message — natural, direct. Avoid overly salesy language to reduce block rates.
Select your audience
Filter by lead score (Hot / Warm / Cold) and tags (VIP, price-sensitive, etc.). The count of matching leads updates in real time.
Launch
Click Send. Duhbi queues one message per recipient, staggered 4–10 seconds apart. You can watch progress in the campaign detail view.
Best practices
- Target Warm leads with a limited-time promo — they already know your product
- Re-engage Cold leads with a new product announcement or seasonal offer
- Send to Hot leads tagged Abandoned with a personal follow-up message
- Avoid blasting your entire list with the same message — personalization by segment dramatically improves reply rates
Owner alerts & morning debrief
Duhbi keeps you informed through your WhatsApp — no need to open the dashboard to know what's happening in your store.
Alert types
| Alert | When it fires | What to do |
|---|---|---|
| New order | Every time an order is confirmed | Reply to the message to send a WhatsApp to that customer |
| Escalation | When the workflow escalates a conversation | Reply to reach the customer directly, or open Inbox to take over |
| Hot lead silent | When a hot lead hasn't replied for 4+ hours | Decide whether to intervene manually |
| Sheet sync failure | After 3 failed Google Sheets write attempts | Check sheet permissions, then resync from dashboard |
| Morning debrief | Every day at 8am (Casablanca time) | Review overnight orders, hot leads, and pending training reviews |
Configuring alert preferences
In Settings → Notification preferences, you can toggle each alert type on or off. All alerts are on by default. You can also set a different notification phone number — useful if you want alerts on a personal number while the bot runs on a business number.
Replying to alerts
Owner alert messages are tagged internally. When you reply to a new-order alert, your reply is routed to that specific customer's WhatsApp conversation — it doesn't go to a generic inbox. This lets you run your store entirely from your phone.
Training the workflow
The workflow improves when you teach it. Add example conversations that show how customers talk about your products and how you want the workflow to respond.
What training does
Every time the workflow generates a reply, it searches your training library for relevant examples and injects them as context. The more relevant examples you have, the more accurately the workflow matches your tone, vocabulary, and sales style.
Adding examples manually
Go to Training
In the sidebar, click Training.
Add an example
Enter the customer message and the ideal workflow response. Tag it with the stage (greeting, qualifying, collecting, confirming) and the language/script.
Save
The example is immediately active — the next conversation will use it if relevant.
Testing your training
Use the Test button in the Training section to send a test customer message and see what the workflow would reply — with or without your examples. This lets you validate new examples before they go live.
WhatsApp chat import
If you have existing WhatsApp conversations with customers, you can import them directly as training data. Duhbi extracts the best Q&A pairs automatically.
How to export a WhatsApp chat
Open the conversation in WhatsApp
Tap the three dots (⋯) → More → Export chat → Without media.
Save the .txt file
WhatsApp exports a plain text file with timestamps in DD/MM/YYYY format. Make sure the file is from a real sales conversation.
Upload in Duhbi
Go to Training → Import from WhatsApp and upload the .txt file. Duhbi will parse it and show you which pairs it extracted.
Scoring and approval
Each extracted pair is scored automatically:
- Score ≥ 50 — auto-approved and added to your training library immediately
- Score 30–49 — added to your review queue. You approve or reject them from the Training section.
- Score < 30 — skipped. Too short, off-topic, or not useful as a training example.
Self-learning pipeline
Duhbi improves itself over time by reviewing its own conversations every night and identifying the best Q&A pairs to add to the training library.
How it works
Every conversation is logged
Each workflow turn — the customer message and the workflow reply — is stored with metadata: stage, outcome, language, confidence.
Nightly scoring at 6am UTC
Duhbi scores each turn based on outcome (did the conversation lead to an order?), reply quality, and stage relevance. High-scoring turns are queued for your review.
You review and approve
Your morning debrief includes a count of pending reviews. Go to Training → Review queue to see the candidates. Edit the reply if needed, then approve.
Approved → training library
Approved examples are immediately added to your training library and used in the next conversation.
Near-duplicate detection
If a very similar Q&A pair already exists in the queue, Duhbi increments a "times seen" counter instead of adding a duplicate. This surfaces the most common customer messages so you prioritize the highest-impact training first.
Business settings
Configure your store's identity, workflow behaviour, delivery fees, working hours, and notification preferences from the Settings page.
Key settings
| Setting | What it does |
|---|---|
| Business name | Displayed in confirmation messages and the dashboard header |
| Default language | Fallback language when the customer's language can't be detected |
| System prompt | Custom instructions for the workflow — add your brand voice, forbidden topics, or special rules |
| Working hours | Hours during which the workflow takes orders. Outside these hours, the away message is sent instead. |
| Away message | Sent when a customer messages outside working hours |
| Post-order message | Sent automatically ~1 second after every order confirmation |
| Delivery fees | Per-city or flat fee, injected into the workflow when the customer gives their city |
| Google Sheet ID | The ID of the sheet where orders are logged |
| Google Sheet tab | The specific tab within the sheet |
| Owner phone | The number that receives WhatsApp alerts |
| Notification preferences | Toggle individual alert types on/off |
System prompt tips
The system prompt lets you customize the workflow's personality. Keep it focused and specific:
- Do: "Always close with 'Barak Allahu fik' when confirming an order."
- Do: "Never mention competitor brands even if the customer asks."
- Do: "For size questions, always mention that we recommend going one size up."
- Don't: Write vague instructions like "be helpful and friendly" — this is already the default.
Meta compliance
Duhbi is built on Meta's official WhatsApp Business Platform. This section explains what that means for you as a seller, and what you need to know to stay compliant.
What "official API" means for you
- No ban risk — your number is registered with Meta, not attached to an unofficial bridge. Meta cannot ban you for using Duhbi.
- Your own WABA — you own your WhatsApp Business Account. If you ever stop using Duhbi, your number stays yours.
- Quality rating — Meta gives each WABA a quality rating (Green / Yellow / Red) based on customer feedback. You can see your rating in the dashboard.
- Messaging limits — new WABAs start with a daily limit of 250 conversations. This increases automatically as you use the platform and maintain a Green rating.
What you must not do
- Send unsolicited messages to people who haven't contacted you first (this will drop your quality rating)
- Use campaigns to send spam or misleading promotions
- Sell products prohibited by WhatsApp Commerce Policy (alcohol, tobacco, weapons, adult content, etc.)
Contact & abuse reporting
If you believe someone is misusing the Duhbi platform, report it to abuse@duhbi.com. For compliance questions, contact legal@duhbi.com.