Shopify customers

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Shopify customers is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. 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.

How to use this skill

Skill file

Shopify Customer Management

Before writing code

Fetch live docs:

  1. Web-search site:shopify.dev customer account api for Customer Account API
  2. Web-search site:shopify.dev customer graphql admin api for customer mutations
  3. Web-search site:shopify.dev multipass for SSO integration
  4. Web-search site:shopify.dev customer segmentation api for segmentation queries
  5. Web-search site:shopify.dev b2b company accounts for B2B features

Customer Account Types

New Customer Accounts

Modern, Shopify-hosted accounts:

Classic Customer Accounts

Legacy accounts:

Customer Account API

For headless/custom account experiences (used in Hydrogen):

Fetch live docs: Web-search site:shopify.dev customer account api reference for current OAuth flow endpoints, available queries, and token handling.

Admin API Customer Operations

Key Mutations

| 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 — CustomerInput and related types change across API versions.

Minimal Query Pattern

# 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 }
      }
    }
  }
}

Customer Search

# 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:customer@example.com" or "first_name:John"

Fetch live docs for query filter syntax and searchable fields.

Multipass SSO

Single sign-on for Shopify stores (Shopify Plus only):

Multipass Flow

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 multipass for current encryption algorithm, token format, and required fields. The encryption method (AES-128-CBC + HMAC-SHA256) is stable but verify key derivation steps.

Customer Segmentation

Filter customers based on criteria:

Fetch live docs: Web-search site:shopify.dev customer segmentation filters for current filter syntax and available attributes.

B2B (Company Accounts)

Shopify Plus feature:

B2B Data Model

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 company for company mutations, catalog assignment, and payment terms configuration.

Marketing Consent

GDPR/privacy compliance:

Fetch live docs for consent mutation input fields and consent state transition rules.

Best Practices

Fetch the Shopify Customer Account API, Multipass, and B2B documentation for exact OAuth flows, encryption details, mutation inputs, and segmentation syntax before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.