AI customer support agent for a D2C ecommerce brand

Online brands answer the same order, delivery and returns questions hundreds of times a day. This is how we'd build an AI agent that resolves the routine ones end to end and hands everything else to a person with the context already gathered.

Industry

D2C ecommerce

Typical timeline

8–10 weeks

Typical team

4 people

AI customer support agent for a D2C ecommerce brand

The situation

Picture a D2C skincare brand selling across India and the Gulf. It ships a few thousand orders a week from one warehouse, sells on Shopify, ships through two couriers and runs support in Gorgias with a team of eight.

Most of that team's day goes on the same handful of questions. Where is my order? Can I change my address? How do I return this? When will my refund arrive? Each one means opening Shopify, finding the order, copying a tracking number from the courier portal and pasting a reply. None of it is hard. It is just slow, and it piles up. After a sale or a festival weekend the queue can sit at a day or more, and the questions that need real judgement, such as a damaged product or an unhappy repeat customer, wait behind the easy ones.

Hiring more agents only helps until the next peak. What the brand needs is something that answers the routine questions properly, with the customer's real order data, and gives the team their time back for the conversations that need a person.

Signs this blueprint fits you

  • More than half of your tickets fall into five or six repeatable intents.

  • Your agents switch between three or more tabs to answer a simple question.

  • Response times jump during sales and take days to recover.

  • Your policies are written down, even if they live in a help centre and a few internal docs.

What we'd build

  • An agent service that reads each incoming chat or email, works out what the customer wants and decides the next step: answer, act, ask a question or hand over.

  • Order and returns tools: a small internal API with one function per action the agent is allowed to take, such as looking up an order, sharing tracking, changing an address before dispatch or starting a return.

  • A policy knowledge base built from your help-centre articles, returns policy and shipping rules, so answers match what your best agent would say.

  • Guardrails and an audit log: limits written in code, not only in the prompt, and a record of every action the agent took and why.

  • A review queue in your helpdesk where the team sees every AI conversation, picks up escalations with a summary, and can pause the agent with one switch.

Architecture of an AI support agent for a D2C brand: chat and email channels, the agent service with tools, knowledge base and guardrails, connected to Shopify, the courier API and Gorgias

How the pieces fit

Channels

Website chat and the support inbox both feed into the helpdesk you already use. The agent works inside that helpdesk rather than as a separate bot, so there is one history per customer and your team never has to look in two places. WhatsApp can be added in a second phase through the same helpdesk integration.

The agent service

This is the part we build and run. For each message it classifies the intent, pulls the customer's recent orders, retrieves the relevant policy passages and decides what to do. We keep the model choice open: OpenAI or Anthropic models both work well here, and the service is written so the model can be swapped without rewriting the rest.

Tools, not database access

The agent never queries Shopify or the courier directly. It calls our tools layer, and each tool does one narrow job with its own checks. "Change address" first confirms the order hasn't been handed to the courier. "Issue store credit" refuses anything above the limit you set. This is what keeps a language model from doing something nobody approved.

Knowledge base

Policies are split into short passages and indexed for search. When the agent answers a returns question, it quotes the passage it relied on, and that passage is stored with the conversation. If an answer is wrong, you can see whether the model misread the policy or the policy itself was unclear.

One conversation, end to end

Here is a common request traced through the system: a customer who has moved and wants their order delivered to the new address.

One support conversation end to end: a customer asks to change a delivery address, the agent checks the order, applies the policy, updates Shopify and replies

The agent only acts because a rule allows it: the order is packed but not yet with the courier. Had the parcel already shipped, the same conversation would end differently. The agent would explain the options, such as redirecting through the courier or returning to origin, and hand the chat to a person with the order details and a one-line summary already written.

What your support team would see

Example review screen in the helpdesk showing AI-handled and escalated conversations, with the agent's summary and actions on the selected ticket

The review queue sits inside the helpdesk. Every conversation the agent touched is listed, with resolved and escalated ones separated. An escalated ticket opens with the AI's summary, the relevant order facts and the policy that stopped it from acting, so the agent picking it up starts from context instead of from scratch.

Data and integrations

System

The agent reads

The agent writes

How we connect

Shopify

Orders, fulfilment status, customer history

Address changes, return requests, store credit within limits

Admin API with a scoped private app

Courier (for example Shiprocket or Delhivery)

Tracking events, handover status

Address-change requests where supported

Courier REST API or webhooks

Gorgias or Zendesk

New tickets, customer messages, tags

Replies, internal notes, tags, assignments

Helpdesk API and webhooks

Help centre and policy docs

Articles, returns and shipping rules

Nothing

Scheduled sync into the knowledge base

Guardrails we'd agree up front

Action

The agent may do it when

Otherwise

Share tracking

The email or phone matches the order

Asks for the order number and email

Change address

The parcel hasn't been handed to the courier

Explains options, hands to a person

Start a return

Inside the return window and the product is returnable

Explains the policy, offers a person

Issue store credit

Below the amount you set, once per order

Escalates with a recommendation

Refund to card

Never on its own in phase one

Prepares the refund for a person to approve

Delivery plan

Ten-week delivery plan for the AI support agent, from ticket analysis to shadow mode and go-live

The plan is built around one idea: the agent earns its responsibilities one intent at a time. It starts in shadow mode, where it drafts replies and your team approves or edits them. Only intents that pass an agreed accuracy bar go live, and the rest stay in shadow until they do.

The team

Role

Time

What they own

Engagement lead

Part time

Scope, weekly demos, decisions with your support head

AI engineer

Full time

Agent logic, prompts, evaluations, knowledge base

Backend engineer

Full time

Tools layer, Shopify, courier and helpdesk integrations

QA engineer

Weeks 5–10

Replay testing, regression suite, shadow-mode review

On your side we'd need a support lead for about two hours a week, and someone who can approve policy wording.

What changes the effort

  • Number of intents in phase one. Five well-defined intents is a comfortable start. Fifteen roughly doubles testing.

  • Actions versus answers. An agent that only answers questions is quicker to build than one that changes orders and issues credit.

  • Languages. English only is the baseline. Adding Hindi or Arabic adds evaluation work per language.

  • Courier coverage. One courier with a good API is simple. Several regional couriers with different APIs add integration time.

  • State of your policies. If returns rules exist only in people's heads, we write them down first.

Risks and how we'd handle them

Risk

What we'd do

The agent gives a wrong or made-up answer

It answers only from your policies and live order data, cites the passage it used, and says it will check with the team when confidence is low.

A costly action goes through by mistake

Money-moving actions have hard limits in code and are logged. Refunds to card stay with a person in phase one.

Customers feel stuck with a bot

"Talk to a person" works at any point and hands over immediately, with the conversation and summary attached.

Policies change and the agent falls behind

The knowledge base re-syncs from the help centre on a schedule, and a policy owner gets a weekly digest of escalation reasons.

Customer data leaves your control

Only the fields needed for the answer are sent to the model, through enterprise endpoints that do not train on your data.

What we'd measure

Metric

How we'd measure it

Baseline from

Share resolved without a person

Conversations closed by the agent with no reopen in 72 hours

Not applicable today

First response time

Helpdesk timestamps, split by AI and human

Last three months of tickets

Time to resolution

Ticket open to close, per intent

Last three months of tickets

CSAT

Post-chat survey, AI-handled versus human-handled

Your current CSAT

Escalation reasons

Tagged on every hand-off, reviewed weekly

Builds up from week one

Build or buy?

Helpdesks now ship their own AI features, and for some brands that is enough. If you mainly need answers to FAQ-style questions from your help centre, start there; it is cheaper and faster. A custom agent earns its place when you want it to act on real orders under your own rules, work across Shopify, a courier and the helpdesk at once, and keep the model and the data under your control. Many brands do both: the helpdesk's built-in AI for simple FAQs, and a custom agent for order changes, returns and anything that touches money.

Questions we'd ask on the first call

  • Which five questions take up most of your team's time?

  • Which actions would you be comfortable letting software take on its own, and up to what value?

  • Where do your policies live today, and who signs off changes?

  • Which couriers do you use, and which of them have usable APIs?

  • What does a good week look like for your support team?

FAQ

Will customers know they are talking to an AI?

Yes. We recommend saying so in the first message. Customers mind far less about talking to an AI than about being unable to reach a person, so the hand-off matters more than the disclosure.

Do we need to replace our helpdesk?

No. The agent works inside Gorgias or Zendesk through their APIs, so your team keeps its inbox, macros and reports.

What happens when we change a policy?

You update the help-centre article as usual. The knowledge base picks up the change on its next sync, and for urgent changes we can trigger a sync by hand.

:: Typical stack

Shopify Admin API, Zendesk or Gorgias, OpenAI or Claude, vector search, Node.js

:: Related service

AI agent development

See the service

Watercolour meadow landscape

Send us your brief. We’ll help turn it into reality

A senior engineer replies within one business day with questions or a first plan: approach, team, timeline and estimate.

Let’s talk

Prefer WhatsApp?

Chat with our team

WhatsApp

or leave us a short brief

No spam, no mailing list. NDA available on request.