---
title: "Edit a Shopify order or swap an item with an AI agent"
description: "Richpanel's AI agent can edit an unshipped Shopify order: swap a size, color or product, add or remove items, change quantities or change the shipping method. Swaps keep the order total by default, and a higher total sends the customer a Shopify invoice. Checks, permissions and integrations."
url: https://www.richpanel.com/learn/ai-actions-edit-order
datePublished: 2026-09-24
dateModified: 2026-09-24
author: "Amit RG"
source: richpanel.com
---

# Edit an order or swap an item with an *AI agent*

Wrong size, wrong color, one more item. The AI edits the Shopify order before it ships, so the customer does not return it later.

## Can Richpanel's AI agent edit an order?

#### The short answer

Yes, before it ships. Richpanel's AI agent edits Shopify orders through Shopify's order editing. It can swap a size, color or product, add or remove items, change quantities, or change the shipping method. A swap keeps the order total by default. If an edit raises the total, the customer gets a Shopify invoice link for the difference.

## What starts an *order edit*

| The customer says | The edit |
| --- | --- |
| Can I get a medium instead? | Swap the variant on the same order |
| Add one more to my order | Add an item or raise the quantity |
| Take the second one off | Remove an item or lower the quantity |
| I need it faster | Change the shipping method, from live rates |

## What the AI checks *before it edits*

- **The customer.** Identity is confirmed first when your store requires it, and the order must belong to that customer.
- **The order type.** A regular order and a draft order use different edits. The AI reads which one it is.
- **The original item.** For a swap, the item being replaced must exist on the order. The AI never adds the new item alone.
- **The new variant.** It comes from your live Shopify catalog, by product search.
- **Fulfillment.** Edits and shipping-method changes are only possible before the order ships.

## What happens *when the total changes*

| Edit result | What the customer gets |
| --- | --- |
| A swap at the same price | The new item, with no payment change |
| A swap that would change the price | Nothing yet. The swap stops rather than create a bill |
| An edit that raises the total | A Shopify invoice link for the difference |
| An edit that lowers the total | The difference back, under your refund permission |

## A swap *instead of a return*

A wrong size caught before shipping is one edit. Caught after delivery, it is a return label, a second shipment and a refund or exchange.

For subscriptions, the same swap happens in Recharge. See [subscription actions](https://www.richpanel.com/learn/ai-actions-subscriptions).

## Who approves an *order edit*

Edit Order has its own permission: Always allow, or Require approval. When it waits for approval, the edit itself is the review card your agent approves in one click.

An action with no permission set waits for approval by default. Any refund the edit creates follows your refund permission separately.

## When the AI *hands the edit to your team*

Shipped orders go to your team. So do items the AI cannot match and edits your policy does not cover.

A hand-off takes three steps. The AI saves an internal note with the reason. It sends the customer one reply on what happens next. The conversation stays open for your team.

If your playbook names a hand-off mode, the AI switches the conversation to Manual or Co-Pilot. No further AI reply then goes out on its own.

## Which systems the edit *runs in*

| System | Edit action |
| --- | --- |
| Shopify | Order editing: swap, add, remove, change quantity |
| Shopify | Draft order editing |
| Shopify | Live shipping rates for a shipping-method change |
| Shopify | Product search for the replacement variant |
| Shopify | Invoice for any balance the customer owes |

Every other AI action, and how each is controlled, is on the [AI actions overview](https://www.richpanel.com/learn/ai-actions).

## AI order editing: common questions.

### Can an AI agent edit a Shopify order?

Yes, before it ships. Richpanel's AI agent uses Shopify's order editing to swap variants, add or remove items and change quantities. It can also change the shipping method. Your Edit Order permission applies.

### Can the AI swap a size or color on an order?

Yes. It removes the original item and adds the new variant on the same order. By default a swap keeps the order total. If the price would change, the swap stops rather than create a bill.

### What if the edit changes the price?

If the total goes up, the customer gets a Shopify invoice link for the difference. If it goes down, the difference is refunded under your refund permission.

### Can the AI edit an order that already shipped?

No. Shopify only allows edits before fulfillment. The AI follows your SOP for shipped orders, usually a return or exchange, or hands off to your team.

## Where these facts come from.

1. **Richpanel AI action catalog, as of September 24, 2026.** The list of actions the AI agent can call, with each action's inputs, preconditions and default permission. Every capability on this page maps to a named action in it: edit_order, edit_draft_order, check_shipping_options, search_products, get_product_details and send_invoice.
2. **Richpanel AI safety.** The five safety layers, including sensitive-action guardrails, tool permissions and QA AI review of every conversation. [richpanel.com/ai-safety](https://www.richpanel.com/ai-safety)

Version history. v1.0 (2026-09-24): initial publication. Every action on this page is checked against the Richpanel AI action catalog as it stood on the publication date.
