shopify-admin-restock-on-return

Installation
SKILL.md

Purpose

Walks through recently approved or closed returns and restocks inventory for each returnLineItem whose physical item has been received and inspected. Adjusts the available quantity at the return's destination location using inventoryAdjustQuantities with reason restock and a referenceDocumentUri linking to the return record. Use when warehouse processing posts in a separate system from Shopify, or when manual restock has been deferred and needs a clean catch-up run.

Prerequisites

  • Authenticated Shopify CLI session: shopify store auth --store <domain> --scopes read_returns,write_inventory,read_locations
  • API scopes: read_returns, read_inventory, write_inventory

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 true Preview restock plan without executing inventory mutations
days_back integer no 14 Lookback window for recently completed returns
return_status string no CLOSED Only restock returns in this status: CLOSED, OPEN, or ANY
location_id string no If set, restock only returns whose inventory destination matches this location GID
restock_only_return_reasons array no If set (e.g., ["UNWANTED", "SIZE_TOO_SMALL"]), restock only items returned for these reasons; DEFECTIVE is excluded by default
skip_defective bool no true Exclude returnLineItem.returnReason: DEFECTIVE items from restock
Installs
2
GitHub Stars
182
First Seen
Jun 2, 2026
shopify-admin-restock-on-return — 40rty-ai/shopify-admin-skills