WA-1
Chat-to-Cart Ordering
Phase 1 MVP
Customer orders via natural language → WhatsApp sends to HypedMind webhook → AI identifies intent → product lookup → cart → checkout → payment
Click to highlight ▼
Customer
Action
Action
💬
Types natural language order request
"I want chicken rice"
📍
Selects nearest pickup outlet
Taman Jaya (0.8 km)
👀
Reads product options returned by AI
☝️
Selects item from list
"Chicken Ramen x2, less spicy"
🛒
Receives cart confirmation
📱
Taps Checkout button
Requests secure login_url
💳
Completes payment on Mini Program
✅
Order confirmed & receipt sent
WhatsApp
Chat
Chat
I want chicken rice
Chicken Ramen x2, less spicy
-
✅ Order Confirmed!
Order #ORD-0042
Chicken Ramen × 2
RM 45.80
Chicken Ramen × 2
RM 45.80
WhatsApp →
HypedMind
Webhook
HypedMind
Webhook
POSTWhatsApp Cloud API → HypedMind
Customer message delivered from WhatsApp to HypedMind webhook
POSTHypedMind → /api/v1/webhooks/wa
Forward normalized inbound WhatsApp event to CUSCAPI
Outlet selection event passed through HypedMind
POSTHypedMind → CUSCAPI
Send extracted keyword/entity to product search
POSTHypedMind → CUSCAPI
Forward selected item and quantity
Session event passed through HypedMind
Call customer token API and return login_url to WhatsApp
-
Confirmation template sent via WhatsApp
AI Engine
🤖
Intent Detection
Classify: ordering intent
Entity: "chicken rice"
Entity: "chicken rice"
NLU · 97% conf.
📍
Location Resolver
Rank outlets by proximity to user GPS · surface nearest first
Geo-sort
🔍
Outlet Catalog Search
Query products from selected outlet_id
📋
Selection Parser
Extract: product_id, quantity from reply
🛒
Cart Manager
Add item, compute totals, generate confirmation
🔗
Customer Token Bridge
Request customer token · return login_url for WhatsApp in-app browser
💸
Payment Orchestrator
Continue from tokenized cart checkout page inside WhatsApp in-app browser and monitor payment callback
📨
Notification Dispatch
Build WhatsApp template payload
CUSCAPI → HypedMind → WhatsApp
CUSCAPI → HypedMind → WhatsApp
Platform
APIs
APIs
POST/api/v1/webhooks/wa
Inbound WhatsApp message
GET/api/v1/outlets?lat={}&lng={}
Fetch outlets sorted by distance
{
"success": true,
"message": "Outlet list retrieved successfully.",
"data": [
{
"id": 3,
"name": "City Mall Branch",
"city": "Kuching",
"distance_label": "0.00km away",
"is_open_now": true,
"is_accepting_order_now": true
},
{
"id": 2,
"name": "Main Branch",
"city": "Kuching",
"distance_label": "50.02km away",
"is_open_now": true,
"is_accepting_order_now": true
}
]
}
GET/api/v1/outlet/{outlet_id}/products?q=chicken+rice
Search outlet-specific catalog by keyword
{
"success": true,
"message": "Product list retrieved successfully.",
"data": [
{
"id": 1,
"name": "Chicken Katsu Curry Don",
"category": "Rice",
"price": 28.90
},
{
"id": 4,
"name": "Chicken Ramen",
"category": "Noodles",
"price": 22.90
},
{
"id": 8,
"name": "Chicken Katsu Set",
"category": "Combo",
"price": 26.90
}
]
}
POST/api/v1/cart/
Add selected product and quantity to cart
{
"product_id": 4,
"quantity": 2,
"note": "Less spicy"
}
{
"success": true,
"message": "Item added to cart successfully.",
"data": {
"id": 45,
"cart_id": 55,
"product_id": 4,
"quantity": 2,
"ori_price": 24.90,
"price": 22.90,
"total": 45.80,
"note": "Less spicy",
"product": {
"id": 4,
"name": "Chicken Ramen",
"sku": "OUT2-CHICKENRAM",
"price": 22.90,
"normal_price": 24.90,
"category": "Noodles"
},
"selected_options": []
}
}
Cart Response → WhatsApp
Format cart response into WhatsApp confirmation
{
"cart_id": 55,
"item": "Chicken Ramen x2",
"note": "Less spicy",
"total": 45.80
}
POST/api/v1/customers/token
Create customer access token and return login_url for WhatsApp in-app browser
{
"phone_number": "60123456789"
}
{
"success": true,
"customer": {
"id": 1,
"name": "John Doe"
},
"access_token": "43|...",
"token_type": "Bearer",
"login_url": "https://mini.cuscapi.com/wave-login?token=...",
"expires_in_minutes": 10
}
-
POST/api/v1/notifications/wa
CUSCAPI → HypedMind
Send WhatsApp template message
Send WhatsApp template message
{
"type": "wa_template",
"template": {
"template_name": "sample_template_v1",
"language": "en"
},
"data": {
"body_params": [
"John",
"P000001"
],
"buttons": [
{
"type": "url",
"payload": "order/P000001"
}
]
}
}
Mini
Program
Program
—
—
—
—
—
Secure Checkout
WhatsApp In-App Browser
Cart #55
Chicken Ramen × 2
RM 45.80
In-App Payment
Continue from Cart #55
FPX / Credit Card
E-wallet
Order #0042
✓ Confirmed
Est. 15 min
WA-2
Order Status Tracking
Phase 1 MVP
Reactive: customer asks status · Proactive: AI pushes live updates via order.updated webhook
Click to highlight ▼
Path A Reactive — Customer-initiated status check
Customer
Action
Action
❓
Asks about order status
"where is my order?"
👀
Reads status message
Preparing · ~10 min
🔔
Receives "Ready for Pickup" notification with outlet info
WhatsApp
Chat
Chat
Where is my order? 🍽️
✅ Ready for Pickup!
Order #ORD-0042 is ready for pickup at Taman Jaya Outlet 📍
AI Engine
🔎
Intent Detection
intent = status_check
entity: order ref / latest
entity: order ref / latest
📊
Status Formatter
Format order state + ETA into interactive message
📡
Webhook Listener
order.updated received → trigger proactive push
Event-driven
Platform
APIs
APIs
POST/api/v1/webhooks/wa
HypedMind → CUSCAPI
Inbound WhatsApp message
Inbound WhatsApp message
GET/api/v1/orders/{id}
Fetch order status + ETA
POST/api/v1/notifications/wa
Push proactive template
Mini
Program
Program
—
—
—
Path B Proactive — AI-initiated push notification on order state change
Customer
Action
Action
🛎️
No action — waits for food
Passive state
🔔
Receives "Ready for Pickup" notification with outlet & order info
📦
Picks up order or awaits delivery
WhatsApp
Chat
Chat
Customer idle · no message
✅ Ready for Pickup!
Order #ORD-0042 is ready for pickup 🎉
📍 Taman Jaya Outlet · Counter 3
📍 Taman Jaya Outlet · Counter 3
✅ Delivered!
Order #ORD-0042 has been collected. Enjoy your meal! 🍽️
AI Engine
📡
Event Bus
Listening for order.updated webhook from POS/kitchen
Reactive
📨
Push Dispatcher
Template selection based on new order status
⭐
Review Trigger
Post-delivery: queue review request message
Platform
APIs
APIs
POST/api/v1/webhooks/order
POS/kitchen fires order.updated
POST/api/v1/notifications/wa
Dispatch proactive update template
POST/api/v1/notifications/wa
Send delivery + review template
Mini
Program
Program
—
Order Status
✅ Ready for Pickup
📍 Taman Jaya Outlet
Order #ORD-0042 · Counter 3
—
WA-3
Loyalty Points & Redemption
Phase 1 MVP
Check balance → view vouchers → redeem points during checkout via WhatsApp
Click to highlight ▼
Customer
Action
Action
🏆
Asks about loyalty points balance
"how many points?"
👀
Views balance & available vouchers
🎟️
Selects voucher to redeem during order
✅
Receives confirmation with updated balance
WhatsApp
Chat
Chat
How many points do I have? 🏆
🎉 Points Redeemed!
100 pts redeemed · RM 1.00 off
New balance: 175 points
New balance: 175 points
AI Engine
🏆
Loyalty Intent
intent = loyalty_check
resolve customer_id from WA number
resolve customer_id from WA number
📊
Balance Formatter
Format points, tier, value into interactive message
🎟️
Voucher Resolver
Match selected voucher to active order in cart
✅
Redemption Confirm
Update balance, send confirmation template
Platform
APIs
APIs
GET/api/v1/loyalty/{customer_id}
Fetch points balance & tier
GET/api/v1/loyalty/{id}/vouchers
List redeemable vouchers
POST/api/v1/loyalty/redeem
Apply voucher to order
GET/api/v1/loyalty/{customer_id}
Fetch updated balance after redeem
Mini
Program
Program
—
Loyalty
🌟 275 pts · Silver
Next: Gold @ 325 pts
My Vouchers
RM1 off · 100 pts
RM3 off · 250 pts
—
WA-4
QR Code Table Ordering
Phase 1 MVP
Physical QR at table → WhatsApp pre-fill → table-linked order session → live tracking in Mini Program
Click to highlight ▼
Customer
Action
Action
📷
Scans physical QR code at table
Table 5
💬
WhatsApp opens with pre-filled context message
🍽️
Browses menu & places order
📱
Tracks live order status on Mini Program
WhatsApp
Chat
Chat
Hi! I'm at Table 5 📍
Outlet: Taman Jaya
Outlet: Taman Jaya
📊 Order Received
Table 5 · #ORD-0055
Kitchen preparing your order
Kitchen preparing your order
AI Engine
🔗
QR Context Parser
Decode table_id, outlet_id from QR deep-link params
wa.me deep-link
🏪
Session Router
Bind WA session to table + outlet context
📋
Menu Presenter
Serve outlet-specific menu with dine-in pricing
📡
Order Broadcaster
Push real-time updates via WebSocket to Mini Program
Platform
APIs
APIs
GET/api/v1/outlets/{id}/tables/{n}
Resolve table from QR scan
POST/api/v1/sessions
Create table-linked WA session
GET/api/v1/menus?outlet={id}
Outlet-specific menu
POST/api/v1/orders
Create table order
GET/api/v1/orders/{id}
Fetch live order status
Mini
Program
Program
—
—
Menu
Chicken Rice RM12.90
Tom Yam RM14.90
Table 5 Order
🍳 Preparing
#ORD-0055
Live WebSocket ⚡
WA-5
AI Product Recommendation
Phase 1 MVP
Cart analysis + purchase history + time-of-day signals → contextual upsell product cards via WhatsApp
Click to highlight ▼
Customer
Action
Action
🛒
Adds chicken rice to cart
🤔
Reads AI recommendation
👆
Taps "Add to cart" on product card
WhatsApp
Chat
Chat
Add Roasted Chicken Rice to cart 🍚
Added! 🛒 RM 12.90
🧋
Teh Tarik Kaw
RM 4.50
Add Teh Tarik Kaw
Done! Cart: RM 17.40 🛒
AI Engine
🧠
Signal Aggregator
Inputs: cart items + order history + time-of-day
Rec Engine
🎯
Rec Scorer
Rank: "drink with rice" pairing · confidence 89%
🛒
Cart Updater
Add recommended product, recompute total
Platform
APIs
APIs
GET/api/v1/customers/{id}/orders
Fetch purchase history
GET/api/v1/cart/{session}
Current cart state
GET/api/v1/recommendations?cart={id}
Personalized product recs
POST/api/v1/cart/items
Add recommended item
Mini
Program
Program
My Cart
Chicken Rice × 1
RM 12.90
—
My Cart
Chicken Rice × 1
Teh Tarik Kaw × 1
RM 17.40
WA-6
One-Tap Reorder
Phase 1 MVP
Customer triggers reorder via natural language → AI fetches last order → confirm or modify → payment
Click to highlight ▼
Customer
Action
Action
🔄
Requests reorder of last order
"reorder my last order"
👀
Reviews last order summary
✅
Confirms reorder or modifies items
💳
Completes payment on Mini Program
WhatsApp
Chat
Chat
Reorder my last order please 🔄
Confirm Reorder ✅
Creating your order now... 🔄
💳 Payment Required
Order #ORD-0063 · RM 30.30
Tap to complete payment
Tap to complete payment
AI Engine
🔄
Reorder Intent
intent = reorder
resolve customer's last order
resolve customer's last order
📋
Order Formatter
Format last order items + total for confirmation
🏗️
Order Builder
Clone last order items into new order
💸
Payment Orchestrator
Generate payment link, await webhook
Platform
APIs
APIs
GET/api/v1/customers/{id}/orders
Fetch last order details
GET/api/v1/orders/{id}/items
Fetch full item list
POST/api/v1/orders
Create new order (clone)
POST/api/v1/payments/link
Generate payment URL
Mini
Program
Program
—
—
Edit Order
Chicken Rice × 2
Teh Tarik × 1
Payment
RM 30.30
FPX / e-Wallet
WA-7
Walk-in Loyalty Points Claim
Phase 1 MVP
Three claim methods: Receipt number · Phone number POS match · Manual invoice with merchant approval
Click to highlight ▼
Sub-flow A
Receipt-based Claim
Customer
Action
Action
🏃
Walk-in diner wants to claim loyalty points
"claim points for my meal"
🧾
Provides receipt number when prompted
RCP-20260421-0034
✅
Points credited confirmation received
🌟
Views updated loyalty balance
WhatsApp
Chat
Chat
I want to claim points for my meal 🍽️
Sure! Please share your receipt number 🧾
RCP-20260421-0034
🌟 Points Earned!
You earned 45 points for receipt RCP-20260421-0034
New balance: 320 pts
New balance: 320 pts
AI Engine
🏆
Claim Intent
intent = loyalty_claim
prompt for receipt number
prompt for receipt number
🔍
Receipt Validator
Parse receipt ID format, look up POS transaction
🌟
Points Calculator
Bill amount × earn rate = points credited
📊
Balance Presenter
Show updated balance
Platform
APIs
APIs
POST/api/v1/webhooks/wa
Receive claim message
POST/api/v1/loyalty/claim
body: {type: "receipt", receipt_id}
GET/api/v1/loyalty/{customer_id}
Fetch updated balance
POST/api/v1/notifications/wa
Send balance update message
Mini
Program
Program
—
—
—
Loyalty
🌟 320 pts
+45 pts just earned
Sub-flow B
Phone Number POS Match
Customer
Action
Action
📱
Provides registered phone number
+601X-XXXXXXX
🔗
AI matches phone to POS transaction
✅
Receives confirmation with points earned
WhatsApp
Chat
Chat
My number is +6012-3456789
Looking up your recent transactions... 🔍
🌟 28 Points Earned!
Phone match successful.
Balance: 303 pts
Balance: 303 pts
AI Engine
🔍
Phone Lookup
Match phone → customer_id → POS transactions (last 2h)
🔗
POS Matcher
Fuzzy match time + outlet → candidate transaction
✅
Claim Processor
Credit points on customer confirmation
Platform
APIs
APIs
GET/api/v1/customers?phone={n}
Lookup by phone number
GET/api/v1/pos/transactions?phone={n}
POS transactions last 2 hours
POST/api/v1/loyalty/claim
body: {type: "phone", tx_id}
Mini
Program
Program
—
—
—
WA-8
Table Reservations with Food Pre-order
Phase 1 MVP
QR touch point → Dine In or Take Away selection → outlet selector → reservation / mini-program ordering → payment → POS auto-push
Click to highlight ▼
Path A Dine In — Table Reservation with Food Pre-order
Customer
Action
Action
▣
Scans QR, taps Dine In
Restaurant touch point
📍
Views outlet list, selects preferred outlet
Nearest recommended
🪑
Selects preferred table
Indoor / window / group
📅
Chooses reservation date and time
Availability checked
✅
Confirms table reservation
Committed to middleware
🍽️
Continues with AI chat to pre-order food
💳
Pays for pre-ordered food online
🙌
Arrives at reserved time and enjoys session
POS order auto-pushed
WhatsApp
Chat
Chat
✅ Table Reserved
Reservation #RSV-1008
Table 8 · 2 pax
Today, 7:30 PM
Table 8 · 2 pax
Today, 7:30 PM
Pre-order nasi lemak and two iced teas
💳 Pre-order Payment
Nasi Lemak Special × 1
Iced Lemon Tea × 2
Total: RM 31.70
Iced Lemon Tea × 2
Total: RM 31.70
🍽️ Reservation Ready
Your table and pre-order are ready.
Show #RSV-1008 when you arrive.
Show #RSV-1008 when you arrive.
AI Engine
▣
QR Context Resolver
Decode outlet_id, campaign · present Dine In / Take Away
📍
Location Resolver
Rank outlets by proximity · surface nearest first
Geo-sort
🪑
Table Recommender
Filter table availability by pax, outlet and zone
📅
Slot Validator
Check date/time capacity before confirmation
📨
Reservation Commit
Call middleware API and send WA confirmation
API commit
🤖
Menu Assistant
Extract food intent and build pre-order basket
💸
Payment Orchestrator
Forward customer to online payment gateway
⏱️
POS Scheduler
Auto-push paid pre-order when reservation time is reached
Platform
APIs
APIs
POST/api/v1/webhooks/wa/qr
Receive QR launch context from WhatsApp
GET/api/v1/outlets?lat={}&lng={}
Fetch outlets sorted by proximity
POST/api/v1/reservations/sessions
Create dine-in reservation session
GET/api/v1/tables?outlet_id={id}
Fetch available tables
GET/api/v1/reservations/slots
Check date/time availability
POST/api/v1/reservations
Commit reservation to middleware
POST/api/v1/notifications/wa
Send reservation confirmation
GET/api/v1/menu?outlet_id={id}
Load menu for reservation session
POST/api/v1/reservations/{id}/preorder
Attach pre-order basket
POST/api/v1/payments/link
Generate online payment gateway URL
POST/api/v1/webhooks/payment
Confirm pre-order payment
POST/api/v1/pos/orders
Push paid pre-order to POS/kitchen
Mini
Program
Program
QR opens Dine In / Take Away choice
Select Outlet
📍 Nearest First
🔵 KLCC Bistro (0.4 km)
Bangsar (2.3 km)
Select Table
Table 8 · Window
2 pax · Available
Date & Time
Today · 7:30 PM
Tomorrow · 12:30 PM
Reservation
✓ #RSV-1008
Table 8 · 2 pax
Pre-order Menu
Nasi Lemak Special
Iced Lemon Tea × 2
RM 31.70
Payment
FPX / Card / eWallet
Ready
POS pushed
Kitchen received order
Path B Take Away — Outlet Selection → Mini Program Direct Ordering
Customer
Action
Action
▣
Scans QR, taps Take Away
Restaurant touch point
📍
Views outlet list, selects pickup outlet
Nearest recommended
📱
Mini Program opens directly for ordering
Browses menu & adds to cart
✅
Pays online and receives pickup notification
Collects at selected outlet
WhatsApp
Chat
Chat
Taman Jaya selected 📍 Opening menu for ordering...
✅ Ready for Pickup!
Order #ORD-0080 is ready 🎉
📍 Taman Jaya · Counter 2
📍 Taman Jaya · Counter 2
AI Engine
▣
QR Context Resolver
Decode outlet_id, campaign · Take Away session initiated
📍
Location Resolver
Rank outlets by proximity · surface nearest first
Geo-sort
🔗
Session Router
Bind take-away session to selected outlet · open Mini Program for direct ordering
📡
Push Dispatcher
order.updated webhook → push "Ready for Pickup" template
Event-driven
Platform
APIs
APIs
POST/api/v1/webhooks/wa/qr
Receive QR launch context · mode=takeaway
GET/api/v1/outlets?lat={}&lng={}
Fetch outlets sorted by proximity
POST/api/v1/sessions
Create take-away session · outlet bound
GET/api/v1/menu?outlet_id={id}
Load outlet menu for Mini Program
POST/api/v1/notifications/wa
Push pickup-ready template
Mini
Program
Program
—
Select Outlet
📍 Nearest First
🔵 Taman Jaya (0.8 km)
Bangsar (2.1 km)
Take Away Order
📍 Taman Jaya
Chicken Rice RM12.90
Order #0080
✅ Ready for Pickup
📍 Taman Jaya · Counter 2