Retail and e-commerce · Playbook 21

I've worked in this sector

Customer service agent

Order, delivery and returns questions answered in seconds, on chat, email and phone, from your real systems. Refunds within set limits handled end to end, and people dealing with every exception, complaint and vulnerable customer.

  • Agents with tools
  • Retrieval (RAG)
  • Speech and voice
  • Human in the loop
  • CMA (DMCC Act 2024)
  • Consumer Rights Act 2015
  • Consumer Contracts Regulations 2013
  • PCI DSS v4.0.1
  • UK GDPR and PECR

At a glance

The problem
Most contacts are 'where is my order?' and returns, answered by advisers copying details between four or five systems
Typical volume
Around 50,000 contacts a week, rising two to three times in the weeks around Black Friday and Christmas
Who's involved
Customer service, e-commerce, stores, the warehouse, finance, legal, data protection, security and PCI
Pilot
8–10 weeks on chat after a 3-week discovery, live well before peak
Platforms
AWS, Azure, or a sovereign or on-prem stack

An illustrative scenario. The numbers are typical examples, not a client case study. The cloud services and UK rules were checked on 9 November 2026.

The business problem

A multi-channel retailer takes orders in stores, on its own website and app, and through online marketplaces. Each order touches the order management system (OMS), the warehouse management system (WMS), a carrier's tracking, the payment service provider and, for click-and-collect and store returns, the EPOS. When a customer asks where their parcel is, an adviser opens most of those systems to answer one question.

In a typical retailer of this size, around half of all contacts are order status, delivery problems and returns. They are simple to answer once you can see the data, but they take an adviser four to six minutes each, and they arrive in waves: the Monday after a bank holiday, the week of a carrier delay, and the whole of peak. Queues grow, customers chase on a second channel, and the same order becomes three contacts.

The rules have also sharpened. Since April 2025 the CMA can fine a business directly for breaking consumer law, up to 10% of global turnover. In March 2026 it published guidance on using AI agents with customers: the business is responsible for what its agent says and does, as it would be for an employee. An agent that misstates a customer's right to a refund is not a small error at this volume.

What AI changes

  • Customers get an answer to 'where is my order?' in seconds, on chat, email or phone, taken from the OMS, the WMS and the carrier, not from a script.
  • Delivery problems are handled properly: a parcel lost before delivery is the retailer's responsibility, so the agent arranges a replacement or refund within limits instead of sending the customer to the courier.
  • Returns are booked, labels issued and refunds released when the returned item is scanned in, within value and frequency limits enforced by the refund service.
  • Card details never reach the agent. Refunds go back to the original payment through the payment service provider, and phone payments are masked.
  • Anything outside the rules, any complaint, and any sign that a customer may be vulnerable goes to a person with a summary, so the customer never repeats themselves.
  • The agent never refuses anyone. Declining a refund, a return or a claim is always a person's decision, and every step is logged.

How success is measured

Agree these, and measure the baseline, before anything is built. Example targets are typical, not promises.

Resolved without a repeat contact

Contacts the agent closes where the customer doesn't come back about the same order within seven days. Better than 'containment', which can hide customers who simply gave up.

Example60–70% of order and returns contacts

Time to a person

How long it takes to reach an adviser after asking for one, or after the agent hands over.

ExampleUnder 2 minutes, at peak too

Refund accuracy

A weekly audit sample: was each refund due, the right amount, to the right payment, on time?

ExampleAbove 99%, with every error traced

Rights answered correctly

A test set of consumer-law questions (cancellation, faulty goods, lost parcels), run before every change and monthly.

ExampleEvery test passes before release

Handover quality

Advisers rate whether the summary let them carry on without re-asking.

ExampleRated useful in 9 out of 10 handovers

Complaints about the agent

Complaints that mention the bot, split out for customers flagged as vulnerable.

ExampleFalling, and reviewed weekly

UK regulation and controls

Cross-sector rules are on the UK regulation map.

  • CMADigital Markets, Competition and Consumers Act 2024: unfair commercial practices and direct enforcement

    Since 6 April 2025 the CMA can decide breaches itself and fine up to 10% of global turnover. The agent must not mislead by what it says or leaves out, about prices, delivery or rights. Its answers come only from approved, versioned policies, and legal signs off the consumer-law test set.

  • CMAComplying with consumer law when using AI agents (9 March 2026)

    The retailer is responsible for its agent as for an employee, including where a supplier built it. Tell customers they are talking to an AI, test before go-live, monitor regularly, keep a human in the loop, and make sure refund decisions reflect the right time limits and any extended returns policy.

  • Consumer lawConsumer Rights Act 2015

    Goods must be of satisfactory quality, fit for purpose and as described. A customer can reject faulty goods within 30 days for a full refund, and refunds are due within 14 days of agreeing them. Goods stay at the retailer's risk until delivered, so a lost parcel is never the customer's problem to chase.

  • Consumer lawConsumer Contracts Regulations 2013

    Online, phone and marketplace orders carry a 14-day cancellation period from delivery. The refund, including standard delivery, is due within 14 days of getting the goods back or proof of return. Exceptions, such as personalised or unsealed hygiene items, are a person's call, never the agent's.

  • PCI SSCPCI DSS v4.0.1

    The agent never sees, hears or stores a card number. Refunds use the payment service provider's token for the original transaction. Phone payments use keypad (DTMF) masking, and transcripts and logs are scanned and redacted. This keeps the AI out of PCI scope rather than adding to it.

  • ICOUK GDPR, the Data (Use and Access) Act 2025 and PECR

    Chats, emails and call recordings are personal data, so a DPIA, a clear retention period and a contract that stops providers training on your data. A refused refund is a significant decision, so a person makes it. The agent sends service messages only, never marketing, and PECR fines now match UK GDPR levels.

  • EHRCEquality Act 2010

    Reasonable adjustments apply to service channels. Chat meets WCAG 2.2 AA, the voice agent can be interrupted and slowed down, and every channel offers a person, including a phone number, without the customer having to argue for one.

The solution

Showing AWSAzuresovereign / on-prem services. Switch with the toggle; every diagram and table on this page follows it.

Customer service agent: reference architecture
  1. 01Channels

    • Web and app chat
    • Email and marketplace messages
    • Phone
  2. 02Intake

    • Amazon Connect, or your existing contact-centre platformAzure Communication Services, or your existing contact-centre platformYour existing contact-centre platformChat and contact routing
    • Amazon Transcribe and Amazon PollyAzure Speech in Foundry ToolsOpen-weight speech models (e.g. Whisper)Speech
    • API GatewayAPI ManagementKong, or your existing API gatewayAPI layer
  3. 03Intelligence

    • Bedrock Knowledge BasesFoundry IQ (Azure AI Search)OpenSearch, or PostgreSQL with pgvectorPolicies and help content
    • Agent
      Bedrock AgentCoreFoundry Agent ServiceLangGraph on Kubernetes, with open-weight models via vLLMCustomer service agent
    • Agent
      Bedrock AgentCoreFoundry Agent ServiceLangGraph on KubernetesAdviser assistant
  4. 04Orchestration

    • Step FunctionsLogic Apps / Durable FunctionsTemporalReturns and refund workflow
    • EventBridge + SQSEvent Grid + Service BusApache Kafka or RabbitMQEvents and queues
  5. 05Systems of record

    • Order management system (OMS)
    • WMS and carrier tracking
    • EPOS and store stock
    • Payment service provider
  6. 06People

    • Person
      Customer service adviser
    • Person
      Team leader: refunds over the limit
    • Person
      Complaints and customer care team
  • Cloud or platform service (AWSAzuresovereign / on-prem)
  • AI agent
  • A person decides
  • Your existing systems
  • Outside your organisation

Components, side by side

Customer service agent: components on AWS, Azure and a sovereign or on-prem stack
LayerAWSAzureSovereign / on-prem
Channels and routingKeep the platform your advisers already use if it can hand a conversation to an AI and back. Changing it is a separate project.Amazon Connect (chat, voice, email), or your existing contact-centre platformAzure Communication Services, or your existing contact-centre platformYour existing contact-centre platform
SpeechTest on real calls: regional accents, mobile lines, background noise in a car or a shop.Amazon Transcribe and Amazon PollyAzure Speech in Foundry ToolsOpen-weight speech models (e.g. Whisper) and an open-weight text-to-speech model
Reasoning and repliesBoth clouds offer a choice of models, including Claude. Pick for accuracy on your test set and speed on the phone, not benchmark scores.Amazon BedrockMicrosoft FoundryOpen-weight models served with vLLM on your own GPUs, or IONOS AI Model Hub
Policies and help content (retrieval)Only approved, versioned content: returns policy, delivery options, statutory rights wording. Each answer records which version it used.Bedrock Knowledge BasesFoundry IQ, built on Azure AI SearchOpenSearch, or PostgreSQL with pgvector
Agent runtimeThe original Bedrock Agents closed to new customers on 30 July 2026; new builds use AgentCore.Amazon Bedrock AgentCoreFoundry Agent ServiceAn open-source agent framework (e.g. LangGraph) on Kubernetes
Returns and refund workflowLimits live here, not in the prompt: value, number of refunds per customer per month, and original payment method only.AWS Step FunctionsLogic Apps or Durable FunctionsTemporal, or n8n
Middleware and eventsOrder dispatched, delivery failed, return scanned in, refund issued: each one an event the agent can act on.Amazon EventBridge, SQSEvent Grid, Service BusApache Kafka or RabbitMQ
Link to OMS, WMS and EPOSRead-mostly. The only writes are booking a return, adding a note and asking the refund service to pay.API Gateway, plus your existing integration platform if you have oneAPI Management, plus your existing integration platform if you have oneKong or your existing API gateway, plus your existing integration platform if you have one
PaymentsNo card numbers anywhere in the AI. Phone payments use DTMF masking provided by the contact-centre platform or the payment provider.Your payment service provider's refund API, by tokenYour payment service provider's refund API, by tokenYour payment service provider's refund API, by token
Human handoverThe adviser sees the conversation, what the agent checked and why it handed over.In the advisers' existing contact-centre desktopIn the advisers' existing contact-centre desktopIn the advisers' existing contact-centre desktop
GuardrailsBlock card numbers, promises the systems can't back, and advice outside the agent's job.Bedrock GuardrailsFoundry guardrails (Azure AI Content Safety)Open-source guardrails (e.g. NeMo Guardrails, Llama Guard)
Identity, keys, data protectionCustomers are verified by the platform (signed-in account, or order number plus postcode) before the agent sees any order.IAM Identity Center, KMS, MacieEntra ID, Key Vault, PurviewKeycloak or your existing Active Directory; OpenBao or HashiCorp Vault; an HSM
Monitoring and auditLog every answer, the policy version, every system call, every refund and every handover reason.CloudWatch, CloudTrailAzure Monitor, Log AnalyticsPrometheus, Grafana, OpenTelemetry
UK data residencyIONOS AI Model Hub runs in German data centres: EU, not UK, residency.eu-west-2 (London)UK South / UK WestYour own UK data centre, or a UK or EU provider

On a phone, the table shows the platform you pick. Sovereign / on-prem means open, portable components you can run in your own data centre or with a UK or European provider; IONOS is shown as one example, and others exist. What sovereign cloud means →

Hybrid and on-prem

Many organisations keep core systems and sensitive data on their own servers. This is how the same design works across both.

Stays on-prem

The OMS, WMS, EPOS and merchandising systems stay where they are, whether in your own data centre, in stores or with their suppliers. Card data stays with the payment service provider. The agent never becomes a system of record.

Uses cloud AI

The agent, the policy knowledge, speech and the refund workflow run in AWS or Azure, or on your own GPUs with open-weight models if conversation data must stay in your estate. Only the order fields needed for an answer are sent.

How they connect

A private link (AWS Direct Connect or Azure ExpressRoute) to the API layer in front of the OMS and WMS. Order and return events flow out to the queue, and refund requests come back through the same API layer.

If the link drops

The agent tells the customer it can't see their order right now and offers an adviser or a callback. Contacts route straight to advisers as before the AI. Refund requests wait in the queue and are paid once, never twice, when the link returns.

The agents

What each agent may do through its tools, what it may not, and where a person signs off. The limits are enforced by the platform, not the prompt.

Customer service agent

May do

  • Say up front that it's an AI, and offer a person at any point
  • Look up a verified customer's orders, delivery tracking and returns
  • Book a return or collection and issue a returns label
  • Release a refund or replacement where the policy rule is met, within the value and frequency limits
  • Answer questions on delivery, returns and statutory rights from approved policy content
  • Hand over to an adviser with a summary and the reason

May not do

  • Refuse a refund, return, replacement or claim
  • Refund above the limit, or to anything but the original payment
  • Take, read or store card details
  • Handle a complaint or a customer showing signs of vulnerability on its own
  • Promise a delivery date the carrier hasn't given
  • Change a customer's account, address or payment details, or send marketing

Where a person signs offA person makes every refusal, every exception to policy and every refund over the limit, and handles every complaint. The refund limits and the agent's permissions are enforced by the platform's identity and policy controls and by the refund service, not by instructions in a prompt.

Adviser assistant

May do

  • Summarise a handed-over conversation and the order's history across channels
  • Draft replies to emails and marketplace messages for an adviser to check and send
  • Suggest the relevant policy and show where it comes from

May not do

  • Send anything without an adviser
  • Decide a complaint or an exception
  • Suggest wording that discourages a customer from using their rights

Where a person signs offThe adviser sends every reply and makes every decision. Drafts are marked as drafts until they do.

Middleware and integration

The OMS is the single view of the order. Marketplace orders usually reach it through a channel integration, and store purchases, click-and-collect and store returns through the EPOS. The agent reads the OMS, not each channel, so a store return and an online refund can't both be paid for the same item.

Every refund request carries the order line and return ID as an idempotency key. If the payment provider times out and the workflow retries, the customer is refunded once. The refund ledger in the OMS is checked before every payment.

Events decouple the agent from the systems of record. If the WMS or a carrier feed is slow, the agent says so honestly instead of guessing, and peak volumes queue rather than overload the OMS.

The agent can be switched off by channel without stopping the business. Paused, contacts go straight to advisers exactly as they did before.

Process and people

  • A named owner for the returns policy, delivery content and statutory rights wording, with legal sign-off on every change.
  • Refund limits set by finance, reviewed monthly against fraud and error, and changed only through the refund service.
  • An exception queue for handovers, staffed for peak, with a target time to a person.
  • Advisers trained before go-live on what the agent can and can't do, and on how to feed back wrong answers.
  • A weekly review of a sample of conversations, including every complaint about the agent and every vulnerable-customer handover.
  • A change freeze from early November to January. New features go live before peak or after it, never during.

Delivery plan

  1. 3 weeks

    Discovery

    Measure contact reasons and handling times, map the OMS, WMS, EPOS and payment APIs, and agree refund limits and the consumer-law test set.

  2. Gate · must be true to passBaseline agreed, API access confirmed, DPIA and PCI scoping done, legal involved.

  3. 8–10 weeks

    Pilot

    Order status on web chat first, in shadow mode and then live for a share of customers. Returns and refunds follow once the test set passes.

  4. Gate · must be true to passRights test set passing, refund audit clean, time to a person within target, legal and customer service sign-off.

  5. 4–6 weeks

    Production

    All chat traffic, then email, with monitoring, peak load testing and a rollback switch per channel. Live by the end of September.

  6. Gate · must be true to passPeak load tested, rollback rehearsed, advisers trained, monitoring in place.

  7. Ongoing

    Scale

    Phone, then marketplace messages, then other contact reasons one at a time.

  8. Gate · must be true to passEach new channel and contact reason passes the same pilot gate.

Roles and RACI

Who is responsible, accountable, consulted and informed, by activity
ActivityCustomer service directorProduct ownerSolutions architectI can fill thisTechnical PMI can fill thisEngineersI can fill thisLegal & DPOSecurity & PCII can fill this
Business case and benefitsAccountableResponsibleConsultedConsultedInformedConsultedInformed
Target architectureInformedConsultedAccountable and ResponsibleConsultedConsultedConsultedConsulted
Consumer-law test set and DPIAAccountableConsultedConsultedInformedInformedResponsibleConsulted
PCI scoping and payment integrationInformedConsultedAccountableConsultedResponsibleConsultedResponsible
Build and integration with OMS, WMS, EPOSInformedConsultedAccountableResponsibleResponsibleInformedConsulted
Go-live decisionAccountableResponsibleConsultedResponsibleInformedConsultedConsulted
Run, monitor and improveInformedAccountableConsultedConsultedResponsibleConsultedConsulted

Business case and benefits

Customer service director
A · Accountable
Product owner
R · Responsible
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
I · Informed
Legal & DPO
C · Consulted
Security & PCI
I · Informed

Target architecture

Customer service director
I · Informed
Product owner
C · Consulted
Solutions architect
A/R · Accountable and Responsible
Technical PM
C · Consulted
Engineers
C · Consulted
Legal & DPO
C · Consulted
Security & PCI
C · Consulted

Consumer-law test set and DPIA

Customer service director
A · Accountable
Product owner
C · Consulted
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
I · Informed
Legal & DPO
R · Responsible
Security & PCI
C · Consulted

PCI scoping and payment integration

Customer service director
I · Informed
Product owner
C · Consulted
Solutions architect
A · Accountable
Technical PM
C · Consulted
Engineers
R · Responsible
Legal & DPO
C · Consulted
Security & PCI
R · Responsible

Build and integration with OMS, WMS, EPOS

Customer service director
I · Informed
Product owner
C · Consulted
Solutions architect
A · Accountable
Technical PM
R · Responsible
Engineers
R · Responsible
Legal & DPO
I · Informed
Security & PCI
C · Consulted

Go-live decision

Customer service director
A · Accountable
Product owner
R · Responsible
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
I · Informed
Legal & DPO
C · Consulted
Security & PCI
C · Consulted

Run, monitor and improve

Customer service director
I · Informed
Product owner
A · Accountable
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
R · Responsible
Legal & DPO
C · Consulted
Security & PCI
C · Consulted

R ResponsibleA AccountableC ConsultedI Informed· not involved

Where I'd fit

Option A

Lead the architecture

If there's no architect on the programme, I'd own the design end to end: how the agent reads your OMS, WMS and EPOS, the refund service and its limits, the PCI boundary, and the gates. I'd report to your programme board and work closely with your customer service and legal leads.

Option B

Support your architect

If your partner or your own team already has an architect, I'd take on the integration with the order, warehouse, store and payment systems under their lead, and give them a second senior opinion on the agent's permissions, PCI scope and peak readiness.

Where this goes wrong

  1. Goes wrong

    The agent tells a customer to chase the courier, or says they're out of time when they aren't.

    How the design avoids it

    Answers come only from approved policy content, and a consumer-law test set signed off by legal runs before every release.

  2. Goes wrong

    Customers can't reach a person, and complaints move from the queue to social media.

    How the design avoids it

    A person is offered up front and on request, time to a person is measured, and the agent hands over after two failed attempts.

  3. Goes wrong

    Refund limits are written in the prompt, so a determined customer talks the agent past them.

    How the design avoids it

    Limits are enforced by the refund service, and the agent can only ask it to pay.

  4. Goes wrong

    Card numbers turn up in chat transcripts and call recordings.

    How the design avoids it

    DTMF masking on the phone, redaction on every channel, and the AI kept out of PCI scope.

  5. Goes wrong

    It goes live in November and meets peak on day one.

    How the design avoids it

    Live by the end of September, load tested at peak volumes, with a change freeze through to January.

On the horizon

Changes already announced or under way that affect this design. More in the UK horizon scan.

  1. 1 January 2027
    The DMCC Act subscription contracts regime starts

    It covers subscriptions taken out from that date, with new rules on pre-contract information, reminders and cancellation. If you sell a delivery pass or a subscribe-and-save option, the agent must handle cancellation simply and without obstruction. Draft regulations and guidance were published in October 2026.

  2. 2026–2027
    The ICO's code of practice on AI and automated decision-making

    Regulations in force since May 2026 require the ICO to produce a statutory code. Keep refund decisions, explanations and human review records in a form you could show the ICO.

  3. 2026 onwards
    Regulators' joint work on agentic AI

    The CMA, FCA, ICO and Ofcom published a joint statement on agentic AI through the DRCF in October 2026. Customers' own AI agents will start contacting your service. Decide now how they are verified, and apply the same limits as to a person.

  4. Late 2026–2028
    The Cyber Security and Resilience Bill

    Medium and large managed service providers come into regulation, with faster incident reporting. Expect your contact-centre, cloud and AI suppliers to face new duties, and your contracts and supplier assurance to need updating.

Questions to ask your partner or vendor

Good answers are specific. Vague answers to any of these are worth following up.

Copy them into your next supplier meeting

  1. Where are the refund limits enforced, and what stops the agent being talked past them?
  2. How will we test that the agent states customers' rights correctly, and who signs that off?
  3. What happens to a customer's conversation when the OMS or a carrier feed is down?
  4. How does the design keep the AI out of PCI DSS scope?
  5. How quickly can a customer reach a person, on every channel, at peak?
  6. What does it cost per thousand contacts at our peak volume, not an average week?

Planning something like this?

Whether you need someone to lead the design or to support the architect you already have, let's talk it through.

Sam Naseem
Sam NaseemBirmingham, UK · UK & Europe
Available now