Urgent.News

What's breaking now, across thousands of outlets.

Tech

Building a Chat-Based Sales Bot That Doesn't Drop Messages During Flash Sales

Originally published at parvejshah.com/blog/conversational-commerce-webhook-architecture by Parvej Shah . In Bangladesh and much of South and Southeast Asia, e-commerce doesn't look like what a Silicon Valley product manager pictures. Buyers don't browse product catalogs, add items to carts, and check out with saved payment methods. They send a message on Facebook or WhatsApp, ask if an item is…

Parvej Shah's article on conversational commerce webhooks reveals the unique challenges of building a chat-based sales bot for e-commerce in Bangladesh and other South and Southeast Asian countries. Unlike the traditional e-commerce model, where customers browse catalogs and make purchases through saved payment methods, local buyers engage in conversational commerce via platforms like Facebook and WhatsApp.

They ask about product availability, negotiate prices, confirm addresses, and make payments through mobile banking transfers.

SellerVai, a platform designed for this conversational commerce reality, is built to handle order inquiries, process orders in Bengali and Banglish, and filter fake Cash-on-Delivery requests. The core engineering challenge was not AI, but rather ensuring reliable message delivery during flash sales.

Webhook endpoints trigger HTTP POST requests from Meta's servers, which require a 200 OK response within a few seconds. However, processing order inquiries, querying product databases, checking inventory, generating personalized responses, and initiating payment collections cannot all be completed in this short timeframe. This leads to timeouts, retries, and potential issues such as duplicate messages, incorrect orders, and inaccurate inventory counts.

To address this, the solution is to treat the webhook endpoint as a simple message receiver, verifying signatures and acknowledging delivery within 15 milliseconds. Actual processing occurs asynchronously through a message queue backed by Redis. Workers retrieve messages from the queue, perform fingerprinting to detect duplicates, and process them individually without time pressure.

Bengali and Banglish messages often contain colloquial language and code-switching between Bengali script and Roman characters. The platform uses a two-tier parsing approach: a fast regex and keyword engine handles structured data extraction, while an LLM classifier deals with intent categorization for more complex or informal queries.

During a promotional campaign, traffic surged 15 times above the baseline for two hours. Despite this burst, the ingestion layer's stateless design and message queue absorbed the load, ensuring the webhook endpoints remained responsive. Workers efficiently processed the backlog over the following 20 minutes, with no duplicates sent to customers. This architecture guarantees reliable delivery and accurate processing during high-traffic events like flash sales.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 26 August →