From saleor-commerce
Manages Saleor order lifecycle: creation (drafts/checkout), fulfillments, returns, refunds, events, statuses. Fetches docs for GraphQL mutations.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin saleor-commerceThis skill is limited to using the following tools:
**Fetch live docs**:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
Fetch live docs:
site:docs.saleor.io orders order lifecycle status for order model and state transitionssite:docs.saleor.io fulfillments order fulfillment for fulfillment creation and trackingsite:docs.saleor.io returns refunds order for return and refund workflowshttps://docs.saleor.io/docs/developer/orders and review order statuses, events, and mutationssite:docs.saleor.io draft orders for draft order creation and completion patternshttps://docs.saleor.io/docs/developer/fulfillment and review fulfillment line items and tracking| Status | Description |
|---|---|
UNCONFIRMED | Order created but not yet confirmed (e.g., pending payment) |
UNFULFILLED | Order confirmed and paid; no items shipped yet |
PARTIALLY_FULFILLED | Some items have been shipped |
FULFILLED | All items have been shipped |
PARTIALLY_RETURNED | Some items have been returned |
RETURNED | All items have been returned |
CANCELED | Order has been cancelled |
| Status | Description |
|---|---|
NONE | No payment authorized |
PARTIAL | Partial amount authorized |
FULL | Full amount authorized |
| Status | Description |
|---|---|
NONE | No payment charged |
PARTIAL | Partial amount charged |
FULL | Full amount charged |
OVERCHARGED | Charged amount exceeds order total |
Orders in Saleor are typically created through the checkout completion process:
| Step | Description |
|---|---|
| 1. Checkout completed | Customer completes checkout with payment |
| 2. Order created | System generates order with status UNCONFIRMED or UNFULFILLED |
| 3. Payment confirmed | Transaction events confirm successful charge |
| 4. Ready for fulfillment | Order moves to UNFULFILLED status |
Orders can also be created via draft orders (see below) or programmatically through the
orderCreateFromCheckoutmutation.
Draft orders allow merchants and staff to create orders manually:
| Operation | Mutation | Notes |
|---|---|---|
| Create draft | draftOrderCreate | Specify lines, customer, addresses, channel |
| Update draft | draftOrderUpdate | Modify lines, addresses, discounts |
| Add lines | draftOrderLinesCreate | Add product variants to draft |
| Delete line | orderLineDelete | Remove a line from the draft |
| Complete draft | draftOrderComplete | Convert to a real order |
| Delete draft | draftOrderDelete | Remove draft before completion |
| Step | Description |
|---|---|
| 1. Query order | Retrieve unfulfilled order lines and warehouse info |
| 2. Create fulfillment | Use orderFulfill with line items and quantities |
| 3. Add tracking | Tracking number and URL included in fulfillment creation |
| 4. Notify customer | Optional email notification on fulfillment |
| Operation | Mutation | Notes |
|---|---|---|
| Fulfill order | orderFulfill | Specify lines, quantities, warehouse, tracking |
| Cancel fulfillment | orderFulfillmentCancel | Restock items optionally |
| Update tracking | orderFulfillmentUpdateTracking | Update tracking number and URL |
| Approve fulfillment | orderFulfillmentApprove | For orders requiring approval before shipping |
| Status | Description |
|---|---|
FULFILLED | Items shipped and tracking assigned |
CANCELED | Fulfillment cancelled; items may be restocked |
WAITING_FOR_APPROVAL | Fulfillment created but awaiting staff approval |
REFUNDED | Fulfillment refunded |
RETURNED | Items returned from this fulfillment |
REFUNDED_AND_RETURNED | Items both returned and refunded |
| Step | Description |
|---|---|
| 1. Create return | Use orderFulfillmentReturnProducts with fulfillment lines |
| 2. Specify quantities | Indicate which items and how many are being returned |
| 3. Optional refund | Include refund amount or create refund separately |
| 4. Restock | Optionally restock returned items to warehouse |
| Operation | Mutation | Notes |
|---|---|---|
| Grant refund | orderGrantRefundCreate | Create a granted refund (amount or lines) |
| Update grant | orderGrantRefundUpdate | Modify granted refund before processing |
| Send refund | transactionRequestAction with REFUND | Process the actual refund via payment App |
Saleor separates the concept of "granting" a refund (merchant decision) from "sending" a refund (payment processing). This allows partial refunds and multi-step refund workflows.
Saleor maintains a comprehensive event log for every order:
| Event Type | Description |
|---|---|
PLACED | Order was placed |
CONFIRMED | Order was confirmed |
FULFILLMENT_CANCELED | A fulfillment was cancelled |
FULFILLMENT_FULFILLED_ITEMS | Items were fulfilled |
PAYMENT_CAPTURED | Payment was captured |
PAYMENT_REFUNDED | Payment was refunded |
NOTE_ADDED | Staff note was added |
EMAIL_SENT | Notification email was sent |
CANCELED | Order was cancelled |
Fetch live docs for the complete
OrderEventsEnum-- additional event types exist for tracking, returns, and transaction updates.
Each order contains OrderLine objects representing purchased items:
| Field | Description |
|---|---|
productName | Product name at time of purchase |
variantName | Variant name at time of purchase |
productSku | SKU at time of purchase |
quantity | Number of units ordered |
quantityFulfilled | Number of units already shipped |
unitPrice | Price per unit (net and gross) |
totalPrice | Line total (net and gross) |
undiscountedUnitPrice | Original price before discounts |
Order lines store a snapshot of product data at the time of purchase. Changes to the product after the order do not affect existing orders.
| Discount Type | Description |
|---|---|
| Voucher | Applied via voucher code during checkout |
| Promotion | Automatic catalog or order promotion |
| Manual discount | Staff-applied discount via orderDiscountAdd |
| Operation | Mutation |
|---|---|
| Add manual discount | orderDiscountAdd |
| Update discount | orderDiscountUpdate |
| Delete discount | orderDiscountDelete |
| Operation | Query | Notes |
|---|---|---|
| List orders | orders | Filter by status, date, customer, channel |
| Get order | order | By ID; includes lines, events, fulfillments |
| Order by token | orderByToken | Customer-facing order lookup |
chargeStatus and authorizeStatus before fulfillingorderFulfillmentReturnProducts for returns -- it handles restock and refund in one stepmetadata and privateMetadata fieldsFetch the Saleor order lifecycle documentation for exact mutation inputs, order event types, and fulfillment patterns before implementing.