shopify-b2b-wholesale
Build Shopify Plus B2B features with companies, catalogs, and wholesale pricing. Use when setting up wholesale accounts, creating price lists, or configuring B2B checkout with purchase orders. Trigger with phrases like "shopify b2b", "shopify wholesale", "shopify company api", "shopify price lists", "shopify catalog api".
What this skill does
# Shopify B2B & Wholesale
## Overview
Shopify Plus B2B features let you create separate wholesale experiences with company accounts, custom catalogs, and tiered pricing. This skill covers the full B2B setup: companies, catalogs, price lists, and checkout configuration using the GraphQL Admin API. Requires a Shopify Plus plan.
## Prerequisites
- Shopify Plus plan (B2B features are Plus-only)
- Access scopes: `read_customers`, `write_customers`, `read_products`, `write_products`, `read_orders`
- B2B enabled in Shopify admin (Settings > B2B)
- API version 2023-10 or later (B2B mutations stabilized)
## Instructions
### Step 1: Create a B2B Company
Use `companyCreate` with `CompanyCreateInput` — requires `company` (name, note), `companyContact` (email, firstName, lastName), and `companyLocation` (name, billingAddress, shippingAddress):
```typescript
await client.request(COMPANY_CREATE, {
variables: {
input: {
company: { name: "Acme Wholesale Inc", note: "Tier 1 partner" },
companyContact: { email: "[email protected]", firstName: "Jane", lastName: "Doe" },
companyLocation: {
name: "Headquarters",
billingAddress: { address1: "123 Commerce St", city: "Austin", provinceCode: "TX", countryCode: "US", zip: "78701" },
shippingAddress: { address1: "123 Commerce St", city: "Austin", provinceCode: "TX", countryCode: "US", zip: "78701" },
},
},
},
});
// Always check userErrors in response — returns code like COMPANY_NOT_FOUND, INVALID
```
See [references/company-management.md](references/company-management.md) for the full mutation, additional contacts, locations, and roles.
### Step 2: Create a Catalog
Catalogs link products to specific companies. Use `catalogCreate` with a title, status, and `context.companyLocationIds`:
```typescript
await client.request(CATALOG_CREATE, {
variables: {
input: {
title: "Wholesale Tier 1",
status: "ACTIVE",
context: { companyLocationIds: ["gid://shopify/CompanyLocation/123456"] },
},
},
});
```
### Step 3: Set Wholesale Pricing
Create a price list with `priceListCreate`. Use `PERCENTAGE_DECREASE` for blanket discounts or `priceListFixedPricesAdd` for per-variant overrides:
```typescript
// 30% off all products in this catalog
await client.request(PRICE_LIST_CREATE, {
variables: {
input: {
name: "Wholesale 30% Off",
currency: "USD",
parent: { adjustment: { type: "PERCENTAGE_DECREASE", value: 30 } },
catalogId: "gid://shopify/Catalog/789",
},
},
});
```
For fixed price overrides, volume pricing, and multi-currency, see [references/catalog-pricing.md](references/catalog-pricing.md).
### Step 4: B2B Checkout Configuration
B2B orders use `draftOrderCreate` with `purchaseOrder` number and `purchasingEntity` linking to the company. Key fields:
```typescript
await client.request(DRAFT_ORDER_CREATE, {
variables: {
input: {
purchaseOrder: "PO-2026-0042",
lineItems: [{ variantId: "gid://shopify/ProductVariant/123", quantity: 100 }],
purchasingEntity: {
purchasingCompany: {
companyId: "gid://shopify/Company/456",
companyContactId: "gid://shopify/CompanyContact/789",
companyLocationId: "gid://shopify/CompanyLocation/012",
},
},
paymentTerms: { paymentTermsTemplateId: "gid://shopify/PaymentTermsTemplate/1" },
},
},
});
```
Payment terms templates: Due on receipt, Net 15, Net 30, Net 45, Net 60, Net 90. Query available templates with `paymentTermsTemplates`.
See [references/b2b-checkout.md](references/b2b-checkout.md) for the full draft order flow, invoice sending, and vaulted payments.
## Output
- B2B company created with contact and billing/shipping addresses
- Catalog linked to specific company locations
- Wholesale price list with percentage or fixed pricing
- Draft orders with purchase order numbers and payment terms
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `COMPANY_NOT_FOUND` | Invalid company GID | Verify the company ID exists via `companyQuery` |
| `CATALOG_LIMIT_EXCEEDED` | Max catalogs per context reached | Remove unused catalogs or upgrade plan |
| `PRICE_LIST_NOT_FOUND` | Price list not linked to catalog | Ensure `catalogId` is set on price list |
| `B2B_NOT_ENABLED` | B2B feature not activated | Enable B2B in Shopify admin Settings > B2B (requires Plus) |
| `COMPANY_CONTACT_NOT_FOUND` | Contact not associated with company | Create contact via `companyContactCreate` first |
| `INVALID_PURCHASING_ENTITY` | Missing company/contact/location in draft order | All three IDs required in `purchasingCompany` |
## Examples
### Onboarding a New Wholesale Partner
Create a B2B company with multiple contacts, locations, and roles for a new wholesale account joining your program.
See [Company Management](references/company-management.md) for the full mutation and multi-contact setup.
### Setting Up Tiered Wholesale Pricing
Configure percentage-based discounts for standard wholesalers and fixed per-variant overrides for VIP partners using price lists.
See [Catalog Pricing](references/catalog-pricing.md) for percentage, fixed price, and volume pricing strategies.
### Processing a B2B Purchase Order
Create a draft order with a PO number, Net 30 payment terms, and company association for a wholesale buyer.
See [B2B Checkout](references/b2b-checkout.md) for the full draft order flow, invoice sending, and vaulted payments.
## Resources
- [B2B on Shopify](https://shopify.dev/docs/apps/build/b2b)
- [companyCreate Mutation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyCreate)
- [catalogCreate Mutation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/catalogCreate)
- [priceListCreate Mutation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/priceListCreate)
- B2B Checkout
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.