Skip to content

Cancel Order

The Cancel Order push cancels orders in Shopify. Each record cancels one order, with its reason, whether to restock and how to refund.

On a push connector, select Cancel Order as the Shopify Import Type. The push sends each record through Shopify's orderCancel mutation. Shopify cancels the order in the background, and IMan waits up to 30 seconds to write back the time it did.

Shopify cancels a whole order. It refuses to cancel an order twice.

Fields

Field Rule
Order Id Required. The order to cancel, as a numeric id or a gid
Reason customer, declined, fraud, inventory, staff or other. Blank is other
Restock True puts the order's items back in stock. Blank is False
Refund original, or True, refunds what the customer paid to the original payment methods. store_credit refunds it as store credit. Blank, or False, refunds nothing. Shopify voids authorised payments either way
Store Credit Expires At With store_credit, when the store credit expires. Blank never expires
Notify Customer True emails the customer the cancellation. Blank is False
Staff Note A note for staff, up to 255 characters
Cancelled At Written back once Shopify has cancelled the order
Use Bulk Operations True sends the run through bulk operations

A store credit refund needs an order with a customer. Shopify refuses it for an order without one.

When Shopify takes longer than 30 seconds, it still cancels the order, and IMan leaves Cancelled At blank.

Errors

A value that is not on its list fails the record before IMan sends it. A refusal from Shopify fails the record with Shopify's message:

Shopify did not cancel order 1234567890:
Cannot cancel an order that has already been canceled

Bulk Operations

With Use Bulk Operations on, IMan sends the run through Shopify bulk operations. Records that name the same order go in successive rounds. After the last round, IMan reads back Cancelled At for the cancelled orders, 50 at a time.

Access Scopes

The push needs write_orders. See Access Scopes.

Shopify Reference

orderCancel in Shopify's GraphQL Admin API reference.