biz/erp/shopify

SHOPIFY

Shopify AI integration expert.

production Any HTTP client, Node.js, Python, or Cloudflare Workers
improves: biz/erp

Shopify AI Integration

Shopify exposes two APIs: the Admin API (REST + GraphQL) for store management, and the Storefront API (GraphQL) for customer-facing experiences.

Docs: https://shopify.dev/docs/api

The 2nth Model: One Person + One AI

Every Shopify role has an AI partner that makes them extraordinary:

RoleThe Human DecidesThe AI Enables
Store OwnerStrategy, pricing, brand directionRevenue dashboards, trend analysis, competitor monitoring
MerchandiserCollection curation, product selectionAuto-tagging, SEO optimisation, inventory-aware recommendations
Content CreatorBrand voice, creative directionDraft product descriptions, blog posts, alt text, meta tags
Customer ServiceEscalations, refunds, relationship callsOrder lookup, FAQ answers, draft responses, sentiment analysis
Marketing ManagerCampaign strategy, budget allocationAudience segmentation, A/B copy, performance reporting
Operations/FulfillmentException handling, carrier selectionOrder routing, stock alerts, fulfillment tracking, fraud flags

Authentication

Admin API

X-Shopify-Access-Token: shpat_xxxxx

Storefront API

X-Shopify-Storefront-Access-Token: xxxxx

Admin API Base URL

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

Admin API — Key Resources

Products

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

Orders

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

Customers

GET /admin/api/2024-10/customers.json?limit=50
GET /admin/api/2024-10/customers/search.json?query=email:user@example.com

Inventory

GET /admin/api/2024-10/inventory_levels.json?location_ids=1234
POST /admin/api/2024-10/inventory_levels/set.json

Admin GraphQL API

{
  products(first: 10, query: "status:active") {
    edges {
      node {
        id
        title
        variants(first: 5) {
          edges {
            node { price inventoryQuantity sku }
          }
        }
        seo { title description }
        tags
      }
    }
  }
}

MCP Server Pattern

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'],
};

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

Rate Limits

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

Common Gotchas

See Also