edit_shopify_order_items
Edit the items on a Shopify order destructive
Description
Add products to a Shopify order, or change or remove its lines (quantity 0 removes one; removed units are restocked unless restock:false). Without confirm:true Shopify recalculates the order (new total, and what the buyer would owe) and NOTHING changes: show the user, get a yes, then call again with confirm:true (notifyCustomer emails the buyer the change; staffNote is for staff). When the new total is lower, refund the difference with refund_shopify_order. Line ids come from list_shopify_orders with an id; variant ids from get_shopify_inventory or list_shopify_products. Free.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequired | string | the order number (#1001) or gid |
add | object[] | |
add[].variantIdrequired | string | gid://shopify/ProductVariant/… or its number |
add[].quantityrequired | number | 1 or more |
add[].locationId | string | |
quantities | object[] | |
quantities[].lineItemIdrequired | string | the line's id, or its SKU or title when only one line has it |
quantities[].quantityrequired | number | the new quantity; 0 removes the line |
quantities[].restock | boolean | default true |
notifyCustomer | boolean | |
staffNote | string | |
confirm | boolean | true to commit the edit; without it nothing changes and the reply shows the new total |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/edit_shopify_order_items.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"edit_shopify_order_items","arguments":{"id":"<string>"}}}
CLI
hermoso call edit_shopify_order_items --json '{"id":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
refund_shopify_orderRefund a Shopify orderlist_shopify_ordersList Shopify ordersget_shopify_inventoryGet Shopify stocklist_shopify_productsList the Shopify catalogupdate_shopify_orderUpdate a Shopify orderfulfill_shopify_orderFulfil a Shopify orderimport_shopify_buyers_to_email_leadsAdd past Shopify buyers to the email leadscancel_shopify_orderCancel a Shopify ordershopify_sales_reportShopify sales reportlist_shopify_locationsList Shopify locations