SHOPIFY AI
Every person who works with a Shopify store gets their own AI partner. This skill gives your agent deep expertise in the Shopify Admin API, Storefront API, and all the role-specific patterns that make Shopify teams extraordinary.
LIVE v1.0 E-Commerce Admin API MCP 6 Roles
npx skills add imbilawork/2nth-skills@shopify-ai
01

OVERVIEW

Shopify powers over 4 million stores globally. It exposes two APIs: the Admin API (REST + GraphQL) for store management, and the Storefront API (GraphQL) for customer-facing experiences. Both are powerful foundations for AI augmentation.

This skill gives AI agents the knowledge to query, operate, and automate Shopify — across every role in the organisation — without hallucinating endpoints or field names.

Admin API
REST + GQL
Auth
TOKEN
Pagination
RELAY
Roles
6

What your agent can do

  • Query products, orders, customers, inventory, collections, and analytics
  • Generate AI-powered product descriptions, SEO copy, and alt text
  • Surface revenue dashboards, trend analysis, and stock alerts for owners
  • Audit SEO issues, auto-tag products, and reorder collections for merchandisers
  • Instantly look up orders and draft customer service responses
  • Segment customers and generate campaign copy for marketing
  • Monitor unfulfilled orders, flag fraud, and route fulfillments for operations
02

THE 2NTH MODEL

The 2nth model is simple: every person who works with a Shopify store gets their own AI partner. The AI never makes decisions — it surfaces data, drafts content, and catches things humans miss. The human always has the final say.

The principle

One person + one AI = extraordinary. The AI handles data retrieval and first drafts. The human applies judgment, brand instinct, and relationship intelligence.

RoleThe Human DecidesThe AI Enables
Store OwnerStrategy, pricing, brand directionRevenue dashboards, trends, competitive monitoring
MerchandiserCollection curation, product selectionAuto-tagging, SEO audits, inventory-aware recommendations
Content CreatorBrand voice, creative directionDraft descriptions, alt text, meta tags, blog posts
Customer ServiceEscalations, refunds, relationship callsOrder lookup, response drafts, sentiment analysis
Marketing ManagerCampaign strategy, budget allocationSegmentation, A/B copy, performance reporting
OperationsException handling, carrier selectionOrder routing, stock alerts, fraud flags
03

ARCHITECTURE

The recommended integration uses a Cloudflare Worker as an MCP server — it proxies the Shopify Admin API, generates content via Workers AI, and exposes role-specific tools to the AI client.

User (Role)
AI Client
Claude
MCP Server
Cloudflare Worker
Shopify
Admin API
Workers AI handles content generation and analysis in the same edge runtime

Authentication

# Admin API (Private/Custom App)
X-Shopify-Access-Token: shpat_xxxxx

# Storefront API
X-Shopify-Storefront-Access-Token: xxxxx

# Base URLs
https://{store}.myshopify.com/admin/api/2024-10/{resource}.json   # REST
https://{store}.myshopify.com/admin/api/2024-10/graphql.json      # GraphQL

MCP Tool Registration (per role)

const ROLE_TOOLS = {
  owner:        ['get_revenue_dashboard', 'get_top_products', 'get_customer_growth', 'get_inventory_value'],
  merchandiser: ['list_products', 'update_product', 'manage_collection', 'get_seo_audit', 'auto_tag_products'],
  content:      ['get_product', 'update_product_description', 'generate_alt_text', 'update_seo_metadata'],
  support:      ['search_orders', 'get_order_status', 'search_customers', 'draft_response', 'create_return'],
  marketing:    ['get_sales_report', 'get_customer_segments', 'generate_campaign_copy', 'get_channel_performance'],
  operations:   ['list_unfulfilled_orders', 'get_inventory_levels', 'create_fulfillment', 'flag_fraud_risk'],
};
Security

Never expose SHOPIFY_ACCESS_TOKEN in client-side code. Store as a Cloudflare Worker secret: npx wrangler secret put SHOPIFY_ACCESS_TOKEN

04

SHOPIFY APIS

GraphQL is preferred for complex queries, metafields, and bulk operations. REST is simpler for straightforward CRUD. Both are available on all plans.

Admin REST — Key Resources

GET  /admin/api/2024-10/products.json?limit=50&status=active
GET  /admin/api/2024-10/products/{id}.json
POST /admin/api/2024-10/products.json
PUT  /admin/api/2024-10/products/{id}.json

GET  /admin/api/2024-10/orders.json?status=open&limit=50
GET  /admin/api/2024-10/orders/{id}.json

GET  /admin/api/2024-10/customers/search.json?query=email:[email protected]
GET  /admin/api/2024-10/inventory_levels.json?location_ids=1234

Admin GraphQL — Products

{
  products(first: 20, query: "status:active") {
    edges {
      node {
        id title handle description tags status
        variants(first: 10) {
          edges { node { id price sku inventoryQuantity } }
        }
        images(first: 5) {
          edges { node { url altText } }
        }
        seo { title description }
      }
    }
    pageInfo { hasNextPage endCursor }
  }
}

Admin GraphQL — Orders

{
  orders(first: 30, query: "fulfillment_status:unfulfilled") {
    edges {
      node {
        id name createdAt
        totalPriceSet { shopMoney { amount currencyCode } }
        customer { firstName lastName email }
        lineItems(first: 10) {
          edges { node { title quantity variant { sku inventoryQuantity } } }
        }
        shippingAddress { address1 city province zip country }
        fulfillments { trackingInfo { number url company } status }
      }
    }
  }
}

Rate Limits

PlanRESTGraphQL
Standard2 req/sec50 points/sec
Advanced / Plus4 req/sec100 points/sec
Shopify Plus20 req/sec1000 points/sec

Webhooks

WebhookUse Case
orders/createAlert operations, update dashboards
orders/fulfilledNotify customer service, update tracking
products/updateTrigger SEO re-audit
inventory_levels/updateCheck reorder points
customers/createWelcome sequence, segment assignment
refunds/createAlert customer service, flag patterns
05

OWNER AI

The store owner sets strategy, makes pricing decisions, and chooses brand direction. Their AI partner handles daily data retrieval so they can focus on what only they can do.

OWNER

Human + AI Split

The Human Decides
  • Pricing strategy
  • Brand direction
  • New product lines
  • Supplier relationships
  • Capital allocation
The AI Enables
  • Morning revenue dashboard
  • Top product trends
  • Cash flow visibility
  • Refund rate alerts
  • YoY comparison

MCP Tools

get_revenue_dashboard
Revenue, orders, AOV by period
get_top_products
Best sellers by revenue and volume
get_customer_growth
New vs returning, LTV trends
get_inventory_value
Stock value by collection/location
get_refund_summary
Refund rate, reasons, trends
compare_periods
This month vs last, YoY

Example Conversation

Owner
How are we doing this month?
AI
Revenue R 842K (+14% vs Feb). 234 orders, AOV R 3,600. Your Fusion Floor Lamps are your fastest mover — 38 sold, up 60% MoM. Stock alert: Sossus Dining Table down to 3 units. Top customer: Weylandts with R 120K in orders. One concern: refund rate ticked up to 4.2% from 2.8% — mostly "item not as described" on the scatter cushions. Want me to pull the specific returns?
06

MERCHANDISER AI

The merchandiser curates collections, decides what to feature, and approves product positioning. Their AI partner handles the analytical legwork — surfacing what needs attention before it becomes a problem.

MERCH

Human + AI Split

The Human Decides
  • Collection curation
  • Featured products
  • Seasonal campaigns
  • Pricing position
  • Range expansion
The AI Enables
  • SEO audits (missing meta, alt text)
  • Auto-generated product tags
  • Collection reordering by conversion
  • Slow mover identification
  • Inventory-aware recommendations

MCP Tools

list_products
With filters: collection, status, inventory
update_product
Title, description, tags, SEO
manage_collection
Add/remove products, reorder
get_seo_audit
Missing meta, alt text, duplicates
auto_tag_products
AI-generated tags from content
get_slow_movers
Products with 0 sales in N days
get_conversion_by_product
Views to cart to purchase funnel

SEO Audit Query

{
  products(first: 250) {
    edges {
      node {
        id title
        seo { title description }
        images(first: 1) { edges { node { altText } } }
      }
    }
  }
}

Example Conversation

Merch
Which products need SEO attention?
AI
12 products have issues: 4 missing meta descriptions, 3 have duplicate titles, 5 have images without alt text. Biggest opportunity: your Charred Veldt Coffee Table — 340 views last month but no meta description. Want me to draft SEO copy for these 12? I won't publish anything until you approve.
07

CONTENT AI

The content creator owns the brand voice, makes creative decisions, and approves all copy. Their AI partner handles first drafts — so they spend time on craft, not data entry.

CONTENT

Human + AI Split

The Human Decides
  • Brand voice
  • Creative direction
  • Final copy approval
  • Campaign messaging
  • Tone per channel
The AI Enables
  • Product description drafts
  • Alt text for all images
  • Meta titles and descriptions
  • Blog post outlines
  • Channel rewrites (email, social)

MCP Tools

get_product
Full product data including images
update_product_description
Set body HTML on approval
update_seo_metadata
Set meta title + description
generate_alt_text
AI writes alt text from image
generate_product_copy
Full description from specs
batch_update_descriptions
Process multiple products at once

Content System Prompt Pattern

You are a copywriter for NoHa, a luxury South African furniture brand.
Brand voice: sophisticated, understated, nature-inspired. Never salesy.
Lead with the emotional benefit. Include materials and dimensions.
Use sensory language. Keep under 150 words for product descriptions.

Workers AI — Content Generation

const result = await env.AI.run('@cf/meta/llama-3.1-8b-instruct', {
  messages: [
    { role: 'system', content: 'You are a luxury e-commerce copywriter. Be concise and compelling.' },
    { role: 'user', content: `Write a product description for "${product.title}".
      Brand: luxury South African furniture. Voice: sophisticated, nature-inspired.
      Include: ${product.tags.join(', ')}.
      Keep under 150 words. Lead with emotion, end with specs.` }
  ]
});

Example Conversation

Content
Write a description for the new Kuba Wall Art
AI
Here's a draft: "A bold graphic statement rooted in Central African textile tradition. The Kuba Wall Art translates the geometric precision of Kuba cloth into a large-scale work that commands any room. Handcrafted in our studio using mixed media on board. Each piece is unique — slight variations in texture and tone are part of its character. Details: 1200 x 900mm. Mixed media on board. Ready to hang. Indoor only." — Want me to adjust the tone or length? I can also draft the meta description and alt text.
08

SUPPORT AI

Customer service handles escalations, approves refunds, and makes relationship calls. Their AI partner handles the lookup and drafting work — so they respond faster without losing the human touch.

SUPPORT

Human + AI Split

The Human Decides
  • Escalation handling
  • Refund approvals
  • Policy exceptions
  • VIP relationship calls
  • Sending any message
The AI Enables
  • Instant order lookup
  • Tracking status and ETA
  • Draft email responses
  • Repeat issue flagging
  • VIP customer identification

MCP Tools

search_orders
By order number, email, name
get_order_status
Full status with tracking info
search_customers
Lookup by email, phone, name
draft_response
AI writes reply for review
create_return
Pre-fill return request
get_customer_history
Past orders, returns, notes
flag_escalation
Mark for human attention

Order Lookup Query

{
  orders(first: 1, query: "name:#1042") {
    edges {
      node {
        id name financialStatus fulfillmentStatus
        totalPriceSet { shopMoney { amount } }
        customer { firstName lastName email }
        lineItems(first: 10) { edges { node { title quantity } } }
        fulfillments { trackingInfo { number url company } status }
      }
    }
  }
}

Example Conversation

Support
Customer is asking about order #1042
AI
Order #1042: Placed Mar 22, 2x NoHa Dining Chairs (R 17,990). Shipped via CourierGuy, tracking CG-8891234. Last scan: Johannesburg depot yesterday 14:32. Expected delivery: tomorrow by 17:00. Customer: Sarah M., returning customer (4th order, R 48K lifetime). Draft: "Hi Sarah, your dining chairs are on their way! They left the JHB depot yesterday and should arrive tomorrow by 5pm. Tracking: CG-8891234. Let me know if you need anything else." — Shall I send this or adjust it?
09

MARKETING AI

The marketing manager decides campaign strategy, approves messaging, and allocates budget. Their AI partner segments the audience, generates copy variants, and surfaces the data that makes campaigns perform.

MKTG

Human + AI Split

The Human Decides
  • Campaign strategy
  • Budget allocation
  • Message approval
  • Discount depth
  • Audience targeting
The AI Enables
  • Customer segmentation
  • A/B copy variants
  • Channel performance data
  • Best send-time analysis
  • Slow mover discount strategy

MCP Tools

get_sales_report
Revenue by period, product, collection
get_customer_segments
Auto-segmented by purchase behaviour
generate_campaign_copy
Email/SMS/social copy variants
get_channel_performance
Online vs POS vs wholesale
get_discount_impact
Revenue impact of active discounts
get_abandoned_carts
Checkout data for recovery campaigns

Customer Segmentation Query

{
  customers(first: 50, query: "orders_count:>3", sortKey: TOTAL_SPENT, reverse: true) {
    edges {
      node {
        id firstName lastName email
        ordersCount totalSpent tags
        lastOrder { id name createdAt }
      }
    }
  }
}

Example Conversation

Mktg
I need a campaign for the Fusion Floor Lamps
AI
The Fusion range is your fastest-growing category — up 60% MoM. Three approaches: (1) Lifestyle: "Light that tells a story — The Fusion Range" — targets design-conscious buyers. (2) Gift angle: "The gift they'll never forget — from R 3,995" — targets gifting (28% of your customers). (3) Collection: "Complete the room — pair any Fusion Lamp with a coffee table, save 10%" — targets upsell. Best-performing send time: Tuesday 10am (23% open rate). Want me to draft full email copy for any of these?
10

OPERATIONS AI

Operations handles exceptions, selects carriers, and manages the warehouse team. Their AI partner monitors the queue, flags issues before they escalate, and pre-builds fulfillment requests for human approval.

OPS

Human + AI Split

The Human Decides
  • Exception handling
  • Carrier selection
  • Warehouse priorities
  • Fraud call (approve/reject)
  • Inter-warehouse transfers
The AI Enables
  • Overdue order flagging
  • Inventory vs order crosscheck
  • Fulfillment request pre-build
  • Fraud signal scoring
  • Stockout forecasting

MCP Tools

list_unfulfilled_orders
Sorted by age, flagged if overdue
get_inventory_levels
By location, with pending allocations
create_fulfillment
Prepare fulfillment for approval
flag_fraud_risk
Scoring based on signals
get_carrier_performance
Delivery time, damage rate by carrier
get_stockout_forecast
Days until stockout by product

Unfulfilled Orders Query

{
  orders(first: 30, query: "fulfillment_status:unfulfilled") {
    edges {
      node {
        id name createdAt
        totalPriceSet { shopMoney { amount currencyCode } }
        customer { firstName lastName email }
        lineItems(first: 10) {
          edges { node { title quantity sku variant { inventoryQuantity } } }
        }
        shippingAddress { address1 city province country }
      }
    }
  }
}

Example Conversation

Ops
What's overdue?
AI
3 orders unfulfilled over 24 hours: #1039 (R 18,995 Sossus Table) — 28h. Oversized, needs freight carrier. Suggestion: DSV. #1041 (R 7,990 scatter + throw) — 26h. No issue found, may have been missed. Flag for warehouse. #1044 (R 3,295 Idwala Coffee Table) — 25h. 0 units at JHB but 4 at CPT. Suggest inter-warehouse transfer or ship from CPT. — Want me to create fulfillment requests for #1041 and #1044?
11

INSTALL

Install this skill into your AI agent with a single command. The skill gives your agent complete Shopify API knowledge, all role patterns, query references, and content generation prompts.

npx skills add imbilawork/2nth-skills@shopify-ai

What's Included

  • SKILL.md — Full Admin API reference, role patterns, rate limits, webhooks, gotchas
  • references/queries.md — Complete query library: products, orders, customers, inventory, analytics, bulk ops
  • references/roles.md — Detailed role patterns for all 6 roles with MCP tools and example conversations
  • references/ai-integration.md — Cloudflare Worker proxy, Workers AI content generation, webhook handlers, wrangler config

Wrangler Config

name = "shopify-ai"
compatibility_date = "2026-03-01"
compatibility_flags = ["nodejs_compat"]

[ai]
binding = "AI"

[vars]
SHOPIFY_STORE = "your-store-name"

# Secrets (run in your terminal):
# npx wrangler secret put SHOPIFY_ACCESS_TOKEN
Common Gotchas

API versioning: Always specify version e.g. 2024-10. Pagination: REST uses Link headers, GraphQL uses cursor-based edges/node. Metafields: Use GraphQL — REST support is limited. Bulk ops: For >250 items use GraphQL bulk operations. Currency: Amounts are strings in REST, use MoneyV2 in GraphQL.