By Smári Ásmundsson · · 7 min read
AI agents for ecommerce: what a CPG brand should hand over and what should check the work
What can AI agents for ecommerce run for a CPG brand, and what should check their work?
An AI agent is a piece of AI that does a task on its own, without you typing each step. It can run an ecommerce job when the job repeats, the input arrives in varying words, and a wrong answer can be caught and undone. In a CPG brand that means sorting order exceptions, drafting review replies and drafting updates to the product pages on your website and on Amazon. Restock alerts belong to a plain rule, and anything that moves money or could hurt a customer belongs to a person. Every agent job also needs a check that sits outside the agent and tells a named person when the work was not done. The same sort works for wholesale jobs such as a distributor's short-pay.
Which ecommerce jobs suit an agent and which suit a plain rule?
A rule is an if-this-then-that instruction a computer follows exactly. The same input gives the same output every time. An agent earns its place where the input is words and the right answer takes judgment: a customer's email about a missing box, a review that says the flavor tasted odd, a spec sheet that has to become a product page.
Ask two questions of each job, in order, and stop at the first yes.
- Can you write the answer as if-this-then-that? If yes, it is a rule. It is cheaper and faster, and it never has a bad day.
- Could a wrong answer hurt a customer, move money or be impossible to undo? If yes, a person decides, and an agent may draft.
A job that gets two no answers goes to an agent, and it gets a check before it runs once.
Here is the sort for a made-up brand, Harbor Oat Co. It is illustrative, not a real company, and every number below is invented.
Restock alerts go to a rule. Days of stock left is units on hand divided by units sold per day. When that drops below the supplier's lead time plus a buffer, send the alert. That is arithmetic, and an agent adds only a new way to get the arithmetic wrong. At most, let it write the one-line reason inside the alert.
Order exceptions go to an agent, with a limit. An exception is an order that cannot ship as placed: an address the carrier rejects, a product that ran out, a customer asking for a change after the label printed. The wording varies, so a rule cannot sort them. The agent reads each one, puts it in a pile and proposes the fix. A refund above a limit you set, say $75 (an illustrative figure) for Harbor Oat Co., goes to a person.
Review replies go to an agent for the draft and to a person for the risky ones. A review that mentions an allergy, an illness or a safety worry gets a person every time. For a food brand that reply is a health matter, not a tone matter. The agent drafts the rest.
Wholesale jobs sort the same way. A short-pay on a distributor's remittance is an order exception with a different name. The agent reads the deduction and drafts the dispute, a person signs anything above your limit, and the check is that the remittance total adds up to the invoices it claims to pay. A retail buyer's purchase order whose prices differ from your price list is a rule: compare the numbers and flag every mismatch.
Product page updates split in two. A price or stock count copied from one system to another is a rule. New page copy built from a spec sheet is an agent job. Any line that makes a claim about ingredients, allergens or health stays with a person, because a wrong word there is a claim you answer for.
What check proves an agent finished an order exception?
A check that counts. Every exception the agent touches ends in exactly one of three states: closed with a confirmation, handed to a named person, or still open. A confirmation comes from outside the agent: the carrier accepted the new address, or the customer replied yes.
Each morning a second small scheduled job does the count. (A scheduled job is a short set of written instructions a computer runs at a set time.) Yesterday's open exceptions, plus today's new ones, minus the closed ones, must equal the open count in your store. If the numbers disagree, an exception fell through, and the job names the order numbers. "The agent says it is done" is not a state. The confirmation is the proof, and the agent's own report is not.
When should an agent stop and ask a person?
Write the stops into its instructions before it runs once. Four are enough to start.
- Money above your limit.
- A word on your list: allergy, sick, lawyer, chargeback, and the names of your retail buyers.
- Anything it cannot undo, such as a refund already sent or an order already shipped.
- A case it cannot match to what you told it. "I am not sure" is a good answer, and the instructions should say so.
An agent with no stops answers everything, and that is the risk. Which AI agents should a small CPG brand use, and how should it choose? covers picking one by the job.
How do you know an agent job has stopped working?
Make it report every time it runs, including when it did nothing. Each run posts one line to a named person: "Ran at 6:00 AM Pacific, handled 14, handed over 3." Then a second, separate job looks for that line by 9:00 AM Pacific, and a missing line is the alarm. The second job has to be separate because a job cannot report its own death. The named person is whoever owns that job today, whether that is you or the person who runs your operations. You describe both jobs in plain English and Claude, the AI assistant I use, writes the instructions.
Treat a zero as suspicious too. A brand that normally sees a handful of exceptions a week and suddenly sees none has probably lost the link between the store and the job. It does not have a perfect week.
I have paid for checking the wrong thing. A system I built passed 121 automated tests on the night it produced junk. (An automated test is a small check a computer runs on its own.) The tests asked whether the job ran and never asked whether the result was any good. I wrote that up in Green tests measure the wrong thing. The fix is a second AI that reads the first one's output and checks it against your rules, which is the subject of The AI that audits the AI.
Sort your own jobs in thirty seconds
In the older days you would list every recurring job in your store in a spreadsheet, walk each one through the two questions, decide who does it, then write a check for every job you gave to an agent and work out who hears about a failure. For a brand with a dozen jobs that is an afternoon, about four hours. And four hours later you have a spreadsheet and nothing running.
Today, give this to Claude, an AI assistant you can type to like a colleague, and you have your sorted list, with a check written for every agent job, in thirty seconds. (A prompt is just the instructions you type in; you can paste this one as it is.) Type your list of jobs, one per line, under the instructions.
You are helping the owner of a small food and beverage brand that sells online. The owner is not technical. Use plain English, and explain any technical term in the same sentence you use it.
Below these instructions is a list of the repeating jobs in my online store, one per line. Sort each job into exactly one of three groups.
RULE: a computer can follow an exact if-this-then-that instruction, and the same input always gives the same answer.
AGENT: an AI helper that does a task on its own. Use it when the input arrives in varying words, the right answer takes judgment, and a wrong answer can be caught and undone.
PERSON: a wrong answer could hurt a customer, move money above a limit, or cannot be undone.
If a job is partly one group and partly another, split it into two lines and say why.
For every job in the AGENT group, write:
1. The check that proves the job was done, in one sentence. It must rely on a confirmation from outside the agent, such as a carrier scan, a customer reply or a count that has to add up. The agent's own report never counts.
2. The stops: the situations where the agent must stop and hand the job to a person.
3. The one-line message the agent sends each time it runs, including when it did nothing, and the time of day a second job should look for that message.
End with one plain sentence naming which job to hand over first and why.
My list of jobs:
If you would rather have those jobs built and watched for you, Workflow Build is the page for that.
Services
Workflow BuildYou stop doing the job that keeps coming back, and it stops being the thing that slips when the week gets busy. Those hours go back into the work that actually grows the brand.
CPG AI Assessment
Fix the CPG workflow that keeps landing back on your desk.
I map the recurring reporting or operating workflow first, then build only when the first useful fix is clear.