Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
40rty-ai avatar

Shopify Admin Return Initiation

  • 7 installs
  • 173 repo stars
  • Updated June 26, 2026
  • 40rty-ai/shopify-admin-skills

shopify-admin-return-initiation is a Claude Code skill that creates a formal Shopify Return record on a fulfilled order via the returnCreate GraphQL mutation.

About

shopify-admin-return-initiation creates a formal Shopify Return record on a delivered order, specifying which line items, quantities, and reason to return. A support agent runs it when a customer asks to return fulfilled items, producing a return record that Shopify tracks for warehouse inspection and refund resolution. It requires the order to be in FULFILLED status and can optionally email the customer.

  • Creates a formal Shopify Return record via returnCreate on a FULFILLED order
  • dry_run preview and per-item return reasons before committing the mutation
  • Requires read_orders and write_returns scopes; can notify the customer by email

Shopify Admin Return Initiation by the numbers

  • 7 all-time installs (skills.sh)
  • Ranked #1,587 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 1, 2026 (Skillselion catalog sync)
At a glance

shopify-admin-return-initiation capabilities & compatibility

Free; needs a Shopify CLI session with read_orders and write_returns scopes

Capabilities
shopify returns · return initiation · order management
Runs
Runs locally
Pricing
Free
From the docs

What shopify-admin-return-initiation says it does

Create a formal Shopify Return record for an order, specifying line items, quantities, and return reason — the first step in the native returns workflow.
SKILL.md
returnCreate` requires the order to be in `FULFILLED` status. For orders that haven't shipped yet, use `cancel-and-restock` instead.
SKILL.md
npx skills add https://github.com/40rty-ai/shopify-admin-skills --skill shopify-admin-return-initiation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs7
repo stars173
Last updatedJune 26, 2026
Repository40rty-ai/shopify-admin-skills

What it does

A Shopify support agent uses it to open a native return on a delivered order with specific line items and a return reason.

Who is it for?

Support agents opening a native Shopify return on a delivered order

Skip if: Orders that have not shipped yet (use cancel-and-restock) or already-returned items needing a refund (use refund-and-reorder)

When should I use this skill?

A customer contacts support to return delivered items on a FULFILLED order

What you get

A tracked Shopify return record in OPEN status with the specified line items and reason.

  • Shopify return record (return.id, status OPEN)
  • optional customer notification email

By the numbers

  • 2-step workflow (order query then returnCreate mutation)
  • 9 supported return reason codes

Files

SKILL.mdMarkdownGitHub ↗

Purpose

Initiates a formal Shopify Return on a delivered order — specifying which line items to return, quantities, and reason. This creates the return record in Shopify's native returns system (distinct from simply issuing a refund). Used by support agents when a customer contacts them to return delivered items. The return record enables tracking, warehouse inspection, and exchange/refund resolution downstream. Note: returnCreate requires the order to be in FULFILLED status. For orders that haven't shipped yet, use cancel-and-restock instead. For already-returned items needing a refund, use refund-and-reorder.

Prerequisites

  • shopify auth login --store <domain>
  • API scopes: read_orders, write_returns

Parameters

ParameterTypeRequiredDefaultDescription
storestringyesStore domain (e.g., mystore.myshopify.com)
formatstringnohumanOutput format: human or json
dry_runboolnofalsePreview operations without executing mutations
order_idstringyesGID of the order (e.g., gid://shopify/Order/12345)
return_line_itemsarraynoall fulfilledArray of {fulfillment_line_item_id, quantity, reason, reason_note} to return
return_reasonstringnoOTHERDefault return reason for all items if not specified per-item: SIZE_TOO_SMALL, SIZE_TOO_LARGE, WRONG_ITEM, NOT_AS_DESCRIBED, DEFECTIVE, STYLE, COLOR, UNWANTED, OTHER
notify_customerboolnotrueSend return initiation notification email to customer

Safety

⚠️ Step 2 executes returnCreate which creates a formal return record and — if notify_customer: true — sends an email to the customer. This is appropriate only after verifying with the customer that a return is expected. Run with dry_run: true to preview the return line items and quantities before committing.

Workflow Steps

1. OPERATION: order — query Inputs: id: <order_id> Expected output: Order name, displayFulfillmentStatus (must be FULFILLED — abort if not), fulfillments with fulfillmentLineItems including id, quantity, discountedTotalSet

2. OPERATION: returnCreate — mutation Inputs: returnInput.orderId, returnInput.returnLineItems array (each with fulfillmentLineItemId, quantity, reason, customerNote) Expected output: return.id, return.status: OPEN, userErrors

GraphQL Operations

# order:query — validated against api_version 2025-01
query OrderForReturn($id: ID!) {
  order(id: $id) {
    id
    name
    displayFulfillmentStatus
    displayFinancialStatus
    customer {
      id
      defaultEmailAddress {
        emailAddress
      }
      firstName
      lastName
    }
    fulfillments {
      id
      status
      fulfillmentLineItems(first: 50) {
        edges {
          node {
            id
            quantity
            lineItem {
              title
              variant {
                id
                sku
              }
            }
            discountedTotalSet {
              shopMoney { amount currencyCode }
            }
          }
        }
      }
    }
  }
}
# returnCreate:mutation — validated against api_version 2025-01
mutation ReturnCreate($returnInput: ReturnInput!) {
  returnCreate(returnInput: $returnInput) {
    return {
      id
      status
      order {
        id
        name
      }
    }
    userErrors {
      field
      message
    }
  }
}

Session Tracking

Claude MUST emit the following output at each stage. This is mandatory.

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: return-initiation                    ║
║  Store: <store domain>                       ║
║  Started: <YYYY-MM-DD HH:MM UTC>             ║
╚══════════════════════════════════════════════╝

After each step, emit:

[N/TOTAL] <QUERY|MUTATION>  <OperationName>
          → Params: <brief summary of key inputs>
          → Result: <count or outcome>

If dry_run: true, prefix every mutation step with [DRY RUN] and do not execute it.

On completion, emit:

For format: human (default):

══════════════════════════════════════════════
OUTCOME SUMMARY
  Order:               <name>
  Return ID:           <id>
  Line items included: <count>
  Return status:       <status>
  Customer notified:   <yes/no>
  Errors:              0
  Output:              none
══════════════════════════════════════════════

For format: json, emit:

{
  "skill": "return-initiation",
  "store": "<domain>",
  "started_at": "<ISO8601>",
  "completed_at": "<ISO8601>",
  "dry_run": false,
  "steps": [
    { "step": 1, "operation": "OrderForReturn", "type": "query", "params_summary": "order <id>", "result_summary": "<status>", "skipped": false },
    { "step": 2, "operation": "ReturnCreate", "type": "mutation", "params_summary": "<n> line items, reason: <reason>", "result_summary": "return <id>", "skipped": false }
  ],
  "outcome": {
    "order_name": "<name>",
    "return_id": "<id>",
    "return_status": "<status>",
    "line_items_count": "<count>",
    "customer_notified": "<true/false>",
    "errors": 0,
    "output_file": null
  }
}

Output Format

No CSV output. The session summary reports the return ID and status. Line items included in the return are listed in the step 2 output.

Error Handling

ErrorCauseRecovery
displayFulfillmentStatus not FULFILLEDOrder hasn't shipped yetUse cancel-and-restock for unfulfilled orders
fulfillmentLineItemId not foundLine item ID doesn't belong to this order's fulfillmentsRe-query the order to get correct fulfillment line item IDs
userErrors from returnCreateInvalid quantity or reasonCheck quantity doesn't exceed fulfillmentLineItem.quantity
Return already existsA return was already created for these itemsCheck order returns in Shopify admin

Best Practices

1. Always run dry_run: true first — confirm the fulfillment line item IDs and quantities before creating the return record. 2. The return-initiation skill creates the return record only — it does not issue a refund. After inspecting the returned item, use refund-and-reorder to process the monetary refund. 3. Set reason per line item when items have different return reasons — this improves your returns analytics in Shopify. 4. For exchanges (not refunds), create the return record here and then use refund-and-reorder with create_replacement: true to generate a replacement draft order. 5. The return status will be OPEN after creation — it moves to IN_PROGRESS when a return label is generated and CLOSED when the refund is processed.

Related skills

FAQ

Does this issue a refund?

No. It creates a formal return record in Shopify's native returns system, which is distinct from issuing a refund.

What order status is required?

returnCreate requires the order to be in FULFILLED status; unshipped orders should use cancel-and-restock instead.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.