Skip to main content

ProductVariantStocksUpdate Object

Updates stocks for product variant.

Requires the MANAGE_PRODUCTSpermission.

Triggers the following webhook events:

  • PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock is updated.
  • PRODUCT_VARIANT_BACK_IN_STOCK (async): A product variant stock transitioned from no availability to available quantity.
  • PRODUCT_VARIANT_OUT_OF_STOCK (async): A product variant stock transitioned from available quantity to no availability.
  • PRODUCT_VARIANT_BACK_IN_STOCK_IN_CHANNEL (async): A product variant is back in stock in a channel (non click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

  • PRODUCT_VARIANT_OUT_OF_STOCK_IN_CHANNEL (async): A product variant is out of stock in a channel (non click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

  • PRODUCT_VARIANT_BACK_IN_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is back in stock in a channel (click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

  • PRODUCT_VARIANT_OUT_OF_STOCK_FOR_CLICK_AND_COLLECT (async): A product variant is out of stock in a channel (click-and-collect warehouses).

Note: Triggered only when the useLegacyShippingZoneStockAvailability shop setting is disabled.

type ProductVariantStocksUpdate {
productVariant: ProductVariant
bulkStockErrors: [BulkStockError!]! @deprecated
errors: [BulkStockError!]!
}

Fields

productVariant ● ProductVariant

Updated product variant.

errors ● [BulkStockError!]!

Show deprecatedHide deprecated

bulkStockErrors ● [BulkStockError!]!

DEPRECATED

Use errors field instead.

Returned By

productVariantStocksUpdate mutation