dist/codex/shopify-commerce/skills/shopify-customers/SKILL.md
Manage Shopify customers — Customer Account API, new vs classic accounts, Multipass SSO, customer segmentation, B2B company accounts, metafields, and marketing consent. Use when working with Shopify customer data.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins shopify-customersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch live docs:
site:shopify.dev customer account api for Customer Account APIsite:shopify.dev customer graphql admin api for customer mutationssite:shopify.dev multipass for SSO integrationsite:shopify.dev customer segmentation api for segmentation queriessite:shopify.dev b2b company accounts for B2B featuresModern, Shopify-hosted accounts:
Legacy accounts:
customers/login.liquid, customers/account.liquid)For headless/custom account experiences (used in Hydrogen):
Fetch live docs: Web-search
site:shopify.dev customer account api referencefor current OAuth flow endpoints, available queries, and token handling.
| Operation | Mutation | Notes |
|-----------|----------|-------|
| Create customer | customerCreate | Email, name, addresses |
| Update customer | customerUpdate | Partial updates |
| Delete customer | customerDelete | Removes customer record |
| Add tags | tagsAdd | Tagging for segmentation |
| Set metafield | metafieldsSet | Custom customer data |
| Send invite | customerSendAccountInviteEmail | Account activation email |
| Merge customers | customerMerge | Combine duplicate records |
Fetch live docs for each mutation's input fields —
CustomerInputand related types change across API versions.
# Pattern: query customer with orders and metafields
# Fetch live docs for current available fields
query Customer($id: ID!) {
customer(id: $id) {
id
firstName
lastName
email
phone
tags
addresses { address1 city province country zip }
orders(first: 10) {
edges {
node { id name totalPrice { amount currencyCode } }
}
}
metafields(first: 5) {
edges {
node { namespace key value type }
}
}
}
}
# Search customers by email, name, or other fields
query Customers($query: String!) {
customers(first: 10, query: $query) {
edges { node { id email firstName lastName } }
}
}
# query: "email:[email protected]" or "first_name:John"
Fetch live docs for query filter syntax and searchable fields.
Single sign-on for Shopify stores (Shopify Plus only):
{store}.myshopify.com/account/login/multipass/{token}Your site → Encrypt customer JSON with Multipass secret → Base64 token
→ Redirect to Shopify /account/login/multipass/{token}
→ Customer auto-logged in
Required customer data in the token: email (required), plus optional first_name, last_name, tag_string, return_to, remote_ip.
Fetch live docs: Web-search
site:shopify.dev multipassfor current encryption algorithm, token format, and required fields. The encryption method (AES-128-CBC + HMAC-SHA256) is stable but verify key derivation steps.
Filter customers based on criteria:
orders_count > 5 AND total_spent > 100Fetch live docs: Web-search
site:shopify.dev customer segmentation filtersfor current filter syntax and available attributes.
Shopify Plus feature:
Company
├── Locations (billing/shipping)
├── Contacts (linked to customers)
├── Catalogs (company-specific pricing)
│ └── Price Lists
└── Payment Terms
Fetch live docs: Web-search
site:shopify.dev b2b api companyfor company mutations, catalog assignment, and payment terms configuration.
GDPR/privacy compliance:
SUBSCRIBED, NOT_SUBSCRIBED, PENDING, UNSUBSCRIBEDcustomerEmailMarketingConsentUpdate and customerSmsMarketingConsentUpdateFetch live docs for consent mutation input fields and consent state transition rules.
customers/data_request, customers/redact)customerMerge for duplicate records instead of manual data transferFetch the Shopify Customer Account API, Multipass, and B2B documentation for exact OAuth flows, encryption details, mutation inputs, and segmentation syntax before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.