How to automate Shopify customer support on WhatsApp
Most WhatsApp messages to a D2C brand are about orders: where is it, can I return it, can I exchange the size. Those are exactly the conversations an AI agent can handle well, if it is built around your Shopify data and policies. This is how I approach it.
Step 1: Find out what customers actually ask
Export a month of WhatsApp or helpdesk conversations and tag them. For most stores, a handful of intents cover the majority: order status, tracking, returns, exchanges, cancellations, COD and address changes, and sizing questions. Automate those first. Leave rare and sensitive ones (refunds, damaged items, complaints) with a person.
Step 2: Give the agent tools, not just a prompt
An AI model doesn't know your orders. It needs tools: small functions it can call that read and write Shopify. In my demo agent there are seven, including:
lookup_order: finds orders placed from the customer's WhatsApp number.get_tracking: fetches live courier status.get_policy: returns the return and exchange rules for this order.get_exchange_options: lists available sizes for an exchange.- Tools to raise a return, exchange or cancellation, which log the request on the order.
Step 3: Put the rules in the tools
This is the step most chatbots skip. If the return window is 7 days, the return tool should check the delivery date and refuse outside the window, whatever the customer or the model says. If customers may only see their own orders, the lookup tool should only search by the number the message came from. Rules in a prompt can be argued with; rules in code can't.
Step 4: Design the handoff
Some conversations need a person. Decide which ones (angry customers, payment issues, anything the tools can't answer) and how staff take over. In the demo, the agent sends the conversation and a summary to a Telegram group; staff reply from their phone, and one command hands the chat back. See how to implement human handoff.
Step 5: Handle language the way customers write
Indian customers write in English, Hindi, Hinglish, with typos and abbreviations, often in one message. A modern model handles this well, but test it: "mera order 1007 kab aayega" should get the same right answer as "when will order 1007 arrive?"
Step 6: Test before customers see it
Write scripted test conversations for every intent, plus the tricky ones: returns just outside the window, asking about someone else's order, trying to talk the agent into a refund. The demo agent was tested with 31 such conversations before I called it done. Re-run them whenever the prompt, model or tools change.
Step 7: Launch narrow, then widen
Go live with order status and tracking first, watch the logs for a week, then switch on returns and exchanges. Every conversation is logged, so you can see what the agent resolved and where it handed over.
The stack
| Piece | What I use |
|---|---|
| Channel | WhatsApp Cloud API on your business number |
| Orchestration | n8n (or code) running the agent and tools |
| Store data | Shopify Admin API |
| Memory and logs | Postgres |
| Staff handoff | Telegram |
| Model | Any major provider, chosen for cost and quality |
Want this for your store? See AI automation for e-commerce or book a call.
Related
WhatsApp Shopify support agent
Order status, returns and exchanges on WhatsApp from live Shopify data, with Telegram handoff.
Read more By industry · E-commerceAI automation for e-commerce
WhatsApp and voice agents for order support, returns and exchanges, from live Shopify data.
Read more Blog · PricingHow much does a custom WhatsApp AI chatbot cost in India?
The build, the monthly running costs, and what makes one chatbot cost ten times another.
Read moreTell me what you'd like to automate.
Book a free 30-minute call. We'll look at where your team's time goes, and I'll tell you honestly whether AI is the right fit.