--- title: New changeFromQuantity field to manage inventory - Shopify developer changelog description: Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: https://shopify.dev/changelog/compare-and-swap-for-inventory-mutations-with-change-from-quantity md: https://shopify.dev/changelog/compare-and-swap-for-inventory-mutations-with-change-from-quantity.md --- [Back to Developer changelog](https://shopify.dev/changelog) December 12, 2025 Tags: * Admin GraphQL API * 2026-01 # New `changeFromQuantity` field to manage inventory This changelog relates to [concurrency protection features](https://shopify.dev/changelog/concurrency-protection-features). The following mutations now support the optional `changeFromQuantity` field: * [`inventoryAdjustQuantities`](https://shopify.dev/docs/api/admin-graphql/2026-01/mutations/inventoryAdjustQuantities): Available on the [`InventoryChangeInput`](https://shopify.dev/docs/api/admin-graphql/2026-01/input-objects/InventoryChangeInput) input type * [`inventoryMoveQuantities`](https://shopify.dev/docs/api/admin-graphql/2026-01/mutations/inventoryMoveQuantities): Available on the [`InventoryMoveQuantityTerminalInput`](https://shopify.dev/docs/api/admin-graphql/2026-01/input-objects/InventoryMoveQuantityTerminalInput) input type * [`inventorySetOnHandQuantities`](https://shopify.dev/docs/api/admin-graphql/2026-01/mutations/inventorySetOnHandQuantities): Available on the [`InventorySetQuantityInput`](https://shopify.dev/docs/api/admin-graphql/2026-01/input-objects/InventorySetQuantityInput) input type * [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/2026-01/mutations/productVariantsBulkUpdate): Available on the InventoryAdjustmentInput type, which is available on the `quantityAdjustments` field of the [`ProductVariantsBulkInput`](https://shopify.dev/docs/api/admin-graphql/2026-01/input-objects/ProductVariantsBulkInput) type > **Note**: The `quantityAdjustments` field of the `productVariantsBulkUpdate` mutation will only be public in version `2026-01`. ## How to use the field The `changeFromQuantity` field is useful to keep inventory data accurate, even if multiple updates are happening at the same time. If the actual quantity doesn't match the value you provide, the mutation will fail with a `CHANGE_FROM_QUANTITY_STALE` error, preventing unintended overwrites. In the following example, the adjustment only succeeds if the current available quantity is 50. If another process has modified the quantity in the meantime, you'll receive an error and can retry with the updated value. To opt-out of comparison checks you can explicitly pass in `null` to the `changeFromQuantity` field. ``` mutation { inventoryAdjustQuantities( input: { reason: "correction" name: "available" changes: [{ delta: 10 changeFromQuantity: 50 inventoryItemId: "gid://shopify/InventoryItem/123" locationId: "gid://shopify/Location/456" }] } ) { inventoryAdjustmentGroup { id } userErrors { code message } } } ``` For more information on compare and swap, and when you should opt out of comparison checks, refer to [our docs](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#compare-and-swap). We encourage users to avoid opting-out unless it's justified by their use case.