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.

Last reviewed ยท Virgo Analytics

One question, traced, example

41 of 84 return notes say sizing. Only 19 picked "Doesn't fit"

Example data

You asked

Why are customers returning the linen shirt, LS-204?

Checked return notes against codes7 steps

  1. 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.

  2. Decide whether to query

    Returns land daily, and the notes are only in the returns data, so this needs a query.

  3. 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.

    shop.returns120 rows84 with a note

  4. 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.

    shop.return_text_tags

  5. 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
  6. Run the query

    Ran against the read-only view. Nothing was written.

    11 rows

Write the answer

Every figure below comes from those 11 rows and the row counts in step 3.

The code they picked

  1. Changed my mind36
  2. Doesn't fit19
  3. Not as described18
  4. Faulty6
  5. Other5

What their note says

  1. Sizing41
  2. Doesn't fit 17Changed my mind 22Other 2
  3. Colour17
  4. Fabric12
  5. Delivery8
  6. No longer wanted6
One tag per note, from a fixed list of five, stored beside the note.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
The 11 rows, in query order, example data
Note saysCode pickedReturns
ColourNot as described14
ColourChanged my mind3
DeliveryChanged my mind5
DeliveryOther3
FabricFaulty6
FabricNot as described4
FabricDoesn't fit2
No longer wantedChanged my mind6
SizingChanged my mind22
SizingDoesn't fit17
SizingOther2
Tallies drawn from the 11 rows (both total 84), example data
The code they pickedReturnsWhat their note saysReturns
Changed my mind36Sizing41
Doesn't fit19Colour17
Not as described18Fabric12
Faulty6Delivery8
Other5No longer wanted6

11 rowsread-onlynothing written

Example data: an invented clothing shop's October 2026 returns for one shirt. The dropdown tally and the note tally cover the same 84 returns, so the two bars can be read against each other. For a trace you can watch run, try the AI-led demo: three scripted questions on invented data, none of them about returns.

What AI for ecommerce can do with your records today

Return notes against reason codesThis is the worked example above. The AI gives each note one tag from a list your team writes, stores the tag beside the note, and counts tags against codes. Before anyone uses a tally, someone on your team reads a batch of notes beside their tags and marks each tag that doesn't fit the words. It needs the returns table with the note, the order ID and the SKU on every row.
Product copy from the attribute tableThe AI drafts one product's description from its row, one sentence per filled column: material, measurements, care, country of origin, whatever the table holds. Each sentence carries the column it came from, and a sentence with no column behind it stays out of the draft. It needs an attribute table with one row per SKU and the columns filled in.
Marketing email to a consent-filtered listThe AI drafts copy for a segment, such as customers whose last order was a linen shirt, and the send list holds only customers whose stored consent allows marketing email. It needs consent stored per customer, per email address, with when and how it was given.

What does not work yet

Returns with no noteA blank note has nothing to read. In the example above, 36 of 120 returns had none, and for those the code is all there is.
Two reasons in one noteA note such as "Lovely fabric, shame about the sleeves" gets one tag, so the second reason drops out of the tally.
Writing reviewsWe don't generate review text that reads as a customer's own experience. The regulation notes below quote the Act's text.

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.

Book a call

Free 30 min call