Our Viranta store sells home and DIY products to customers in Malaysia. The site already had a chat widget, but it was scripted: it looked for keywords such as "harga" or "cod" and returned a fixed answer. Anything a customer phrased differently got a generic reply. We replaced the free-text part of that widget with Claude, and kept everything else.
You can try it on virexagroup.click: open the chat button and type a question in Malay or English.
What it does
- Answers product questions with the real price, stock status and product link.
- Explains cash-on-delivery, shipping times, returns and warranty.
- Replies in the customer's language, Bahasa Melayu or English.
- Sends order status, complaints, refunds and anything uncertain to our WhatsApp team.
How it works
The browser never sees the API key. The widget posts the conversation to a small Cloudflare Worker, and the Worker calls the Claude Messages API with the key stored as a Worker secret.
On each request the Worker loads our live product catalog from the store's public API, caches it for an hour, and places it in the system prompt after the rules. The rules and catalog are identical between requests, so they are marked for prompt caching; only the conversation changes.
We use Claude Haiku 5.5 at low effort. For short product questions it is fast and inexpensive, and it follows the rules reliably.
Guardrails
- Only real products. The assistant may recommend only items from the catalog, with their exact price. It may not invent discounts, voucher codes or delivery dates.
- No personal data in chat. It does not ask for phone numbers or addresses, and it tells customers not to share them there.
- No medical advice. We sell a knee support brace. Asked whether it cures arthritis, the assistant says it does not and suggests seeing a doctor.
- Humans handle money and orders. Order changes, refunds and complaints go to WhatsApp.
- Abuse limits. The Worker accepts requests only from our store's origin, caps message length and history, and rate-limits each visitor.
- Graceful failure. If the Worker or the API is unavailable, the original scripted widget keeps working.
Two problems we hit in production
Requests blocked by region. Everything worked from a laptop, then failed with a 403 once deployed. A Worker runs at the Cloudflare location nearest the visitor, and for some of our test traffic that was Hong Kong, a region the Claude API does not serve. We fixed it by pinning the Worker's placement next to the API, so the call to Claude always leaves from a supported region.
English questions answered in Malay. Our catalog is written in Malay, and it pulled some English answers into Malay. Two changes fixed it: an explicit rule to reply in the language of the customer's latest message while keeping product names unchanged, and a plainer catalog format that the model stopped copying verbatim.
What is next
The assistant is live and at an early stage. Next we plan to review real conversations to find questions it handles poorly, add order lookup behind a human-approved step, and extend the same pattern to ad copy and ad analysis for our marketing team.
More from VIREXAGROUP: Server-side conversion tracking for COD e-commerce · Hourly ad and sales reports