From use-crystallize
Mutate data in Crystallize - create products, documents, and folders, update item components, manage product variants and SKUs, publish/unpublish items, handle customers and orders, manage carts and checkout flows, convert cart to order, create orders from checkout or directly (POS, imports), record payments, track fulfillment pipeline stages, upload images and media, import data, delete items, and perform bulk operations. Use this skill when creating or updating any content in Crystallize, adding products to the catalogue, modifying descriptions or fields, setting up checkout, placing orders, managing stock, recording payments, tracking order fulfillment, or writing data through the Core API or Shop API.
How this skill is triggered — by the user, by Claude, or both
Slash command
/use-crystallize:mutationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create, update, and manage data in Crystallize using GraphQL mutations. This skill covers all write operations across the Core API (admin/content management) and Shop API (cart/checkout).
Create, update, and manage data in Crystallize using GraphQL mutations. This skill covers all write operations across the Core API (admin/content management) and Shop API (cart/checkout).
Before writing mutations, understand the context. Ask clarifying questions:
updateComponent for fields, create for new items.What do you need to do?
│
├─ Create/update catalogue items (products, documents, folders)
│ ├─ Create new item → Core API: product/document/folder.create
│ ├─ Update a field on an item → Core API: item.updateComponent
│ ├─ Add/update product variants → Core API: product.setVariants
│ ├─ Publish/unpublish → Core API: item.publish / item.unpublish
│ └─ Delete an item → Core API: item.delete
│
├─ Manage customers
│ ├─ Create individual → Core API: customer.createIndividual
│ ├─ Create organization → Core API: customer.createOrganization
│ └─ Update customer → Core API: customer.update
│
├─ Manage orders
│ ├─ Create order from cart → Shop API /order: createFromCart
│ ├─ Create order directly (POS, import) → Shop API /order: create
│ ├─ Add/update payments → Shop API /order: addPayments / setPayments
│ ├─ Track order through pipeline → Shop API /order: addToStage
│ └─ Update order metadata → Shop API /order: setMeta (or Core API: order.update)
│
├─ Cart & checkout (storefront)
│ ├─ Create/hydrate a cart → Shop API: hydrate
│ ├─ Modify cart items → Shop API: addItems / removeItems / setCartItem
│ ├─ Set customer & addresses → Shop API: setCustomer / setAddresses
│ └─ Convert cart to order → Shop API: cartAsOrderIntent
│
└─ Bulk operations
└─ Use mass operation JSON via the content-model skill's output format
| Use Case | API | Why |
|---|---|---|
| Creating/editing items, shapes, customers | Core API | Full read/write, admin-level access |
| Cart management, checkout | Shop API /cart | Edge-distributed cart lifecycle |
| Order creation, payments, pipelines | Shop API /order | Full order CRUD after checkout |
| Bulk shape + item creation | Core API via mass operations | Ordered multi-step creation |
| API | Endpoint | Auth Required | Use For |
|---|---|---|---|
| Core | https://api.crystallize.com/@{tenant} | Yes | Items, shapes, customers |
| Shop /cart | https://shop-api.crystallize.com/{tenant}/cart | Yes (JWT) | Cart management, checkout |
| Shop /order | https://shop-api.crystallize.com/{tenant}/order | Yes (JWT) | Order CRUD, payments |
POST https://api.crystallize.com/@{tenant-identifier}
Note the @ prefix before the tenant identifier.
curl -X POST 'https://api.crystallize.com/@your-tenant' \
-H 'Content-Type: application/json' \
-H 'X-Crystallize-Access-Token-Id: YOUR_TOKEN_ID' \
-H 'X-Crystallize-Access-Token-Secret: YOUR_TOKEN_SECRET' \
-d '{"query": "mutation { ... }"}'
Generate access tokens in the Crystallize App under Settings > Access Tokens. See the permissions skill for scoping tokens.
POST https://shop-api.crystallize.com/{tenant-identifier}/cart
Authorization: Bearer YOUR_JWT_TOKEN
No @ prefix for the Shop API endpoint.
See Core API Reference for each mutation.
item.updateComponent for each field you need to changeEach updateComponent call targets a single component by componentId. You can update multiple components by sending multiple mutations.
See Shop API Cart Mutations for steps 1-4, and Shop API Order Mutations for step 5.
For creating many items at once, use the mass operations JSON format produced by the content-model skill. Mass operations follow a 4-phase ordering:
The Core API uses union return types. Always include error fragments in your mutations:
mutation {
product {
create(input: { ... }) {
... on Product {
id
name
}
... on BasicError {
errorName
message
}
}
}
}
Common error types: BasicError, UnauthorizedError, ItemNotFoundError, OrderDoesNotBelongToTenantError.
For JavaScript/TypeScript projects, use @crystallize/js-api-client instead of raw HTTP calls. It provides typed helpers for all mutations. See the js-api-client skill for setup and usage.
import { createClient } from "@crystallize/js-api-client";
const api = createClient({
tenantIdentifier: "your-tenant",
accessTokenId: "...",
accessTokenSecret: "...",
});
// Use pimApi for Core API mutations
const result = await api.pimApi(mutationString, variables);
When generating mutations for the user, produce:
"your-tenant-id", "item-id")If the user is working in a JS/TS project, prefer generating code using @crystallize/js-api-client helpers.
npx claudepluginhub crystallizeapi/ai --plugin use-crystallizeCreates and manages Shopify products via GraphQL Admin API or CSV imports. Bulk import/update variants, inventory, images, assign to collections.
Manages Shopify products, variants, collections, and inventory with GraphQL Admin API. Handles CRUD for catalog integrations, including product options and inventory quantities.
Handles full CRUD operations on Wix Stores products including variants, media, collections, and bulk actions via direct REST API calls. Useful for managing ecommerce catalogs.