KHOLO LogoDocs v1.0
Developer Guide

WhatsApp Simulator Guide

Testing text orders and voice notes in the interactive browser sandbox.

The Kholo WhatsApp Simulator (/simulator) is an interactive sandbox built directly into the web application. It allows developers, sales teams, and distributor pilots to test end-to-end order processing, trade slang, and voice note transcription without needing a live Meta Business Manager account or real WhatsApp phone number.


1. Accessing the Simulator

Navigate to http://localhost:XXXX/simulator in your browser:

KHOLO WhatsApp Simulator

Interactive Merchant Sandbox
Port 3000 /simulator
Active Persona:

+27 00 000 0000— Clerk (KwaMashu Spaza) ▼

Morning boss, please send me 5 whites 12.5, 10 oil 2L and 2 cases dragon
08:15 ✓✓
Kholo Order Desk
Sawubona Clerk! Your order has been received (3 items, Est. Total: R 1,819.81) and queued for clerk dispatch verification. Ref #KH-441
08:15
️ VoiceSend

2. Testing Text Orders

Selecting a Customer Persona:

Choose from pre-configured customer accounts (e.g., Clerk, Supplier A, or custom number). The customer's assigned price tier and credit status are automatically applied during order parsing.

Sample Prompts to Try:

  1. Colloquial South African Trade Slang:
    Pls send 10 bags of whites 12.5kg, 4 tastic rice 10kg, 6 sunfoil 2L
  2. Beverages & Energy Drinks with Pack Sizes:
    2 cases of stoney 2L, 3 cases dragon cans, 5 coke big
  3. Conversational Mixed-Language Greetings:
    Sanibonani. We need 5 boxes ricoffy 750g, 10 sunlight green bars, and 4 omo auto 2kg. Deliver before 2pm please.

When you click Send:

  1. The simulator posts the message to /api/simulator/chat.
  2. The Background Task Queue worker executes OrderExtractor and SkuMatcher.
  3. Kholo calculates line subtotals and responds in the chat with an order confirmation and reference ID.
  4. An order is simultaneously placed in the Clerk Control Centre (/dashboard).

3. Testing Voice Notes (Audio Recording)

The simulator includes a native browser audio recorder that replicates WhatsApp voice notes:

  1. Click the Microphone icon (️) in the simulator.
  2. Grant microphone permissions in your browser.
  3. Speak an order naturally (e.g., "Good morning, send me ten bags of Iwisa ten kilo and two boxes of Dragon energy").
  4. Click Stop & Send.

What Happens:

  • The audio is recorded as an Opus/WebM audio blob.
  • The simulator uploads the audio to /api/simulator/voice.
  • The server sends the audio to the Internal Speech-to-Text Model transcription pipeline.
  • The extracted text and items are returned to the simulator, and the audio recording is attached to the order for clerk playback.

4. Inspecting the Result in the Dashboard

Open http://localhost:XXXX/dashboard in a second tab.

You will see your simulated order at the top of the inbox, complete with:

  • The original text or voice note player.
  • Calculated confidence scores for each item.
  • Pick slip generation and Sage ERP approval buttons.

On this page