E-commerce is one of the best-suited industries for AI automation. High volume, repetitive tasks, and direct revenue impact make AI ROI clear and measurable.


Product Catalog Management

Bulk Product Descriptions

The highest-volume writing task in e-commerce:

Write product descriptions for these [X] products in our catalog.

Product category: [category]
Brand voice: [describe tone — e.g., "clean and direct" or "warm and lifestyle-focused"]
SEO keyword pattern: each description should naturally include [keyword formula]
Length: Short description (2-3 sentences) + Full description (100-150 words)

Template structure:
1. Lead with the key benefit
2. Describe materials/specs in plain language
3. Who it's for / when to use it
4. Include SKU/product identifiers for reference

Products:
1. [Product name] — [key specs/features]
2. [Product name] — [key specs/features]
[continue]

Product Attribute Extraction

For extracting structured data from unstructured descriptions:

import anthropic
import json

client = anthropic.Anthropic()

def extract_product_attributes(description: str) -> dict:
    response = client.messages.create(
        model="claude-haiku-4-5-20251001",
        max_tokens=512,
        messages=[{
            "role": "user",
            "content": f"""Extract product attributes from this description as JSON:

{description}

Return only valid JSON with these keys (null if not found):
- material: string
- color: string or list
- dimensions: string  
- weight: string
- care_instructions: string
- features: list of strings
- suitable_for: list of strings"""
        }],
    )
    
    return json.loads(response.content[0].text)

Customer Service Automation

Order Status Chatbot

Configure for your platform (Shopify, WooCommerce, etc.):

You are a customer service agent for [Store Name].

When customers ask about their order:
1. Ask for their order number
2. Look up status: [connect to your order management API]
3. Explain the current status in plain language
4. If shipping: provide tracking number and estimated delivery
5. If delayed: acknowledge, apologize, explain cause if known

WHAT YOU CAN DO:
- Provide order status
- Share tracking information
- Explain return policy (30 days, free returns on defective items)
- Provide product information from our catalog

WHAT YOU CANNOT DO:
- Process refunds (escalate to human or direct to refund form at [URL])
- Modify existing orders that have shipped
- Make pricing exceptions

When you can't help: "Let me connect you with our support team at [email]"

Return Request Processing

Process this return request and draft a response:

Customer request: [paste customer message]
Order: [pull from system]
Return policy: [describe your policy]

Determine:
1. Is this within the return window?
2. Does the reason qualify for return under our policy?
3. What action to take (approve standard return / approve exception / deny / ask clarifying question)

Draft response that:
- Acknowledges their request
- Clearly states what happens next
- Provides return instructions if approved
- Handles denial graciously if applicable

Personalized Email Marketing

Abandoned Cart Recovery

Write an abandoned cart email sequence for:

Product category: [describe what was abandoned]
Average order value: $[X]
Return customer?: [yes/no]
Time since abandonment: [1 hour / 24 hours / 3 days]

Email 1 (1 hour): Gentle reminder — maybe they just got distracted
Email 2 (24 hours): Add value — address a likely concern about the product
Email 3 (3 days): Offer incentive — small discount or free shipping

For each:
- Subject line
- Preheader text
- Email body (under 150 words)
- Primary CTA
- Any personalization fields to include

Don't: guilt-trip. Do: make it easy to come back.

Post-Purchase Sequence

Write a 4-email post-purchase sequence for:

Product: [describe]
Purchase context: [first purchase / repeat customer / high-value order]
Goals: [review request / cross-sell / referral / education]

Email 1 (Day 2): Confirm delivery + tips for best experience
Email 2 (Day 7): Ask for a review (only if they haven't complained)
Email 3 (Day 14): Related products they might love
Email 4 (Day 30): VIP offer or referral program

Each email should feel like it's from a person, not an automated sequence.
Vary the tone — not every email should be promotional.

Product Recommendations

Content-Based Recommendations Prompt

def get_product_recommendations(
    product_viewed: dict,
    catalog: list[dict],
    n: int = 5,
) -> list[dict]:
    catalog_text = "\n".join([
        f"- {p['name']}: {p['description'][:100]}"
        for p in catalog[:50]  # Limit context
    ])
    
    response = client.messages.create(
        model="claude-haiku-4-5-20251001",
        max_tokens=256,
        messages=[{
            "role": "user",
            "content": f"""A customer is viewing: {product_viewed['name']} - {product_viewed['description'][:200]}

From this catalog, pick the {n} most complementary products:
{catalog_text}

Return only product names as a JSON array, most relevant first."""
        }],
    )
    
    recommended_names = json.loads(response.content[0].text)
    return [p for p in catalog if p['name'] in recommended_names]

SEO for Product Pages

Optimize this product page for SEO:

Product: [name]
Current description: [paste]
Target keyword: [primary keyword customers would search]
Secondary keywords: [2-3 related terms]

Optimize:
1. Title tag (under 60 chars, include keyword near front)
2. Meta description (under 155 chars, include keyword, has CTA)
3. H1 (compelling, includes keyword)
4. Description (weave keywords naturally, keep readability)
5. Alt text suggestion for main product image
6. Schema markup type (Product schema — list the properties to include)

Category Page Content

Write SEO-optimized category page content for:

Category: [name, e.g., "Women's Running Shoes"]
Target keywords: [primary + 3-4 secondary]
Products in category: [brief description]

Write:
1. H1 (compelling, includes primary keyword)
2. Intro paragraph (150 words, includes keywords, explains what's in this category)
3. "How to choose" section (150 words, helps with buying decision + SEO)
4. FAQ section with 4 questions customers actually ask

This page should rank AND convert — balance SEO with helpful content.

Inventory and Operations

Supplier Communication

Write a professional email to a supplier about:

Issue: [late delivery / quality problem / pricing negotiation / new order]
Supplier: [name, relationship history]
Our situation: [deadline pressure / quality standards / order volume]

Tone: Professional and firm, not aggressive. We want to maintain the relationship.

The email should:
- State the issue clearly in the first sentence
- Include specific data (order numbers, dates, quantities)
- State what we need and by when
- Note consequences if unresolved (if appropriate)
- Leave door open for response

Return/Refund Policy Generation

Write a customer-friendly return and refund policy for:

Business type: [e-commerce, product type]
Return window: [X days from delivery]
Return conditions: [original packaging / any condition / exclude certain categories]
Refund method: [original payment / store credit / either]
Exceptions: [final sale items, personalized items, etc.]
International orders: [policy for non-domestic orders]

Write in plain language (not legalese).
Organized by sections with headers.
Include FAQ-style questions customers typically ask.