| name | ecommerce-operations |
| description | Build and manage e-commerce operations integrations including Shopify Admin API, Amazon Seller Central, inventory management, order fulfillment, and multi-channel commerce automation. |
| license | Apache 2.0 |
| tags | ["ecommerce","shopify","amazon","inventory","fulfillment","retail","mcp"] |
| difficulty | intermediate |
| time_to_master | 8-14 weeks |
| version | 1.0.0 |
E-Commerce Operations
Overview
Modern e-commerce runs on API-connected platforms — Shopify, Amazon Seller Central, WooCommerce, BigCommerce — each handling products, orders, inventory, and fulfillment. AI agents that can manage these platforms enable automated inventory rebalancing, pricing optimization, order tracking, and multi-channel sync. This skill covers the APIs, data models, and automation patterns for e-commerce operations.
When to Use This Skill
- Building MCP servers for Shopify store management
- Automating inventory sync across multiple sales channels
- Creating AI-powered order management and fulfillment workflows
- Implementing dynamic pricing strategies
- Building multi-channel product catalog management
Core Concepts
E-Commerce Platform Landscape
| Platform | Market Share | API Style | Best For |
|---|
| Shopify | 28% | GraphQL + REST | SMB to mid-market |
| Amazon Seller Central | 38% marketplace | REST (SP-API) | Marketplace sellers |
| WooCommerce | 23% | REST | WordPress sites |
| BigCommerce | 3% | REST + GraphQL | Mid-market |
Core Data Model
┌──────────┐ ┌──────────┐ ┌──────────────┐
│ Products │────►│ Variants │────►│ Inventory │
│ │ │ (SKUs) │ │ Levels │
└──────────┘ └──────────┘ └──────────────┘
│
▼
┌──────────┐ ┌──────────┐ ┌──────────────┐
│ Customer │────►│ Orders │────►│ Fulfillments │
│ │ │ │ │ │
└──────────┘ └──────────┘ └──────────────┘
│
▼
┌──────────┐
│ Payments │
│ Refunds │
└──────────┘
Implementation Guide
Shopify Admin API (GraphQL)
import Shopify from "@shopify/shopify-api";
const response = await client.query({
data: `{
products(first: 10, query: "status:active AND product_type:clothing") {
edges {
node {
id
title
status
totalInventory
variants(first: 5) {
edges {
node {
sku
price
inventoryQuantity
}
}
}
}
}
}
}`,
});
const inventoryAdjust = await client.query({
data: {
query: `mutation inventoryAdjustQuantities($input: InventoryAdjustQuantitiesInput!) {
inventoryAdjustQuantities(input: $input) {
inventoryAdjustmentGroup { reason }
userErrors { field message }
}
}`,
variables: {
input: {
reason: "correction",
name: "available",
changes: [{
delta: -5,
inventoryItemId: "gid://shopify/InventoryItem/123",
locationId: "gid://shopify/Location/456",
}],
},
},
},
});
Order Management MCP Tools
server.tool(
"get_recent_orders",
"Fetch recent orders with status, items, and totals",
{
status: z.enum(["open", "closed", "cancelled", "any"]).default("open"),
days: z.number().default(7),
limit: z.number().default(20),
},
async ({ status, days, limit }) => {
const since = new Date(Date.now() - days * 86400000).toISOString();
const orders = await shopify.order.list({
status,
created_at_min: since,
limit,
});
const summary = orders.map(o => ({
id: o.order_number,
customer: o.customer?.first_name + " " + o.customer?.last_name,
total: o.total_price,
items: o.line_items.length,
status: o. || ,
: o.,
}));
{
: [{ : , : .(summary, , ) }],
};
}
);
server.(
,
,
{
: z.().().(),
},
({ threshold }) => {
products = shopify..({ : });
lowStock = [];
( product products) {
( variant product.) {
(variant. <= threshold) {
lowStock.({
: product.,
: variant.,
: variant.,
: variant.,
: variant. === ? : ,
});
}
}
}
{
: [{
: ,
: +
lowStock.( ).(),
}],
};
}
);
Multi-Channel Inventory Sync
class InventorySyncManager:
"""Keep inventory levels synchronized across sales channels."""
def sync_all_channels(self, sku):
warehouse_qty = self.wms.get_quantity(sku)
safety_stock = max(5, int(warehouse_qty * 0.1))
available = warehouse_qty - safety_stock
allocations = self.calculate_allocations(sku, available)
for channel, qty in allocations.items():
self.channels[channel].update_inventory(sku, qty)
return {"sku": sku, "total": warehouse_qty, "allocations": allocations}
def calculate_allocations(self, sku, available):
"""Allocate inventory proportionally to sales velocity."""
velocities = {ch: self.get_velocity(sku, ch) for ch in self.channels}
total_velocity = sum(velocities.values()) or 1
return {
channel: int(available * (vel / total_velocity))
for channel, vel in velocities.items()
}
Best Practices
- Webhook-driven sync — subscribe to order/inventory webhooks instead of polling
- Idempotent operations — use order IDs and SKUs as idempotency keys
- Safety stock buffers — never allocate 100% of inventory to any single channel
- Rate limit awareness — Shopify allows 2 requests/sec; Amazon SP-API varies by endpoint
- Bulk operations for catalogs — use bulk mutations for product updates over 50 items
- Test with sandbox stores — both Shopify and Amazon offer development/sandbox environments
Resources
Changelog
| Version | Date | Changes |
|---|
| 1.0.0 | 2026-03-31 | Initial documentation |