The problem

A D2C brand running on WooCommerce was losing revenue in three specific ways. First, COD fraud and no-shows — anyone could place a Cash-on-Delivery order without proving intent, and up to 20% of shipments came back. Second, abandoned carts — no urgency signals during checkout, so buyers browsed and left. Third, slow customer support — a 2-person team handling repetitive questions (order status, sizing, dispatch time) via WhatsApp DMs at all hours.

They wanted a full commerce-automation layer that plugged into WooCommerce without a re-platform: verify COD orders, drive urgency during checkout, and let an AI handle first-touch support across WhatsApp and Telegram.

The solution we shipped

We built a WooCommerce plugin + companion webhook service. Together they add three big capabilities:

1. OTP-verified COD confirmation

When a customer places a COD order, they get a one-time password via SMS or WhatsApp. Order status stays "pending confirmation" until they enter the OTP. Only verified orders drop to the warehouse. Real intent, dramatically fewer RTOs.

2. Dynamic dispatch timers & stock-driven urgency

Every product page shows a live "Order in the next X hours Y minutes to dispatch today" timer, calibrated to the brand's actual cut-off. Low-stock items show real inventory counts pulled from WooCommerce ("Only 3 left"). No fake countdowns — the numbers are real, which makes them credible and legal.

3. AI customer support (Gemini Flash + PHP)

A conversational support layer for WhatsApp and Telegram. Powered by Google Gemini Flash, called from PHP so it slots into the existing WooCommerce stack. It answers order-status queries by looking up the actual order in WooCommerce (via the REST API), handles product/sizing/dispatch questions from the product knowledge base, and escalates anything it isn't sure about to the human team with the full transcript.

Additional features shipped

  • Order status lookups by order number or phone
  • Post-purchase upsell messages triggered on order confirmation
  • Meta Conversions API (server-side) for cleaner ad attribution
  • Cart-abandonment reminder sequence over WhatsApp
  • Admin dashboard for OTP verification stats, support metrics, and dispatch performance

Stack

  • Store: WooCommerce on WordPress
  • Plugin & automation service: PHP 8
  • AI: Google Gemini Flash (cost-efficient for high-volume support)
  • Messaging: WhatsApp Business API + Telegram Bot API
  • Ad attribution: Meta Conversions API (server-side event forwarding)
  • Auth: OTP via SMS gateway and WhatsApp template messages
  • Storage: MySQL (extending the WooCommerce schema)

Result

The three problems each got their own fix. COD RTO rates dropped sharply once OTP verification was in place. Dispatch timers and real stock counts gave checkout the credibility signals it was missing — no fake urgency, just honest ones. And the AI support layer now handles the vast majority of first-touch questions (order status, sizing, dispatch), leaving the human team to focus on edge cases and actual complaints.

What made this project work

Not treating each fix as a standalone plugin. OTP verification, dispatch timers, urgency, AI support, and ad-attribution improvements were designed as a single automation layer that all read from and wrote back to WooCommerce. That meant less duplicated data, one dashboard, and simple debugging when something misbehaved. It also meant the client could keep their existing store — no re-platform, no design change.

Running an e-commerce store?

Similar WooCommerce / Shopify automation projects typically run $1,200–$3,500 depending on scope, delivered in 3–5 weeks. Fixed price, source code included.

Get a Quote

Related: API Integrations · Telegram Bot for E-commerce guide · Booking Bot case study