4.1 — Restaurant Order Bot — Menu, Cart & Payment on WhatsApp
Restaurant Order Bot — Menu, Cart & Payment on WhatsApp
Pakistan has over 150,000 restaurants, and fewer than 3% of them have a working online ordering system. The rest rely on phone calls, walk-ins, and informal WhatsApp conversations where staff manually type menu items, confirm orders, and chase payments. A Lahore BBQ restaurant reported spending 4 hours per day managing WhatsApp orders manually during peak hours — turning away business because the phone was always busy. This lesson builds the complete restaurant order bot that handles menu browsing, cart management, order confirmation, and JazzCash payment — all on WhatsApp, fully automated.
Section 1: Designing the Restaurant Bot Flow
Before writing a single template, map the complete conversation journey a customer will take:
Customer sends "Hi" or "Menu"
↓
Bot sends Welcome + Categories menu
(Starters / Main Course / Drinks / Desserts)
↓
Customer selects category (e.g., "1" for Starters)
↓
Bot sends items in that category with prices in PKR
↓
Customer types item number to add to cart
↓
Bot confirms: "Added! Your cart: [items + total PKR]"
Customer can: Add more (type number) | View cart ("C") | Checkout ("O")
↓
Customer types "O" to order
↓
Bot asks for: Name, Address, Phone (if not known)
↓
Bot sends order summary + payment options
(JazzCash 0312-XXXXXXX | EasyPaisa 0300-XXXXXXX | Cash on delivery)
↓
Customer sends payment screenshot or selects COD
↓
Bot confirms order + sends tracking number
↓
Restaurant owner gets WhatsApp notification:
"New Order #1234 — [Items] — PKR [Total] — [Address]"
Section 2: Building with WATI
WATI is the most popular WhatsApp automation platform in Pakistan. Here's how to build the restaurant bot:
Step 1 — Set Up the Menu Structure: In WATI's dashboard, go to "Chatbots" → "Create New Chatbot." Create a keyword trigger: when any message contains "menu," "hi," "hello," "order," or "start," fire the welcome flow.
Welcome Message Template:
Assalam o Alaikum! 🍽️ Welcome to *{{restaurant_name}}*
Please choose a category:
1️⃣ Starters
2️⃣ Main Course — Karahi, Biryani, Daal
3️⃣ Grills & BBQ
4️⃣ Drinks & Fresh Juice
5️⃣ Desserts
Reply with the number to browse. Type *HELP* anytime.
Step 2 — Category → Items Flow: For each category, create a reply flow. When customer replies "2" (Main Course):
*Main Course Menu*
1. Mutton Karahi (serves 2-3) — PKR 1,800
2. Chicken Karahi (serves 2-3) — PKR 1,200
3. Special Biryani (full) — PKR 950
4. Daal Makhni — PKR 450
5. Palak Gosht (serves 2) — PKR 1,100
Type the number to add to cart.
Type *BACK* to see categories.
Type *C* to view cart.
Step 3 — Cart Management: WATI supports session variables. Store the cart as a JSON string in the customer's session:
// WATI webhook or Zapier/n8n handler:
cart = JSON.parse(session.get("cart") || "[]");
cart.push({item: selectedItem, price: itemPrice, qty: 1});
session.set("cart", JSON.stringify(cart));
Step 4 — Payment Integration: When customer checks out, send payment options:
*Order Summary*
{{cart_items_list}}
*Subtotal: PKR {{subtotal}}*
Delivery: PKR 150
*Total: PKR {{total}}*
Payment Options:
💚 *JazzCash:* Send to 0312-XXXXXXX (Account: {{restaurant_name}})
🔵 *EasyPaisa:* Send to 0300-XXXXXXX
💵 *Cash on Delivery:* Available for orders under PKR 3,000
After payment, send screenshot here. For COD, reply *COD*.
Step 5 — Restaurant Notification: Use an n8n webhook or WATI's Zapier integration to send the restaurant owner a WhatsApp notification for every confirmed order with all order details, customer name, and delivery address.
Section 3: Menu Data Management
For easy menu updates without touching the chatbot config, store your menu in Google Sheets. Build an n8n workflow that:
- Reads the menu from Google Sheets every hour
- Updates the WATI chatbot templates via WATI's API if any item/price changed
- Sends you a WhatsApp confirmation: "Menu updated: Mutton Karahi price changed to PKR 1,900"
This means restaurant staff can update prices in Google Sheets, and the WhatsApp bot updates automatically — no technical knowledge required.
Section 4: n8n Workflow Architecture
Google Sheets (Menu DB)
│
▼ (every 1 hour)
┌───────────────────┐
│ n8n Scheduler │
│ - Read Sheet │
│ - Compare prices │
└────────┬──────────┘
│ if changed
▼
┌───────────────────┐ ┌──────────────────────┐
│ WATI API call │────►│ Update bot templates │
│ POST /templates │ │ (new prices in PKR) │
└────────┬──────────┘ └──────────────────────┘
│
▼
┌───────────────────┐
│ WhatsApp notify │
│ to restaurant │
│ owner │
└───────────────────┘
Customer Order Flow (real-time):
Customer → WATI Bot → n8n webhook → Google Sheets (order log)
→ WhatsApp notify to owner
→ Auto-reply with order #
Section 5: Sample n8n Order Processing Node
# Python equivalent of n8n's function node for order processing
import json
from datetime import datetime
def process_order(webhook_data: dict) -> dict:
"""Process incoming WhatsApp order from WATI webhook"""
customer_phone = webhook_data["contact"]["whatsapp_number"]
cart_json = webhook_data["session_variables"].get("cart", "[]")
cart = json.loads(cart_json)
# Calculate totals
subtotal = sum(item["price"] * item["qty"] for item in cart)
delivery_fee = 150 if subtotal < 3000 else 0 # Free delivery over PKR 3,000
total = subtotal + delivery_fee
# Build order record
order = {
"order_id": f"ORD-{datetime.now().strftime('%Y%m%d%H%M%S')}",
"customer_phone": customer_phone,
"items": cart,
"subtotal_pkr": subtotal,
"delivery_pkr": delivery_fee,
"total_pkr": total,
"status": "pending_payment",
"timestamp": datetime.now().isoformat()
}
return order
# Expected output:
# {
# "order_id": "ORD-20260401143022",
# "customer_phone": "+923001234567",
# "items": [{"item": "Mutton Karahi", "price": 1800, "qty": 1}],
# "subtotal_pkr": 1800,
# "delivery_pkr": 150,
# "total_pkr": 1950,
# "status": "pending_payment"
# }
Practice Lab
Exercise 1: Map a complete order flow for a fictional Pakistani restaurant of your choice (BBQ, Chinese, Desi, Seafood). Create a flow diagram with: welcome → categories → items → cart → checkout → payment → confirmation. Identify every point where the bot needs to wait for customer input versus send an automatic message.
Exercise 2: In WATI's free trial (available at wati.io), build the welcome flow and one complete category flow (at minimum 5 items with PKR prices). Test it by WhatsApp messaging your own test number. Verify the bot responds correctly to: selecting a category, adding an item, viewing the cart, and typing "BACK."
Exercise 3: Build the Google Sheets menu manager. Create a sheet with columns: category, item_name, description, price_pkr, available (TRUE/FALSE). Add 10 items. Write an n8n workflow that reads this sheet and prints the menu in WATI-formatted text. This is the foundation for automated menu management.
Pakistan Case Study: Lahore BBQ House
The problem: Lahore BBQ House (fictional, based on real archetype) received 120+ WhatsApp messages daily during dinner rush (6–9 PM). Two staff members spent 4 hours managing orders. Common errors: wrong items, unconfirmed orders, payment disputes.
The solution: Restaurant order bot with Google Sheets backend.
Setup: 1 week build, WATI Business plan (PKR 18,000/month), Google Sheets (free), n8n (PKR 3,500/month).
Results after 30 days:
- Staff time on order management: 4 hours → 20 minutes (flagging exceptions only)
- Order errors: 15/week → 1/week (bot captures exact items, no misheard orders)
- Average order value: PKR 1,200 → PKR 1,650 (bot shows full menu, upsells naturally)
- Customer satisfaction: Higher — instant response vs 20 min wait
- Monthly revenue increase: PKR 180,000
- Total automation cost: PKR 21,500/month
- Net gain: PKR 158,500/month
Key Takeaways
- The restaurant order bot is Pakistan's highest-ROI WhatsApp automation because it replaces 3-4 hours of daily manual work that every restaurant currently does
- Session variables in WATI allow cart persistence across a multi-message conversation — without them, the bot would forget what the customer already added after each message
- Google Sheets as a menu backend makes the system maintainable by non-technical restaurant staff — a crucial feature for real client deployments
- Always include a COD (Cash on Delivery) option in Pakistani restaurant bots — a significant percentage of customers, especially first-time buyers, will not pay digitally before trying the food
- The n8n notification layer ensures the restaurant owner is always informed of new orders in real time, bridging the automation with human oversight where it matters
Lesson Summary
Quiz: Restaurant Order Bot — Menu, Cart & Payment on WhatsApp
4 questions to test your understanding. Score 60% or higher to pass.