> For the complete documentation index, see [llms.txt](https://docs.hotwax.co/documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hotwax.co/documents/learn-shopify/shopify-reference/order-cancellation/complete-order-cancellation.md). Agents can also search and read this documentation through its [MCP server](https://docs.hotwax.co/documents/~gitbook/mcp).

# Complete Order Cancellation

Learn the process of complete order cancellation in Shopify and its update in HotWax Commerce.

## From Shopify cancellation to OMS item status

Canceling an order in Shopify and applying that cancellation in HotWax Commerce are separate steps. The configured integration must import the update, match the OMS order, and process its eligible unfulfilled items. An imported update or successful job run alone does not establish that every OMS item was canceled.

```mermaid
flowchart TD
    accTitle: Shopify cancellation import and eligible OMS items
    accDescr: A Shopify cancellation enters the configured import path and is matched to an OMS order. Eligible unfulfilled items are canceled and their status is verified. Missing or terminal orders, and items that are not eligible, require review rather than assuming cancellation undoes fulfillment.
    A[Order canceled in Shopify] --> B[Import update and match OMS order]
    B --> D{Eligible unfulfilled items?}
    D -->|Yes| E[Cancel eligible items and verify OMS status]
    D -->|No| G[Review order mapping and current item status]
```

### Import the cancellation

OMS order sync reads Shopify's `cancelledAt` value and processes eligible items on the matching OMS order. Its webhook and fallback order-sync entry paths are described in [Order download](https://docs.hotwax.co/documents/learn-shopify/shopify-reference/orders/order-download.md).

The fallback job's normal subsequent runs inspect the updated-time window. Its first run selects open, unfulfilled or partially fulfilled orders; do not use that first run as a historical cancellation backfill.

Confirm the affected shop, order identifiers, import window, and latest processing result before recovery. An imported update alone does not prove that eligible OMS items were canceled.

### Verify the cancellation scope

The OMS order-update path selects items in `ITEM_CREATED` or `ITEM_APPROVED` status and skips orders already marked completed or canceled. Its item cancellation service skips items already canceled or completed. Completed fulfillment remains distinct from cancellation of the remaining unfulfilled items.

After sync, compare the affected OMS item's status and cancellation history with the Shopify order. Check the order summary separately, especially when other items have already been fulfilled. For a missing update, inspect the configured import path, order mapping, item eligibility, and processing outcome before recovery; do not assume another cancellation request is needed.

<figure><img src="https://1292394199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq42f0puI9OYah51t08oQ%2Fuploads%2Fgit-blob-ff89ba39d00e6d72e2b2fb6395484a8484bd8139%2Fshopify-canceled-order-removed-item.jpg?alt=media" alt="Shopify demo canceled order showing one removed Augusta Pullover Jacket in XS Blue, SKU WJ03-XS-Blue"><figcaption><p>The removed item in an existing canceled Shopify demo order. Verify the matching OMS item and cancellation history separately.</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hotwax.co/documents/learn-shopify/shopify-reference/order-cancellation/complete-order-cancellation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
