AI for ecommerce
AI for ecommerce sets what customers wrote in the returns box against the reason code they clicked, product by product, and prints the share of returns the tally covers. It also drafts product copy column by column from your attribute table, and marketing email for customers whose consent is on record.
One question, traced, example
41 of 84 return notes say sizing. Only 19 picked "Doesn't fit"
You asked
Why are customers returning the linen shirt, LS-204?
Checked return notes against codes7 steps
-
Read the question
You want the reasons behind returns of one product, the linen shirt LS-204. No period was given, so I used October 2026, the last full month.
-
Decide whether to query
Returns land daily, and the notes are only in the returns data, so this needs a query.
-
Pick the dataset
Used shop.returns, one row per returned item with order ID, SKU, the code chosen from the dropdown and the customer's note. Of October's 120 returns of this shirt, 84 carry a note.
-
Read the tags
Used shop.return_text_tags. The nightly tagging job gives each note one tag from a fixed list of five your team agreed: sizing, colour, fabric, delivery, no longer wanted. Each tag is stored with its return ID, so any tag can be read against the note it came from.
-
Write the query
Count returns by note tag and by dropdown code, for notes only, so both tallies cover the same 84 returns.
WITH returns_with_note AS ( SELECT r.return_id ,r.reason_code FROM shop.returns r WHERE 1=1 AND r.sku = 'LS-204' AND r.returned_at >= DATE '2026-10-01' AND r.returned_at < DATE '2026-11-01' AND TRIM(COALESCE(r.reason_text, '')) <> '' ) SELECT t.tag AS note_says ,w.reason_code AS code_picked ,COUNT(*) AS returns FROM returns_with_note w JOIN shop.return_text_tags t ON 1=1 AND t.return_id = w.return_id GROUP BY t.tag ,w.reason_code ORDER BY t.tag ,returns DESC -
Run the query
Ran against the read-only view. Nothing was written.
Write the answer
Every figure below comes from those 11 rows and the row counts in step 3.
The code they picked
- Changed my mind36
- Doesn't fit19
- Not as described18
- Faulty6
- Other5
What their note says
- Sizing41
- Doesn't fit 17Changed my mind 22Other 2
- Colour17
- Fabric12
- Delivery8
- No longer wanted6
shop.returns, 120 rows for LS-204 in October, 84 with a note.This shirt comes back for its size. 41 of the 84 returns with a note describe it as small, tight or short in the sleeve, yet only 19 of those 84 customers picked "Doesn't fit". 22 of the sizing notes sit under "Changed my mind", which is why that code leads the dropdown tally with 36. Colour is second in the notes, with 17, and 14 of those were coded "Not as described". October had 120 returns of this shirt, and the 36 without a note aren't in either tally.
Show the numbers
| Note says | Code picked | Returns |
|---|---|---|
| Colour | Not as described | 14 |
| Colour | Changed my mind | 3 |
| Delivery | Changed my mind | 5 |
| Delivery | Other | 3 |
| Fabric | Faulty | 6 |
| Fabric | Not as described | 4 |
| Fabric | Doesn't fit | 2 |
| No longer wanted | Changed my mind | 6 |
| Sizing | Changed my mind | 22 |
| Sizing | Doesn't fit | 17 |
| Sizing | Other | 2 |
| The code they picked | Returns | What their note says | Returns |
|---|---|---|---|
| Changed my mind | 36 | Sizing | 41 |
| Doesn't fit | 19 | Colour | 17 |
| Not as described | 18 | Fabric | 12 |
| Faulty | 6 | Delivery | 8 |
| Other | 5 | No longer wanted | 6 |
What AI for ecommerce can do with your records today
What does not work yet
The reason code is whichever option the customer clicked, and the note beside it is the reason in their own words.
What has to be true of your data first
Every return linked to its order ID and SKU
A return that can't be tied to a product can't be counted against it.
The note kept beside the code
If the returns form or the warehouse system keeps only the code, the customer's own words are gone before anyone can read them.
An attribute table with the columns filled
Product copy can only say what a column holds, so a blank column is a gap in the copy.
Marketing consent stored per customer
Store who gave it, when, how and for which email address, because a send list can't be filtered on consent that isn't stored.
The AI readiness assessment runs these four checks on your returns, attribute and consent records, and each one either passes or comes back with a named fix.
Regulation and risk notes for AI in ecommerce
Fake reviews and marketing email, from the source pages, dated.
Fake reviews
Schedule 20 to the Digital Markets, Competition and Consumers Act 2024, on legislation.gov.uk, is headed "Commercial practices which are in all circumstances considered unfair"
. Its paragraph 13(1) sits under that heading. Paragraph 13(5)(b) reads "'fake consumer review' means a consumer review that purports to be, but is not, based on a person's genuine experience"
, and 13(5)(f) reads "'writing' includes creating by any means"
. The page's note reads "Sch. 20 para. 13 in force at 6.4.2025 by S.I. 2025/272, reg. 2(1)(11)"
.
Checked 20 November 2026.
Unfair commercial practices
Section 225 of the same Act, headed "Prohibition of unfair commercial practices"
, says
"Unfair commercial practices are prohibited."
Checked 20 November 2026.
Schedule 20, paragraphs 13(2), 13(5)(d) and 13(5)(i)(ii)
Paragraph 13(2) of Schedule 20 reads
"Publishing consumer reviews, or consumer review information, in a misleading way."
Paragraph 13(5)(i)(ii) is an item in the list at paragraph 13(5)(i). The item reads "giving greater prominence to positive consumer reviews over negative ones (or vice versa)"
. Paragraph 13(5)(d) reads "'consumer review information' means information that is derived from, or is influenced by, consumer reviews"
.
Checked 20 November 2026.
Marketing email
Regulation 22 of the Privacy and Electronic Communications (EC Directive) Regulations 2003, on legislation.gov.uk, says
"This regulation applies to the transmission of unsolicited communications by means of electronic mail to individual subscribers."
Regulation 22(2) reads
"Except in the circumstances referred to in paragraph (3) or (3A), a person shall neither transmit, nor instigate the transmission of, unsolicited communications for the purposes of direct marketing by means of electronic mail unless the recipient of the electronic mail has previously notified the sender that he consents for the time being to such communications being sent by, or at the instigation of, the sender."
Checked 20 November 2026.
Consent records
The ICO's Guidance on direct marketing using electronic mail, on its page "How do we comply with the PECR electronic mail marketing rules?", says
"The key point is that you must get valid consent and you should keep a record of the consent (eg who, when, how) so that you can demonstrate it is valid."
It also says
"For example, the consent someone gives you to receive direct marketing to a particular email address won't cover any other email addresses they use."
The same guidance has a section headed "What are the soft opt-ins and who can use them?"
. "Soft opt-in" is the ICO's term.
Checked 20 November 2026.
The legislation on automated decisions and the ICO's AI guidance are listed once, on the AI for your industry page.
This is a list of the sources we read, with the date. It is not legal advice, and your own adviser decides what applies to you.
Further reading
Contribution per order, and why the shop, the ad platforms and your web analytics count orders differently, are on the ecommerce analytics page. When the notes say a product runs small, the size guide on its page is the first thing to test, which is experimentation and CRO work. Capturing consent at checkout and storing it against the customer is part of tracking and measurement. If you also have shops, AI for retail covers tills, stock and door counts. The KPI library also has a Shopify dashboard, and all of this is part of AI-led analytics.
Questions people ask
Can AI read the reasons on our returns?
Yes, where customers wrote a note. Each note gets one tag from a short list your team agrees first, and the answer sets the tags against the reason codes. Returns without a note keep only their code, and the answer says how many there were.
Can AI write our product descriptions?
It can draft them from your attribute table. Any claim with no column behind it comes out, so a blank fabric field gives a description with no fabric in it, and the gap shows up as a data job.
Can AI write our customer reviews?
No. We don't write reviews. Paragraph 13(1) of Schedule 20 to the Digital Markets, Competition and Consumers Act 2024 sits under the schedule's heading, "Commercial practices which are in all circumstances considered unfair". Section 225 says "Unfair commercial practices are prohibited." Both checked 20 November 2026, and the regulation notes below quote more of the schedule.
Can we send marketing emails that AI has drafted?
Yes. The send list holds only customers whose stored consent allows marketing email, and the record of that consent travels with the list. Regulation 22 of the Privacy and Electronic Communications (EC Directive) Regulations 2003 says "This regulation applies to the transmission of unsolicited communications by means of electronic mail to individual subscribers." Checked 20 November 2026.
What if most of our returns have no note?
Then the tally speaks for fewer customers, and the answer prints the share. In the example above, 84 of 120 returns had a note, so the tally covers 70% of them. The first fix to try, before any AI work, is a returns form that asks for a note once the code is chosen.
Do your returns notes say more than your return codes?
A month of returns for the product that comes back most, with the notes left in, gives the first call a tally of notes against their codes.