Automation Run Query Adds New Store Credit Fields

11/7/2026, 12:00:35 AM

A new query, automationWorkflowRun, allows retrieval of a specific automation run by ID and brings the AutomationWorkflowRun type along with its AutomationWorkflowRunKind and AutomationWorkflowRunStatus enums. Inventory bin handling is enhanced: the InventoryBinSortKeys enum now includes IS_AVAILABLE_FOR_SALE, and the bin query accepts an is_available_for_sale filter, giving developers finer control over bin data. Order-related mutations and fields now recognize write‑off adjustments: orderUpdate, removeFromReturn, and returnLineItemRemoveFromReturn can automatically reduce a write‑off amount when the order total changes; the order.customer description was updated to clarify guest checkout support. All store credit transaction types (credit, debit, re‑vert, expiration, and general transaction) now expose a merchant‑only note field and can return a new NOTE_TOO_LONG error code if the note exceeds limits. Additional enum values added to TaxSummaryCreateUserErrorCode, QuantityPriceBreakSortKeys, and ValidationSortKeys provide new error conditions and sort options, while SHOPPLAN and other fields receive updated documentation but remain functionally unchanged. No deprecations were introduced, and existing mutations continue to work as before, with the added clarity and capabilities described above.

Query Changes

➕ Added Queries (1)

automationWorkflowRun

Returns one production or test run of an automation, with its run-level fields. Returns null when no run with the ID exists or its automation isn't readable.

Mutation Changes

🔄 Modified Mutations (4)

orderCancel

Cancels an order, with options for refunding, restocking inventory, and customer notification.

Caution:
Order cancellation is irreversible. An order that has been cancelled can't be restored to its original state.

Use the orderCancel mutation to programmatically cancel orders in scenarios such as:

  • Customer-requested cancellations due to size, color, or other preference changes
  • Payment processing failures or declined transactions
  • Fraud detection and prevention
  • Insufficient inventory availability
  • Staff errors in order processing
  • Wholesale or B2B order management workflows

The orderCancel mutation provides flexible refund options including refunding to original payment methods
or issuing store credit. If a payment was only authorized (temporarily held) but not yet charged,
that hold will be automatically released when the order is cancelled, even if you choose not to refund other payments.

If the order has an existing
write-off,
calling this mutation can reduce the written-off amount automatically when the cancellation includes a
refund that reduces the order total before write-offs below the remaining written-off amount.

The mutation supports different cancellation reasons: customer requests, payment declines, fraud,
inventory issues, staff errors, or other unspecified reasons. Each cancellation can include optional
staff notes for internal documentation (notes aren't visible to customers).

An order can only be cancelled if it meets the following criteria:

  • The order hasn't already been cancelled.
  • The order has no pending payment authorizations.
  • The order has no active returns in progress.
  • The order has no outstanding fulfillments that can't be cancelled.

Orders might be assigned to locations that become
deactivated
after the order was created. When cancelling such orders, inventory behavior depends on payment status:

  • Paid orders: Cancellation will fail with an error if restocking is enabled, since inventory
    can't be returned to deactivated locations.
  • Unpaid orders: Cancellation succeeds but inventory is not restocked anywhere, even when the
    restock option is enabled. The committed inventory effectively becomes unavailable rather than being
    returned to stock at the deactivated location.

After you cancel an order, you can still make limited updates to certain fields (like
notes and tags) using the
orderUpdate.

For partial refunds or more complex refund scenarios on active orders,
such as refunding only specific line items while keeping the rest of the order fulfilled,
consider using the refundCreate
mutation instead of full order cancellation.

Learn how to build apps that integrate with
order management and fulfillment processes.

orderUpdate

Updates the attributes of an order, such as the customer's email, the shipping address for the order,
tags, and metafields associated with the order.

In API version 2026-10 and later, if the order has an existing
write-off,
calling this mutation can reduce the written-off amount automatically when a shipping address change
recalculates taxes and this reduces the order total before write-offs below the remaining written-off
amount.

If you need to make significant updates to an order, such as adding or removing line items, changing
quantities, or modifying discounts, then use
the orderEditBegin
mutation instead. The orderEditBegin mutation initiates an order editing session,
allowing you to make multiple changes before finalizing them. Learn more about using the orderEditBegin
mutation to edit existing orders.

If you need to remove a customer from an order, then use the orderCustomerRemove
mutation instead.

Learn how to build apps that integrate with
order management and fulfillment processes.

removeFromReturn

Removes return and/or exchange lines from a return.

If the order has an existing
write-off,
calling this mutation can reduce the written-off amount automatically when it reduces the order total
before write-offs below the remaining written-off amount.

returnLineItemRemoveFromReturn

Removes return lines from a return.

If the order has an existing
write-off,
calling this mutation can reduce the written-off amount automatically when removing return lines also
removes restocking or return shipping fees and this reduces the order total before write-offs below
the remaining written-off amount.

Type Changes

➕ Added Types (3)

🏗️AutomationWorkflowRun➕ AddedOBJECT

A production or test run of an automation.

Fields: hasErrors, id, kind, lastUpdated, startedAt ... +4 more
📋AutomationWorkflowRunKind➕ AddedENUM

Whether an automation run is a production run or a test run.

Values: PRODUCTION, TEST
📋AutomationWorkflowRunStatus➕ AddedENUM

The lifecycle status of an automation run.

Values: IN_PROGRESS, THROTTLED, COMPLETED, FAILED, CANCELLED, TIMED_OUT

🔄 Modified Types (14)

🏗️InventoryBinSortKeys🔄 Modified
➕ Enum value added: IS_AVAILABLE_FOR_SALE
🏗️Location🔄 Modified
🔄 Field modified: inventoryBins
🏗️Order🔄 Modified
🔄 Field modified: customer
🏗️QuantityPriceBreakSortKeys🔄 Modified
➕ Enum value added: CREATED_AT
🏗️ShopPlan🔄 Modified
🔄 Field modified: publicDisplayName
🏗️StoreCreditAccountCreditTransaction🔄 Modified
➕ Field added: note

The merchant-only note associated with the transaction. Not visible to the customer.

🏗️StoreCreditAccountCreditUserErrorCode🔄 Modified
➕ Enum value added: NOTE_TOO_LONG
🏗️StoreCreditAccountDebitRevertTransaction🔄 Modified
➕ Field added: note

The merchant-only note associated with the transaction. Not visible to the customer.

🏗️StoreCreditAccountDebitTransaction🔄 Modified
➕ Field added: note

The merchant-only note associated with the transaction. Not visible to the customer.

🏗️StoreCreditAccountDebitUserErrorCode🔄 Modified
➕ Enum value added: NOTE_TOO_LONG
🏗️StoreCreditAccountExpirationTransaction🔄 Modified
➕ Field added: note

The merchant-only note associated with the transaction. Not visible to the customer.

🏗️StoreCreditAccountTransaction🔄 Modified
➕ Field added: note

The merchant-only note associated with the transaction. Not visible to the customer.

🏗️TaxSummaryCreateUserErrorCode🔄 Modified
➕ Enum value added: MISSING_ORDER_ID_OR_TIME_RANGE
➕ Enum value added: TIME_RANGE_TOO_LARGE
🏗️ValidationSortKeys🔄 Modified
➕ Enum value added: CREATED_AT