cancel-and-restock
Purpose
Cancels an unfulfilled or partially-unfulfilled order with configurable restock, refund, and customer notification options — without navigating the Shopify admin. Useful for fraud exception handling, out-of-stock cancellations, or customer-requested cancellations before dispatch. Cannot cancel orders that are already fully fulfilled.
Prerequisites
- Authenticated Shopify CLI session:
shopify auth login --store <domain> - API scopes:
read_orders,write_orders
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain (e.g., mystore.myshopify.com) |
| format | string | no | human | Output format: human or json |
| dry_run | bool | no | false | Preview operations without executing mutations |
| order_id | string | yes | — | GID of the order (e.g., gid://shopify/Order/12345) |
| reason | string | no | OTHER |
Cancel reason: CUSTOMER, DECLINED, FRAUD, INVENTORY, STAFF, OTHER |
| restock | bool | no | true | Restock inventory for cancelled line items |
| refund | bool | no | true | Issue refund for any captured payments |
| notify_customer | bool | no | true | Send cancellation email to customer |
More from 40rty-ai/shopify-admin-skills
shopify-admin-skills
Master skill collection for Shopify store operators. Provides access to all merchandising, marketing, support, and operations capabilities.
157shopify-store-skills
A brief description of what this skill does
16shopify-admin-variant-option-normalizer
Detects inconsistent variant option naming (Sm vs Small vs S) and bulk-corrects to a standard set.
5shopify-admin-discount-hygiene-cleanup
Finds expired, zero-usage, or duplicate discount codes and optionally deactivates or deletes them.
5shopify-admin-gift-card-issuance
Issue Shopify gift cards (store credit) to customers as a goodwill gesture, post-return incentive, or loyalty reward.
5shopify-admin-fulfillment-status-digest
Generate a daily fulfillment triage digest: all open orders segmented by fulfillment age and flagged for holds or exceptions.
5