Short answer: a chatbot answers from scripts or an FAQ. An AI agent can also act: it looks up the customer's order, checks your policy and opens a return or refund request. For stores where most questions are "where's my order?" or "can I return this?", an agent answers what a chatbot can only route.
Ask a typical store chatbot "my order A-1042 is late, can I get a refund?" and you'll usually get the refund policy, word for word, followed by "contact our support team". The answer isn't wrong. It just doesn't help, because the chatbot never looked at order A-1042.
That gap is the whole AI agent vs chatbot difference.
AI agent vs chatbot for e-commerce: the same refund question
"Chatbot" covers a lot of things, from button menus to GPT-powered FAQ bots. What they have in common is that they answer. An AI agent answers and acts: it can call functions you give it, read the results, and keep going until the customer's problem is handled or handed to a person.
| Chatbot | AI agent | |
|---|---|---|
| What it does | Matches the question to an answer | Decides which of your tools to use, then answers |
| Sees the customer's orders | No (unless a developer wires a specific flow) | Yes, through a tool that only returns their orders |
| Handles "where's my order?" | Links to a tracking page | Looks up the order and the carrier status |
| Handles returns and refunds | Shows the policy | Checks eligibility and opens a request for your team |
| Setup | Write answers or connect an FAQ | Write tools, permissions and instructions |
| Main risk | Unhelpful answers | Acting wrongly if tools are too broad |
| Best for | Small catalog, mostly pre-sale questions | Real order volume, post-purchase support |
When a chatbot is enough
Not every store needs an agent. A chatbot (or a good help center with search) is fine when:
- most questions are pre-sale: shipping zones, sizing, materials, opening hours,
- order volume is low enough that a person can answer order questions the same day,
- or your order data isn't reachable from code yet.
If that's you, spend the effort on the help center first. An agent built on top of a bad help center gives bad answers faster.
When you need an AI agent
AI agents for ecommerce earn their keep after the purchase. These are the questions that reach support, need the order data, and are the same every day:
- Order status. An AI order tracking agent looks up the order, reads the carrier status and explains what "in transit since Tuesday" actually means.
- Late or missing deliveries. It checks the dates against your delivery policy and tells the customer what they're entitled to.
- Returns and exchanges. It checks whether the item is in the return window and opens the return.
- Refund requests. It can open one, with the order and reason filled in, for a person on your team to approve.
- Changes before shipping. Address fixes or cancellations, if your systems allow them and you decide the agent may ask for them.
What an AI customer support agent for a store looks like
Here's the shape we'd build for a store, end to end:
Three things in that picture matter more than the model you pick:
- The customer ID comes from the store session, never from the chat. If the agent could pass any customer ID to
orders.lookup, one clever prompt would show someone else's orders. Your backend attaches the signed-in customer to the request, and the tool filters by it. - Tools are narrow. "Look up this customer's orders" and "open a refund request" are tools. "Run a SQL query" is not.
- Money goes through a person. The refund tool creates a pending ticket. Your support team approves it in the tools they already use.
The tools most stores start with
Here's a condensed version of the tools from our order-help agent. currentCustomer() reads the signed-in customer that your API attached to the request; the full guide shows how that works with AsyncLocalStorage.
// tools.js
import { notifier, currentCustomer } from "./notifier.js";
export const lookupOrder = notifier.tools.register({
name: "orders.lookup",
description:
"Look up one of the signed-in customer's orders by id (like A-1042), with status, carrier and ETA. " +
"Leave orderId empty to list their recent orders. Use this before answering anything about an order.",
inputSchema: { type: "object", properties: { orderId: { type: "string" } } },
async execute({ orderId }) {
const { customerId } = currentCustomer(); // from the session, not the model
const orders = await shop.orders.forCustomer(customerId); // your OMS / database
if (!orderId) return { orders: orders.slice(0, 5).map(publicFields) };
const order = orders.find((o) => o.id.toLowerCase() === orderId.trim().toLowerCase());
return order ? { found: true, order: publicFields(order) } : { found: false, note: "No order with that id on this account." };
},
});
export const searchPolicy = notifier.tools.register({
name: "policy.search",
description: "Search the store's help articles: returns, refunds, shipping, warranty.",
inputSchema: { type: "object", properties: { query: { type: "string" } }, required: ["query"] },
async execute({ query }) {
const hits = await notifier.search({ senderId: "store-support", query, limit: 3, minSimilarity: 0.5 });
return { hits };
},
});
export const requestRefund = notifier.tools.register({
name: "refunds.request",
description:
"Open a refund request for the support team to review. Use only when the customer clearly asks " +
"for a refund on a specific order and the policy allows it.",
inputSchema: {
type: "object",
properties: { orderId: { type: "string" }, reason: { type: "string" } },
required: ["orderId", "reason"],
},
async execute({ orderId, reason }) {
const { customerId } = currentCustomer();
const ticket = await support.createPendingRefund({ customerId, orderId, reason }); // a person approves it
return { ok: true, ticketId: ticket.id, status: "pending_review" };
},
});
const publicFields = ({ id, status, carrier, eta, total }) => ({ id, status, carrier, eta, total });And the agent that uses them:
// agent.js
import { DNotifier } from "@dnotifier-realtime/dnotifier";
import { lookupOrder, searchPolicy, requestRefund } from "./tools.js";
export const storeAgent = DNotifier.defineAgent({
name: "store-support",
instructions: [
"You are the support assistant for an online store.",
"Always check the order with orders.lookup before answering order questions.",
"Check the policy with policy.search before saying what a customer is entitled to.",
"You can open refund requests but never promise a refund: say the team will review it.",
"Keep replies under 80 words. If you can't help, offer to pass the chat to a person.",
].join(" "),
provider: "open_ai",
model: "gpt-4o",
observability: true,
tools: [lookupOrder, searchPolicy, requestRefund],
permissions: {
"orders.lookup": ["execute"],
"policy.search": ["execute"],
"refunds.request": ["execute"],
},
});That's the "agent" part. The rest is a normal API route that checks the shopper's session and calls notifier.runAgent(storeAgent, { input, userId: customerId, maxToolRounds: 4 }), plus a chat widget that posts to it. AI Agent Architecture covers the route, the React widget and the Flutter screen.
AI agent integration vs chatbot: what changes for your team
Adding a chatbot is mostly a content job: write answers, connect an FAQ. Integrating an AI agent is a small engineering job, because it touches your order data. In practice:
- Someone writes and owns the tools. Usually the developer who already knows your order system. Three tools is a few days of work, not a quarter.
- Support defines the rules. What can the agent say about refunds? When must it hand over? Those rules go into the instructions and the tools.
- You review real conversations. With every run traced, you can read what the agent looked up and why it answered what it did. Start by reading a sample every day.
- The widget barely changes. If you already have a chat widget, it can post to your new endpoint instead.
A rollout plan that doesn't scare your support lead
- Read-only first. Launch with
orders.lookupandpolicy.searchonly. The agent can explain, but not change anything. - Measure deflection honestly. Count how many order questions end without a human, and read the ones that didn't.
- Add refund requests once the read-only answers are consistently right. Every request still goes to a person.
- Add channels. The same agent can sit behind your site chat, your app and (through your backend) email replies.
What it costs to run
On DNotifier, AI features start on the Starter plan, and you pay your model provider directly for tokens with your own API key. Your cost per conversation depends mostly on the model you choose and how many tool calls a typical question needs, which is another reason to keep tools focused and step budgets small. Pricing is here.
See the full order-help agent: tools scoped to the signed-in customer, a help-center search, refunds that wait for a person, and a React and Flutter front end. Read the tutorial · Create your app · Tools & MCP
FAQ
Is an AI agent better than a chatbot for e-commerce?
For post-purchase support, usually yes: an agent can look up the order and check your policy, so it answers questions a chatbot can only route. For a small store with mostly pre-sale questions, a chatbot or a good help center can be enough.
What is the difference between an AI agent and a chatbot?
A chatbot replies to messages. An AI agent can also call functions you give it, such as an order lookup or a refund request, read the results and keep going until the task is done.
Can an AI agent issue refunds?
It shouldn't move money on its own. A safe design lets the agent open a refund request with the details filled in, and a person approves it.
How does an AI order tracking agent get the order data?
Through a tool: a function in your backend that reads your order system, filtered by the signed-in customer from the store session, and returns only the fields the agent needs.
Do I need a developer to add an AI agent to my store?
Yes, for the tools that read your order data. The widget and the help-center content can be handled by your existing team.
Will an AI customer support agent replace my support team?
It takes the repetitive order questions. Your team still handles approvals, exceptions and anything the agent passes on, with the order already looked up.



