Yapay Zeka Ajanları

E-Commerce Professionals

AI Agents for E-Commerce — 6 critical jobs, end-to-end

Product copy, multi-channel customer support, visual factory, cart abandonment recovery, dynamic pricing and inventory management. For each: tools, real prompts, and the full end-to-end Claude Code build.

30%+
Cart abandonment recovery
10x
Product copy generation speed
70%
Support tickets automated
24/7
Multi-channel customer support

Supported Platforms

Which e-commerce platforms does this guide work with?

Shopify

Widest API + webhook ecosystem. Best fit for AI agents.

WooCommerce

WordPress plugin; REST API + webhooks. Self-host flexibility.

Magento / Adobe Commerce

Enterprise scale; mature GraphQL/REST API.

BigCommerce / Wix Commerce

Mid-market platforms; good API + webhook story.

Etsy / eBay / Amazon

Marketplace APIs exist but scraping/ToS need care.

6 Core Jobs

The daily e-commerce operation, supercharged with AI

For each section: the situation + what AI does + recommended tools + metrics + example prompt + ⭐ end-to-end Claude Code build.

01
Task area

Product Copy & SEO Content Generation

The e-com operator's most tedious job: writing 500 product descriptions for 500 SKUs. Ten models in one category, in three languages, SEO-friendly, in brand voice. AI does it in minutes — under 30 seconds per SKU.

What AI does

  • Long + short description + bullet list from one attribute set
  • Multi-language translation (EN → DE/AR/RU/ES with country-specific terms)
  • SEO meta title + meta description + alt-text automation
  • Category-based templates: 'cosmetics' / 'electronics' / 'apparel' tone
  • Auto-updated 'low stock' FOMO notice as inventory drops
  • Comparison table generation (within-category SKUs)

Recommended tools

Claude SonnetChatGPTGeminiShopify/WooCommerce APIn8n

Expected outcomes

  • 500 SKUs in 4 hours (vs 2-3 weeks manually)
  • $25-50/month API cost for a mid-sized catalog
  • Organic search traffic +25-40% in 3-6 months

Example prompt: Single-shot product copy + SEO meta

Prompt
Generate e-commerce listing content for the product below. Our brand voice: energetic, friendly, honest.

PRODUCT:
- Name: Premium Hair Conditioner 250ml
- Brand: Naturally Yours
- Ingredients: Argan oil, biotin, vitamin B5
- Hair type: Damaged / colour-treated
- Use: 3-5 minutes after shampoo
- Price: $19
- Tags: vegan, paraben-free

OUTPUT:
1) TITLE (60 chars SEO-friendly)
2) META DESCRIPTION (155 chars)
3) SHORT DESCRIPTION (Shopify "summary" - 2 sentences)
4) LONG DESCRIPTION (4 paragraphs: problem → solution → benefit → use)
5) BULLET LIST (5 main benefits)
6) CROSS-SELL COPY tone
7) ALT-TEXT for the product image
8) Instagram/TikTok caption (under 50 words, 3 hashtags)

English primary, also provide a Spanish translation.

End-to-end build with Claude Code

Have Claude Code build a Shopify/WooCommerce 'content factory' pipeline: when a product is added, a webhook fires, attributes get loaded, Claude Sonnet generates multi-language SEO copy + social posts and writes back via API. Before publish, items pause in a review queue for human approval.

Flow

Shopify webhook (product/create)
Attribute fetch
Claude Sonnet (multi-lang)
Review queue
Shopify API update

Ready prompt for Claude Code

Prompt
You are a developer building an 'AI product content factory' for an e-commerce business.

Goal: /src/ecommerce/productContent/ folder.

Components:
1. /src/ecommerce/productContent/types.ts — Zod schemas:
   - ProductAttributes (name, brand, category, attributes Record, price, currency)
   - GeneratedContent (title, metaDescription, shortDesc, longDesc, bullets[],
     crossSellCopy, altText, social: { instagram, tiktok }, translations: Record<lang, ...>)

2. /src/ecommerce/productContent/generator.ts — generateContent(attrs, languages)
   - Call Anthropic Claude Sonnet, system prompt with brand voice (from brandVoice.md).
   - Structured output matching GeneratedContent.
   - languages param: ['en', 'es', 'de'] etc.

3. /src/ecommerce/productContent/shopify.ts
   - listenWebhook(): handle Shopify 'products/create' and 'products/update'
   - fetchProductAttrs(productId)
   - updateProductContent(productId, content) — write back via Storefront API
   - HMAC signature verification (Shopify-Hmac-Sha256)

4. /src/ecommerce/productContent/reviewQueue.ts
   - Postgres 'content_review_queue': id, product_id, generated_content,
     status ('pending'|'approved'|'rejected'), created_at, reviewer
   - Web UI (/admin/content-review): pending list + side-by-side comparison
     (current vs generated) + Approve/Edit/Reject buttons
   - On approve → PATCH Shopify

Category-based templates at /src/ecommerce/productContent/templates/
  - cosmetics.md, electronics.md, apparel.md
  - tonal rules + must-have keywords per category

5. Cost controls:
   - Generate at most once per product (idempotency: product_id + content_hash)
   - Daily budget cap (env var). On exceed mark queue items 'budget_exceeded.'

Plan first.
Pitfall

500 product descriptions without a brand voice doc are AWFULLY same-y — '100% natural, premium quality, must-have!' filler. Fix: put 5-10 brand-voice samples into brandVoice.md so Claude can learn from them. Have each output return a 'tone_check' score and send low scores to the review queue for manual edits.

02
Task area

Customer Support Bot (WhatsApp + Web + Instagram DM)

The e-com support inbox: 'where is my order?', 'how do I return?', 'lost package,' 'can I exchange a size?' — 70% repetitive simple questions. An AI bot answers them itself; the rest go to humans. Always on, instant reply.

What AI does

  • Multi-channel: WhatsApp Business + Instagram DM + web widget + Telegram
  • Order tracking (live status by tracking number)
  • Return/exchange initiation (policy check + approval flow)
  • RAG-grounded cited answers to FAQs
  • Auto-escalation on complaint/refund/high-value cases
  • Multilingual (EN/DE/RU/AR for tourist regions)

Recommended tools

Claude SonnetWhatsApp Cloud APIMeta Graph API (IG)Supabase pgvectorn8n

Expected outcomes

  • 5,000 messages/month automated (~$30 API)
  • Average response: 2 hours → 8 seconds
  • 70-80% first-contact resolution; 20-30% human escalation

Example prompt: Multi-channel support bot system prompt skeleton

Prompt
You are a professional customer support assistant for [STORE_NAME].

SCOPE:
- Order status, shipping tracking
- Return and exchange procedure
- Product questions (RAG: physical specs, use, size chart)
- Promotion / campaign info
- Store info (locations, hours)

LIMITS:
- Never ask for national ID, card number or CVC. If the customer provides one, ask 'please don't share that.'
- Don't negotiate price; only active system coupons are valid.
- On shipping delay: sincere apology + ETA + refund eligibility.
- If 'complaint' / 'manager' / 'refund' / 'lost package' appears, call get_human_agent.

FORMAT:
- Short paragraphs, bullets when useful.
- End each reply with 'Anything else I can help with?'
- English, warm but professional.

TOOLS:
- get_order_status(order_id)
- start_return(order_id, reason)
- search_knowledge_base(query)  # RAG
- get_human_agent(reason, summary)

End-to-end build with Claude Code

Have Claude Code build a 'multi-channel e-com support bot': WhatsApp + Instagram + web widget connect to one agent that pulls order info from Shopify/WooCommerce APIs, retrieves products/policy from a vector DB, and escalates to Slack. The 9 stages of the Customer Assistant guide apply directly.

Flow

WhatsApp/IG/Web Webhook
Burst Buffer (5s)
Claude Sonnet + RAG
Tools: order/return/handoff
Channel-specific Send

Ready prompt for Claude Code

Prompt
You are a developer building a multi-channel support bot for an e-commerce business.

Goal: /src/ecommerce/support/ folder.

Components:
1. /src/ecommerce/support/agent.ts
   - customerSupportAgent({ message, channel, userId, attachments })
   - System prompt = brandVoice.md + supportRules.md
   - Memory: Postgres session_id = channel:external_id ('whatsapp:90...').
   - Vector retrieve: top_k=5 from product_kb (specs) + policy_kb (return rules)

2. /src/ecommerce/support/tools/
   - getOrderStatus.ts — Shopify GraphQL: order status + tracking number
   - startReturn.ts — Shopify Returns API based on policy
   - searchKnowledge.ts — pgvector hybrid search
   - escalateToHuman.ts — post to Slack 'support-escalations'

3. /src/ecommerce/support/channels/
   - whatsapp.ts — Meta Cloud API, 24-hour window, template message support
   - instagram.ts — Meta Graph API IG Messenger
   - webWidget.ts — Express endpoint + JS widget script
   - all: HMAC verify + rate limit (IP + session)

4. /src/ecommerce/support/ingestion.ts
   - Nightly cron: index Shopify product feed into pgvector
   - Markdown files in /policy: chunk + embed return/shipping policies

5. /src/ecommerce/support/monitoring.ts
   - Per interaction: { session_id, channel, intent, tool_called, resolved, escalated, latency_ms, tokens }
   - Postgres 'support_events'
   - Weekly Slack report: resolution rate, avg latency, top intents, escalation reasons

Plan first.
Pitfall

Don't call start_return immediately when a customer says 'I want a refund.' First fetch the order, check if it's within the return window, ask the reason (needed for clean records), then start. Otherwise 'wrong item arrived' gets misfiled as 'didn't like it' — shipping cost lands on the wrong party.

03
Task area

Visual Generation & Social Marketing

An e-commerce brand's visual hunger is endless: product photos, campaign banners, Instagram posts, TikTok video covers, email graphics, retargeting ads. Skip the studio + photographer + designer cost with AI image generators + an agent.

What AI does

  • Product photo 'lifestyle' placement (white-bg → in-scene)
  • Variant changes (purple → blue, S → L) with the same product
  • Social banner generation (10 formats from one trigger)
  • A/B test variants for ads (5 per campaign)
  • Themed campaigns (Valentine's, Black Friday)
  • Video: short product spin clip (Stable Video Diffusion)

Recommended tools

MidjourneyDALL-E 3Stable Diffusion XLFluxCanva AIRunway

Expected outcomes

  • 30 visuals per product in 1 hour (vs 1-2 days)
  • Monthly visual budget ~$50-150 (mid-size)
  • Ad CTR up 15-30% via variant testing

Example prompt: Lifestyle banner from a product photo

Prompt
Use the product photo to generate an Instagram lifestyle banner.

Product: Premium Hair Conditioner 250ml, dark navy bottle, white label
Brand tone: Natural, fresh, female-focused, premium

Scene:
- Natural light bathroom counter, marble top
- A small eucalyptus sprig next to it
- Soft, warm tone (golden hour)
- NO text/hashtags (added later)
- 1080x1350 portrait (Instagram feed)
- Photorealistic, advertising photography style

Generate 5 variants: 2 framing angles × 3 scenes (bathroom / vanity / café table).

End-to-end build with Claude Code

Have Claude Code build a 'visual generation agent': on new product or campaign start, assemble prompts and call multiple models (Midjourney/Flux/DALL-E) in parallel, save to Drive, post the top 3 to Slack for human approval, and auto-publish on approval.

Flow

Trigger (product/campaign)
Prompt assembler
Multi-model API (Flux/MJ/DALL-E)
Drive upload + Slack approval
Auto-publish to channels

Ready prompt for Claude Code

Prompt
You are a developer building a 'visual generation agent' for an e-commerce brand.

Goal: /src/ecommerce/visuals/ folder.

Components:
1. /src/ecommerce/visuals/promptBuilder.ts
   - Input: { productAttrs, sceneType, format, brandStyle }
   - Templates/scenes: 'studio', 'lifestyle-home', 'outdoor', 'flat-lay'
   - Format presets: instagram-square, instagram-portrait, story-vertical, banner-horizontal
   - Output: provider-specific prompt (Midjourney args + Flux negative prompts)

2. /src/ecommerce/visuals/providers/
   - midjourney.ts — via Discord bot
   - flux.ts — Replicate or Together AI API
   - dalle.ts — OpenAI Images API
   - runway.ts — video variants
   - All implement generate(prompt, n_variants)

3. /src/ecommerce/visuals/pipeline.ts
   - generateBatch(product, sceneTypes[], formats[]) — parallel for all combos
   - Cost controls: daily budget cap (env var)
   - Output: Google Drive 'visuals/<sku>/<date>/'
   - Per visual metadata: prompt, model, seed (if any), generated_at

4. /src/ecommerce/visuals/approval.ts
   - Slack Block Kit: 4 visuals side-by-side + Approve/Reject/Regenerate buttons
   - Approve → 'approved/' subfolder + auto-attach to Shopify OR upload to Meta Ads Library
   - Regenerate → new seed retry

5. /src/ecommerce/visuals/abTest.ts
   - For a campaign: generate 5 variants, push all 5 as ad sets via Meta Ads API
   - After 48h pull CTR/CPM/CPA, flag the winner

Plan first.
Pitfall

AI visuals are great for marketing but DANGEROUS for the actual product page. Colour, texture and scale can drift from reality — customers return saying 'looks different.' Rule: AI for social/ads/banners; real product photo (AI-enhanced is fine) on the product page. Consumer-protection regs may also require a 'representative' notice on AI imagery.

04
Task area

Cart Abandonment Recovery

E-commerce's hidden money: abandoned carts. 70% of visitors leave items behind. Classic email reminders recover 5-10%; an AI agent with personalised, multi-channel, smart-timed emails pushes 30%+.

What AI does

  • Personalised emails: messages specific to the cart contents
  • Multi-channel: email + WhatsApp + push + Instagram DM
  • Smart timing: 1h → 24h → 72h, different approach each time
  • Coupon optimisation (value based on customer tier)
  • Retargeting visual feed (auto-push to Meta/Google Ads)
  • A/B test engine: which template wins

Recommended tools

Claude Sonnetn8nSendGrid/PostmarkWhatsApp Cloud APIShopify Webhooks

Expected outcomes

  • Recovery rate: 5% → 25-35%
  • Extra revenue per customer: $5-15 (sector-dependent)
  • ROI: setup cost recovered in 1-2 months

Example prompt: Cart recovery — 3 staged emails, 3 tones

Prompt
Using the cart info below, draft 3 abandoned-cart emails for 3 send times.

Customer: Anna, 28, previously 2 orders (loyal)
Cart:
- Premium Hair Conditioner $19
- Vegan Shampoo $16
Total: $35, free shipping threshold $40

Email 1 (1h later) — TONE: gentle reminder, '$5 short of free shipping 😊'
Email 2 (24h later) — TONE: value reminder + 1 customer review quote
Email 3 (72h later) — TONE: last chance, 10% coupon (code KAL10) + scarcity (low stock)

Each:
- Subject < 50 chars, 1 emoji max
- Preview text 100 chars
- HTML body: short, mobile-first, clear CTA
- Voice: energetic, friendly, honest (no hard sell)

CTA URL: site.com/cart/<token>

End-to-end build with Claude Code

Have Claude Code build a 'cart recovery agent system': Shopify checkout webhooks open a session; if the user leaves without buying, a 3-stage campaign fires (email + WhatsApp + IG DM). Each stage: personalised copy + smart coupon. Retargeting auto-feeds Meta/Google Ads.

Flow

Shopify checkout/abandon webhook
Customer profile fetch
Claude (personalised copy)
3-stage scheduler
Multi-channel send + ads retargeting

Ready prompt for Claude Code

Prompt
You are a developer building a 'cart recovery agent system' for an e-commerce brand.

Goal: /src/ecommerce/recovery/ folder.

Components:
1. /src/ecommerce/recovery/sessionTracker.ts
   - Listen to Shopify 'checkouts/create' and 'checkouts/update' webhooks
   - On 'checkout_completed' mark session 'recovered'
   - If not completed within 1h mark 'abandoned' and trigger recovery pipeline

2. /src/ecommerce/recovery/customerEnrichment.ts
   - Pull customer profile (Shopify customer + previous_orders + tier)
   - Pull product attributes for items in cart
   - Build context: { customer, cart, brand_voice, coupon_authority }

3. /src/ecommerce/recovery/copywriter.ts
   - Claude Sonnet, structured output: 3 emails + 1 WhatsApp + 1 IG DM
   - Each: subject, preview_text, html, plain_text, suggested_send_time
   - Brand voice (brandVoice.md) + customer tier + cart amount (coupon thresholds)

4. /src/ecommerce/recovery/scheduler.ts
   - 1h: email 1 + IG DM (if user follows brand)
   - 24h: email 2 + WhatsApp template
   - 72h: email 3 + 10% coupon (if tier allows)
   - At each stage check 'recovered?' — cancel the rest if so

5. /src/ecommerce/recovery/retargeting.ts
   - 4h: push the customer audience to Meta Ads Custom Audience
   - Build a dynamic ad using cart-product visuals (from the Visuals module)
   - Remove from audience after 7 days (privacy)

6. /src/ecommerce/recovery/analytics.ts
   - For each recovery: opens, clicks, recovered (true/false), revenue
   - Weekly report: ROI per campaign, best template, best send time

Plan first.
Pitfall

The biggest cart-recovery mistake: feeling spammy. A brand sending 4 messages in 3 hours gets unsubscribed. Rule: max 1 message per channel per 24h; entire series ends at 72h. If the user unsubscribes one channel, suppress the others too. GDPR + CAN-SPAM: no SMS/WhatsApp/email without consent. Mandatory 'is marketing consent present?' check before each abandoned cart.

05
Task area

Dynamic Pricing & Competitor Monitoring

Tracking competitor prices in Excel is dead. An AI agent crawls 50 competitor stores across 500 SKUs four times a day, reports price changes, and produces 'lower price by 3% → conversion +12%' decision support.

What AI does

  • Competitor price scraping (50+ sites, 4× daily)
  • SKU matching (own catalog ↔ competitor SKU auto-match)
  • Price change alerts (Slack/email)
  • Elasticity analysis: 'lower X → conversion Y'
  • Stock + price optimisation: low stock = raise price
  • Bundle/promo suggestions (Sunday A+B for 15% off)

Recommended tools

Claude HaikuApify / ScraperAPIn8nPostgres + TimescaleDBTableau / Metabase

Expected outcomes

  • Manual price tracking 8 h/week → 0
  • Net margin +3-8% (dynamic optimisation)
  • Stockout-window opportunity pricing: +5-12% revenue

Example prompt: From a price-change table to a recommendation

Prompt
Analyse the competitor price change table and produce a recommendation.

OUR PRODUCT: Premium Hair Conditioner 250ml — $19 (3 months stable)

COMPETITORS:
- Brand A: $17.50 (dropped from $19 three days ago)
- Brand B: $19.90 (stable)
- Brand C: $16.90 (campaign — ends tomorrow)

Us:
- Stock: 240 units (3 weeks of sales capacity)
- Last 7d conversion: 2.3% (previous 7d 2.8%)
- Margin: 42%

Output:
1. SITUATION SUMMARY (3 sentences)
2. SHORT-TERM RECOMMENDATION (24h action)
3. MEDIUM-TERM RECOMMENDATION (1 week)
4. RISKS if we do nothing
5. ALTERNATIVE: levers other than price (free shipping threshold, bundle, ads)

Provide numeric estimates of impact. Mention the upper bound that needs management approval.

End-to-end build with Claude Code

Have Claude Code build a 'competitor price monitor + recommender': 50 competitors scraped 4× daily, matched to your SKUs, written to Postgres TimescaleDB, with Claude producing weekly trend + recommendation reports. Real-time Slack alerts for critical changes.

Flow

Schedule (4× daily)
{ }Apify/scraper batch
SKU matching (embedding similarity)
Postgres TimescaleDB
Claude analysis + Slack alert

Ready prompt for Claude Code

Prompt
You are a developer building a 'competitor price monitor + dynamic-pricing recommender' for an e-commerce brand.

Goal: /src/ecommerce/pricing/ folder.

Components:
1. /src/ecommerce/pricing/competitors.config.ts
   - List: { name, domain, sitemap_url, scraping_strategy: 'shopify-json'|'html'|'apify-actor' }
   - Meta for 50 competitors

2. /src/ecommerce/pricing/scraper.ts
   - 4× daily schedule: fetch product URLs from sitemap
   - Strategy: Shopify JSON endpoint, HTML parsing, or Apify actor
   - Output: { competitor, sku_seen, url, title, price, currency, in_stock, scraped_at }

3. /src/ecommerce/pricing/skuMatcher.ts
   - Match our SKU ↔ competitor SKU
   - Strategy 1: Barcode/MPN (exact)
   - Strategy 2: Title embedding + price band + brand match
   - Confidence (0-1); < 0.7 → manual review queue

4. /src/ecommerce/pricing/storage.ts
   - Postgres + TimescaleDB hypertable 'price_history'
   - Aggregations: avg/min/max per day/week, % change

5. /src/ecommerce/pricing/alerts.ts
   - Rule: our price 15%+ above max competitor → critical alert
   - Rule: competitor dropped 20%+ in 24h → info alert
   - Rule: we're out of stock + competitor in stock → opportunity alert
   - Slack #pricing Block Kit

6. /src/ecommerce/pricing/analyst.ts
   - Weekly schedule: feed last 7 days to Claude Sonnet
   - Structured output: top 10 SKUs with situation + recommendation + risk
   - PDF report: pdfkit, upload to Drive, link to Slack

IMPORTANT: NEVER auto-change price. Only recommend; human approves before Shopify API update.

Plan first.
Pitfall

Competitor scraping is legally grey. RESPECT robots.txt — if it disallows, don't scrape. Use a clear User-Agent ('YourBrand-PriceMonitor/1.0'), don't exceed 1 req/s. Big platforms (Amazon, etc.) explicitly forbid scraping in their ToS — use 3rd-party feeds (Keepa, Helium 10). Many regulators watch algorithmic coordination closely; don't auto-set 'match competitor' rules without human in the loop.

06
Task area

Inventory & Demand Forecasting

The e-commerce hidden enemy: stockouts (lost sales) and overstock (trapped capital). An AI agent synthesises sales history + seasonality + campaign plan + supplier lead time into 12-month forecasts. Order calendar, automated supplier capacity warnings, regional warehouse optimisation.

What AI does

  • SKU-level 12-month forecast (Prophet + Claude interpretation)
  • Auto reorder-point (lead time + safety stock)
  • Seasonality detection (summer/winter, holidays, school, Black Friday)
  • New-SKU cold start (similar-SKU baseline)
  • Supplier capacity-warning drafts
  • Regional warehouse split recommendation

Recommended tools

Claude SonnetPython + Prophetn8nPostgresLooker/Metabase

Expected outcomes

  • Stockout-driven lost sales -40-60%
  • Overstock write-downs -20-30%
  • Working capital efficiency +15% (less idle stock)

Example prompt: Monthly demand + order calendar

Prompt
Forecast 12 months ahead and produce an order calendar for the SKU below.

SKU: SHC-PREM-250 — Premium Hair Conditioner 250ml
Supplier lead time: 6 weeks
Safety stock: 4 weeks of sales
MOQ: 2,000 units

[paste 24 months of history]

EXTRAS:
- Two major campaigns next 12 months: Black Friday (Nov), Valentine's (Feb)
- Sector annual growth: ~8%
- New B2B customer (+500 units/month potential) starting Q2
- Supplier historically slows 2 weeks during Ramadan

OUTPUT:
1. MONTHLY FORECAST (12 months): table + 80% CI
2. ORDER CALENDAR: which month, what quantity, by when to confirm with supplier
3. SUPPLIER CAPACITY WARNINGS: before Black Friday
4. ALTERNATIVE SCENARIOS: +20% fast growth / -20% slowdown
5. RECOMMENDED SAFETY STOCK LEVEL

End-to-end build with Claude Code

Have Claude Code build a 'demand forecast + inventory planning engine': weekly schedule pulls Shopify sales, Python Prophet forecasts per SKU 12 months ahead, Claude blends business context (campaigns, seasons). Order calendar lands in Notion; supplier capacity-warning drafts go to procurement via Slack.

Flow

Schedule (weekly)
Shopify orders fetch
Python Prophet (per SKU)
Claude (interpret + recommend)
Notion calendar + Slack

Ready prompt for Claude Code

Prompt
You are a developer building a 'demand forecasting + inventory planning' engine for an e-commerce brand.

Goal: /src/ecommerce/inventory/ folder.

Components:
1. /scripts/forecast.py (Python)
   - Pull 24 months from Shopify orders (sku, day, qty)
   - For each active SKU run Facebook Prophet
   - Seasonality components: weekly, yearly, holidays (e-com specific: black-friday, mother's-day, valentines)
   - Output: /tmp/forecast.json: { sku, monthly: [{ month, yhat, yhat_lower, yhat_upper }] }

2. /src/ecommerce/inventory/forecast.ts (TypeScript)
   - Spawn the Python script via child_process
   - Send forecast.json with context to Claude Sonnet: { campaigns_next_12mo,
     supplier_lead_times, new_b2b_pipeline, holiday_calendar }
   - Structured output:
     {
       sku_recommendations: [{
         sku, monthly_forecast, order_calendar: [{ month, order_qty, place_order_by, reasoning }],
         supplier_alerts: string[], risks: string[]
       }],
       executive_summary, top_actions: string[5]
     }

3. /src/ecommerce/inventory/storage.ts
   - Postgres 'forecasts' table: weekly snapshots — for historical comparison
   - 'reorder_calendar' table: planned orders

4. /src/ecommerce/inventory/reordering.ts
   - On reorder time alert Slack #procurement + a Notion order card
   - Supplier capacity-warning draft (reuse the template from the Procurement page)
   - On approval connect to the Procurement module (see AI for Procurement page)

5. /src/ecommerce/inventory/cold-start.ts
   - New SKUs have no history
   - Strategy: find 5 most-similar SKUs (embedding + category), average their first-90-day sales → new SKU initial forecast

6. /src/ecommerce/inventory/dashboard.tsx (Next.js)
   - Per SKU: current stock, last 30d sales, 30d forecast, reorder point, days remaining
   - Colour: green ≥ 60 days, yellow 30-60, red < 30 (urgent)

Plan first.
Pitfall

Prophet can't anticipate shocks (pandemic, war, regulation). Don't pipe forecasts into auto-orders — present Claude's interpreted 'recommended' calendar for buyer approval. Wrong automation produces either pile-ups or stockouts. Also, Prophet tends to overfit — it'll repeat a 2024 campaign spike yearly forever. A manual-override layer is essential to mark anomalies as one-off.

Frequently asked questions

How do I connect these agents to my Shopify store?

Three ways: (1) Off-the-shelf AI apps (Tidio, Gorgias) — fastest, limited customisation. (2) Shopify GraphQL/REST + webhooks with your own agent — n8n or Claude Code; the path this page walks. (3) Private app embedded into Shopify Admin via Embedded App SDK — most flexible, highest dev effort.

What's a monthly cost for a mid-size store?

Mid-size (5K SKUs, 10K monthly orders): VPS ~$10, vector DB ~$10, Claude API ~$100-200, visuals ~$50, scraping/data ~$20. Total ~$200-300/mo. In return: ~10-15 hours/staff/month + recovery revenue (~$10K+ extra) + dynamic pricing margin. Typical ROI in 2-4 months.

Which module should I start with?

For most: 1. Support bot (most visible value, immediate CSAT impact). 2. Cart recovery (highest ROI, measurable revenue). 3. Product copy (scale benefit, long-tail SEO). 4. Visuals (accelerate content work). 5+6 (Pricing + Inventory) — advanced, only after the data foundation matures.

Is sending customer data to AI a GDPR violation?

Not when done right. (1) Bulk marketing needs explicit consent + (where applicable) sector compliance. (2) For provider data: either an Enterprise plan ('data not used for training' contractually) or self-hosted Ollama. (3) On 'delete my data': agent memory, vector DB and logs all must be purged. (4) Your privacy policy must spell out AI use.

I have a strong brand voice — can AI capture it?

Only if you feed it. Three practices: (1) brandVoice.md: tonal rules + 10-15 sample texts. (2) Each output should return a 'tone_check' score; low scores go to human review. (3) For the first 1-2 weeks, humans approve outputs; the approved ones get added to a 'good examples' library — Claude learns from them. After a month you'll see 90%+ on-voice output.

Build your first e-commerce AI agent

Pilot one module — if you love it, add the rest. The pages below walk you through each, in depth.

English hub