Shopify Return & Refund Processor

Process returns from search to refund in one conversation. Built-in safety rails so you never refund the wrong amount.

Return handlingRefund processingCustomer lookupSafety rails

The Challenge

A customer emails asking to return an item. You search for their name in Shopify, find the right order, check the order date to see if it is within the return window, navigate to the refund page, select the line item, calculate the partial amount with tax, process it, and confirm. Ten minutes per return, and your team handles dozens every week. One mistake on the refund math and you are either overcharging or eating the cost.

What This Prompt Does

Find the Customer

Search by email, name, or phone to find the right account

Pull the Order

Get full order details with line items, dates, and payment info

Calculate the Refund

Get the exact refund amount for specific line items before committing

Process with Guardrails

Create the refund only after confirmation, with high-value alerts

The Prompt

The Prompt

Task

Handle a customer return request from start to finish. Use @Shopify/Search CustomersName it "Shopify/Search Customers" and call it with @Shopify/Search Customers to find the customer, @Shopify/Get OrderName it "Shopify/Get Order" and call it with @Shopify/Get Order to pull the order details, @Shopify/Calculate RefundName it "Shopify/Calculate Refund" and call it with @Shopify/Calculate Refund to determine the refund amount, and @Shopify/Create RefundName it "Shopify/Create Refund" and call it with @Shopify/Create Refund to process it.

Example: "Customer jane@exampleName it "example" and call it with @example.com wants to return the red scarf from their last order. Process the refund."

Input

The user will provide:

  1. Customer identifier (email, name, or phone)
  2. Which order or item they want to return
  3. Reason for the return (optional)

Context

Return Processing Workflow

Steps to follow:

  1. Find the customer using @Shopify/Search CustomersName it "Shopify/Search Customers" and call it with @Shopify/Search Customers
  2. Pull their order with @Shopify/Get OrderName it "Shopify/Get Order" and call it with @Shopify/Get Order to see line items and order date
  3. Verify the item is eligible for return (check order date against return window)
  4. Calculate the refund amount using @Shopify/Calculate RefundName it "Shopify/Calculate Refund" and call it with @Shopify/Calculate Refund for the specific line items
  5. Present the refund amount to the user for confirmation
  6. Process the refund with @Shopify/Create Refund only after user confirmsName it "Shopify/Create Refund only after user confirms" and call it with @Shopify/Create Refund only after user confirms

Safety Rails

  • Always calculate before processing. Never skip the calculation step.
  • Show the refund amount and ask for confirmation before creating the refund
  • For refunds over $100, explicitly flag the amount to the user
  • Include shipping refund only if the user requests it or the entire order is being returned
  • Set notify to true so the customer gets an email confirmation
  • If the order is outside the return window, inform the user and ask how to proceed rather than refusing

Output

Return summary:

  • Customer name and email
  • Order number and date
  • Items being returned
  • Refund amount calculated (line items + tax + shipping if applicable)
  • Refund confirmation with transaction ID (after processing)
  • Whether customer notification was sent

Example Usage

Try asking:

  • "Customer jane@example.com wants to return the red scarf from order #4567"
  • "Process a refund for the damaged item in order 12345. Customer is John Smith."
  • "Check if order #8901 is still within the return window and calculate the refund for all items"