shopify-admin-draft-order-cleanup

Installation
SKILL.md

Purpose

Queries open draft orders older than a configurable age and optionally deletes them. Draft orders accumulate from abandoned B2B quotes, incomplete manual orders, or old integrations and clutter the admin. Stale drafts also inflate pending revenue metrics.

Prerequisites

  • Authenticated Shopify CLI session: shopify store auth --store <domain> --scopes read_orders,write_orders
  • API scopes: read_orders, write_orders

Parameters

Parameter Type Required Default Description
store string yes Store domain (e.g., mystore.myshopify.com)
older_than_days integer no 30 Delete drafts older than this many days
dry_run bool no true Preview drafts to delete without executing mutation
format string no human Output format: human or json

Safety

⚠️ draftOrderDelete permanently deletes draft orders. Deleted drafts cannot be recovered. Run with dry_run: true to review the list before committing. Check that no stale drafts represent active B2B quotes awaiting customer approval before deleting.

Related skills
Installs
5
GitHub Stars
139
First Seen
Apr 12, 2026