Skip to content
OpenSmartRoute
Skillv1.0.0

shopify-core-workflow-b

Manage Shopify orders, customers, and fulfillments using the GraphQL Admin API. Use when querying orders, processing fulfillments, managing customers, or building order management integrations. Trigge

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/shopify-pack/skills/shopify-core-workflow-b/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill shopify-core-workflow-b. Copyright stays with the author (MIT).

Shopify Orders & Customer Management

Overview

Secondary core workflow: manage orders, customers, and fulfillments. Query order data, process fulfillments, and handle customer records through the GraphQL Admin API.

Prerequisites

  • Completed shopify-install-auth setup
  • Access scopes: read_orders, write_orders, read_customers, write_customers, read_fulfillments, write_fulfillments
  • Familiarity with shopify-core-workflow-a (products)

Instructions

Step 1: Query Orders

Query orders with financial/fulfillment status filters, line items, customer data, and shipping addresses. Uses Shopify query syntax (financial_status:paid, fulfillment_status:unfulfilled, name:#1001, etc.).

See Query Orders for the complete query with pagination and query syntax examples.

Step 2: Create a Draft Order

Create draft orders with variant line items, custom line items, discounts, shipping addresses, and customer assignment.

See Draft Order Create for the complete mutation and variables.

Step 3: Process Fulfillment

Two-step process: first query fulfillment orders for an order to get line item IDs, then create the fulfillment with tracking information and customer notification.

See Fulfillment Processing for both queries and the complete workflow.

Step 4: Customer Management

Search customers by email, order count, total spent, tags, and state. Returns addresses and metafields.

See Customer Search Query for the complete query and syntax examples.

Output

  • Orders queryable with financial and fulfillment status filters
  • Draft orders created with line items, discounts, and shipping
  • Fulfillments processed with tracking information
  • Customer records searchable with spending and order filters

Error Handling

Error Cause Solution
Access denied for orders Missing read_orders scope Add scope and re-auth
Fulfillment order not found Wrong fulfillment order ID Query fulfillment orders first
Cannot fulfill: already fulfilled Order already shipped Check remainingQuantity > 0
Customer not found Invalid customer GID Verify GID format gid://shopify/Customer/1234567890 (numeric ID)
Order is not editable Order already archived Only draft/open orders are editable
THROTTLED Rate limit exceeded Implement backoff -- see shopify-rate-limits

Examples

Order Analytics Query

// Get order count and revenue for a date range
const ORDER_ANALYTICS = `
  query orderAnalytics {
    ordersCount(query: "created_at:>2024-01-01 AND created_at:<2024-02-01") {
      count
    }
    orders(first: 1, query: "created_at:>2024-01-01", sortKey: TOTAL_PRICE, reverse: true) {
      edges {
        node {
          name
          totalPriceSet { shopMoney { amount currencyCode } }
        }
      }
    }
  }
`;

Refund an Order

Create a refund with line item restock and customer notification.

See Refund Create for the complete mutation and variables.

Resources

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-shopify-core-fdcffc/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-shopify-core-fdcffc.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-shopify-core-fdcffc",
  "kind": "skill",
  "name": "shopify-core-workflow-b",
  "description": "Manage Shopify orders, customers, and fulfillments using the GraphQL Admin API. Use when querying orders, processing fulfillments, managing customers, or building order management integrations. Trigger with phrases like \"shopify orders\", \"shopify customers\", \"shopify fulfillment\", \"process shopify order\", \"shopify checkout\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "ecommerce",
      "shopify",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Manage Shopify orders, customers, and fulfillments using the GraphQL Admin API. Use when querying orders, processing fulfillments, managing customers, or building order management integrations. Trigger with phrases like \"shopify orders\", \"shopify customers\", \"shopify fulfillment\", \"process shopify order\", \"shopify checkout\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/shopify-pack/skills/shopify-core-workflow-b/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/shopify-pack/skills/shopify-core-workflow-b/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/shopify-pack/skills/shopify-core-workflow-b/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(npm:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Shopify Orders & Customer Management\n\n## Overview\n\nSecondary core workflow: manage orders, customers, and fulfillments. Query order data, process fulfillments, and handle customer records through the GraphQL Admin API.\n\n## Prerequisites\n\n- Completed `shopify-install-auth` setup\n- Access scopes: `read_orders`, `write_orders`, `read_customers`, `write_customers`, `read_fulfillments`, `write_fulfillments`\n- Familiarity with `shopify-core-workflow-a` (products)\n\n## Instructions\n\n### Step 1: Query Orders\n\nQuery orders with financial/fulfillment status filters, line items, customer data, and shipp",
  "cost": {
    "context_tokens": 902
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-shopify-core-fdcffc/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.