noprob agency logo
Request information
Support

Shopify AI Chatbot for Orders and Returns: How It Is Built and Where It Must Stop

A Shopify AI chatbot for orders and returns is not one prompt. It is five parts, and the last decision, the refund, stays with a person. Here is how it is built, what each part does and where the assistant must stop.

Antonio Manitta11 min read
Abstract cover, softly graded blush pink background with a regular dot grid

A Shopify AI chatbot you can leave alone with customers does four things and refuses a fifth: it answers “where is my order”, explains your policies, answers product and size questions, opens a return request, and never decides a refund or an exception. That last line is the whole design. Everything else in this article is how to build it so the line holds in code, not just in a prompt.

We are noprob agency. We build with AI agents every day (our Custom AI System includes development with AI agents) and we move stores to Shopify with the Shopify Launch Sprint. I am a developer by training, with more than 7 years of eCommerce projects behind me. This is the blueprint I would hand to a store owner who has to talk to whoever builds the assistant, or who has to judge the app that promises one.

AI customer service for Shopify: what should the assistant actually do?

It should take the repetitive, checkable questions and hand over everything that involves money, judgment or an angry customer. Shopify’s own guide to AI chatbots for customer service says the same thing from the vendor side: chatbots can check live order data, explain the return policy and start a return, but they cannot fully replace people, so important conversations go to a human and handoff rules are part of the setup.

In practice, a store gets four kinds of message. Where is my order. I want to send something back. I have a question about a product, a size or the shipping. And everything else: a complaint, a gift, a question nobody planned for. The first three are where an assistant earns its keep. The fourth is where it has to know it is out of its depth.

How is a Shopify AI chatbot built? Five parts

The assistant is a chain of five parts: a router that sorts the message, a knowledge base it searches, read-only tools for orders, a return request that waits for approval, and a check on the answer before it is sent. Each part exists because the one before it is not enough. Skip one and you can usually name the failure it would have prevented.

1. The router: order, return, product or other

The router reads the message and decides which road it takes: order, return, product, or “other”. It can be a rule (the message contains an order number), a small classifier, or a language model that writes one label. Rules are instant and free but read signs, not meaning: a furious complaint also contains an order number. A model understands the complaint, at the price of one more call. A common mix: rules for the obvious cases, a model for the rest.

Two details matter more than the choice of router. First, the “other” road must exist and must lead to a person. Without it, a message like “do you ship to Madeira?” gets forced onto the nearest road, or stalls silently while the customer waits. Count what lands there: it shows you the next road to build. Second, the router may ask a question. “I’m not sure about this jacket” could be a return, a complaint or a size question; one line, “Do you want to send it back, or is something wrong with it?”, is cheaper than guessing.

2. The knowledge base: policy, shipping, sizes

The knowledge base is the set of documents the assistant reads before it answers, so it quotes your policy instead of inventing one. Keep it in two layers: a short instruction file that is always loaded (who the assistant is, who it works for, what it never does, where to look for the rest) and separate documents it opens only when needed: returns, shipping times by country, size charts, warranty text.

Most mistakes here are retrieval mistakes, not model mistakes. The assistant reads the size chart of the wrong product, or an old shipping page that still says five days. A few rules fix most of it: one document per topic, one owner, a date on each page, and a size chart per product line rather than one generic table. Shopify’s guide also describes a Knowledge Base app that generates store facts so AI shopping agents describe your store accurately. Whatever tool reads your documents, their quality decides the quality of the answers.

3. Read-only tools: the order lookup

A tool is a function the assistant can call, and the first one it needs is “look up this order”. Give it read access only. Shopify decides what an app may do through access scopes, and the Admin API mutation that creates refunds, refundCreate, sits behind the orders access scope. An assistant whose app was only ever granted the read side cannot refund anything, however persuasive the customer is. To open returns it needs only the write_returns scope, never the orders scope that refundCreate requires. That is a constraint in code, worth more than ten lines of “never promise refunds” in a prompt. OWASP lists the same remedies under excessive agency: fewer tools, narrower permissions and human approval for high-impact actions.

Four checks wrap every call, and all four live in code:

The data matters as much as the permission: an assistant is as reliable as the order, tracking and product data it reads. That is one reason our Shopify Launch Sprint maps data in detail during a migration (see the Shopify migration guide), and why order data should be clean before any assistant reads it. For a migration from a proprietary platform tied to a management system, see the Cumini case study.

4. AI returns automation: the assistant opens the request, a person approves it

Opening a return is reversible, so the assistant may do it; paying a refund is not, so it may not. Shopify’s API draws the line for you. The returnRequest mutation, in the documentation’s words, “creates a return request that requires merchant approval before processing”: the return is created with status REQUESTED and the merchant approves or declines it. For a return that should be open immediately there is a different mutation, returnCreate. Pick the first for the assistant and the second only for staff.

So the flow is: the assistant checks the order and the policy, opens a return request, tells the customer what happens next, and puts the case in a queue where a person approves or declines it and, if money is due, issues the refund. The reversible road (look up, open a request, send instructions) runs on its own. The irreversible road (refund, store credit, exception) stops at a desk.

5. The check before sending

The last part is a second reader that checks the draft against written criteria before the customer sees it. “Reread this, is it fine?” is not a criterion: the model will say the reply is clear and polite, and it will be right. The defects are a fact nobody supplied and a promise nobody may make. Give the checker the tool results and three questions: is every fact in the reply present in the tool results or the documents? Does the reply promise something a person decides, such as a refund, a discount or a date? If the customer is upset, does the reply acknowledge it?

Example. Draft: “Your jacket ships Tuesday and arrives in two days. I’ve started your return and you’ll get your refund within five days.” The checker flags “two days” (not in the tracking data) and “refund within five days” (a promise). The second draft passes: “Your order shipped on Tuesday and the carrier shows it in transit. I’ve opened your return request; someone on the team approves it and confirms the refund by email.” Make the checker a separate call, with only the draft, the criteria and the facts, not the whole conversation, and where possible a different model from the one that wrote: models tend to favor their own text.

Which requests does the AI handle, and which does a person decide?

The rule of thumb is simple: the AI handles what it can look up and what can be undone; a person decides what costs money, bends a rule or involves a frustrated customer. This is the matrix we would put in any brief for a support assistant. Copy it and edit it to your policy.

RequestWhat the AI doesWhat a person decides
“Where is my order?”The AI reads the order and the tracking and replies with what the data says.A person steps in only if the carrier shows the parcel lost or stuck.
Product, size and shipping questionsThe AI answers from product data, the size chart and the shipping page. If the sources disagree or say nothing, it says it will check and passes the question on.-
Return within policyThe AI checks the order against your policy, opens a return request and sends the instructions.A person approves the request.
Return outside policy, gift, no order numberThe AI explains the policy without promising anything and hands over a summary.A person decides the exception.
RefundThe AI never executes or promises it; it says a person confirms.A person approves and issues it.
Damaged or defective itemThe AI collects order, photos and a description, and opens the case.A person decides between repair, replacement and refund.
Complaint, legal threat, chargeback, request about personal data-Straight to a person, with the conversation attached.
Discounts, price matching, anything “just this once”-A person, always.

Notice what the matrix does not contain: any case where the AI “almost” decides. When a case is borderline, it is a person’s case. Anthropic, in its guide to building effective agents, calls customer support a natural fit for agents and says to start with the simplest solution. In a store that means a router, two or three fixed roads for the most frequent requests, and a reliable road to a person.

Which Shopify AI chatbot options exist before you build?

You have three real routes on Shopify: Shopify’s own Inbox, a helpdesk or chatbot app from the App Store, or an assistant built for your store. We do not rank them: which one fits depends on your volume, languages and how many exceptions your policy has. What follows is what the official pages say.

Before you install anything, ask the vendor four questions. Which actions can the assistant execute on its own, and can each be switched off? Which access scopes does the app request at install? What does a human receive on handoff? Can you see full conversations and tool calls? If an app can refund by itself and you cannot turn that off, you have your answer.

When do you need a custom assistant instead of an app?

You need a custom assistant when your rules do not fit a helpdesk’s settings: policies with exceptions, data outside Shopify, several languages, or an approval queue that must live in your own tools. If you answer a few dozen messages a week, mostly FAQs and “where is my order”, Inbox or an app is the sensible start, and a custom assistant starts paying off when the rules below appear.

Not everything needs an assistant either. A path that never changes (a return is approved, so tag the order and email the customer) is a workflow, and Shopify Flow with AI covers many of those. Whether you need a chatbot, a workflow or an agent is the question we answer in AI agents for Shopify, and what it takes to build one is in how to build an AI agent for your store. I use Shopify Magic and Sidekick in projects the same way I would run an assistant for customers: clean data first, human review after. If you want to build one with us, the AI Accelerator is where we start.

What to do before the first customer talks to it

Before launch, write the cases it must pass and decide what it can read. Take 20 to 50 real messages from your inbox, including the awkward ones (a gift, a wrong size, an order that never arrived, a message about something else entirely), and write for each what must be true in the reply, not the exact words. Run them after every change. How to do it step by step is in how to evaluate an AI assistant for your store.

And remember who writes to you. The assistant reads text written by strangers (messages, reviews, imported descriptions) while it has access to orders and customer emails. That combination is what attackers look for, and the defense that holds is to remove one side: the assistant sees only the orders of the person writing and writes only to that person. We cover it in AI agent security on Shopify. For a broader view of AI in the store, see AI for eCommerce: what works and Shopify Magic and Sidekick.

Frequently asked questions

Can you add an AI chatbot to Shopify?

Yes. You can turn on Shopify Inbox, install a helpdesk or chatbot app from the Shopify App Store, or build an assistant connected to the Admin API. Whichever you pick, give it read access to orders, let it open return requests only, and keep refunds with a person.

Is there an AI for Shopify?

Yes, several. Shopify has Sidekick and Shopify Magic for the merchant, AI-generated instant answers and suggested replies in Inbox, and the App Store has chatbot and helpdesk apps with their own AI agents. Merchant tools help you work; customer-facing assistants talk to your shoppers and need much stricter limits.

Can an AI chatbot process refunds on Shopify?

Technically it can, if its app has permission to call the refund mutation. It should not. A refund moves money and cannot be undone, so the assistant should open a return request and let a person approve it and issue the refund.

Does Shopify Inbox have AI?

Yes, in a limited form. Per Shopify’s documentation, Inbox offers AI-generated instant answer suggestions and suggested replies for staff, both only in English, and the merchant stays responsible for the accuracy of what is published and sent.

When should the chatbot hand the conversation to a person?

On refunds, exceptions, damaged items, complaints, legal or personal-data requests, and whenever the router does not recognize the request. Send the case with a short summary so the customer does not have to repeat themselves.

Do I need a custom AI assistant or is an app enough?

An app is enough when your questions are repetitive and your policy is simple. A custom assistant pays off when exceptions, several data sources or several languages make the rules too specific for an app’s settings.

If you are still on another platform, the right order is to migrate first and add the assistant on clean data: see our Shopify migration guide. The Sprint has a public price by revenue: €5.800 under €2M, €8.800 between €2M and €20M, €12.800 above €20M, VAT excluded, in 4 installments.

The Shopify Launch Sprint moves your store to Shopify in 14 days with our Custom AI System: a fixed calendar, a public price and 4 written guarantees.

Antonio Manitta

Antonio Manitta

Founder & eCommerce Manager at NoProb Agency

For over 7 years I have helped fashion, supplements, and DTC brands scale their eCommerce. I work in long-term partnership with three brands at a time, building stable systems that compound.

About NoProb →

Ready to fix what's slowing you down?

Avatar
Book a call
Antonio replies personally