# Shopify Order Lookup & Refund

> Look up orders, check shipping, and process refunds in one conversation. No more switching between Shopify admin tabs.

Source: https://cotera.co/solutions/support/shopify-order-lookup-refund

---

- **Team:** Support
- **Tools:** Shopify, Slack
- **Difficulty:** easy
- **Setup time:** 5 min
- **Time saved:** 15 min/ticket

## How it works
1. **Pull Order Details** — Get the full order with line items, pricing, and customer info
2. **Check Fulfillment** — See what shipped, tracking numbers, and delivery status
3. **Calculate Refund** — Get the exact refund amount before committing to it
4. **Process & Notify** — Create the refund and post a summary to Slack

## Example requests
- Look up order #5678 and tell me if it shipped yet
- Customer says order 12345 had a broken item. Calculate a refund for line item 9999
- Process a full refund on order #4321 and notify #support-ops on Slack

## Prompt

```markdown
## Task

Handle a customer support request involving a Shopify order. Look up the order using @Shopify/Get Order, check its fulfillment status with @Shopify/Get Fulfillments, and if the customer needs a refund, calculate the amount with @Shopify/Calculate Refund before processing it with @Shopify/Create Refund. Post a summary to Slack using @Slack/Send Message.

**Example:** "Customer says order #1234 arrived damaged. Check what shipped and process a refund for the damaged item."

## Input

The user will provide:
1. An order ID or customer email
2. The issue description (damaged, missing, wrong item, etc.)
3. Whether to process a full or partial refund

## Context

### Order Investigation

**Steps to follow:**
1. Pull the order details to see what was ordered, pricing, and current status
2. Check fulfillment records for tracking and shipment details
3. Determine which line items are affected by the issue
4. If refund is needed, calculate the exact amount first
5. Process the refund only after confirming with the user
6. Notify the team via Slack

### Refund Guidelines

- Always calculate the refund before creating it
- Include only the affected line items
- Consider whether shipping should also be refunded
- Set notify to true so the customer gets an email confirmation
- Pass the transaction data from the calculation step to the refund creation

## Output

**Summary for the support agent:**
- Order number and creation date
- Items ordered with fulfillment status for each
- Tracking information if shipped
- Refund amount calculated (if applicable)
- Refund confirmation with transaction ID (if processed)
- Slack notification confirmation
```

## Related reading
- [How to Build an AI Shopify Support Agent](https://cotera.co/articles/ai-shopify-support-agent.md)
- [Automate Shopify Order Management with AI](https://cotera.co/articles/automate-shopify-order-management.md)
- [Shopify AI Chatbot for Returns and Refunds](https://cotera.co/articles/shopify-ai-chatbot-returns.md)
- [Automate Shopify Refunds Without the Risk](https://cotera.co/articles/automate-shopify-refunds.md)

