I am updating price of variants of products in bulk by creating jsonl file and uploading on shopify server and using this mutation
mutation {
bulkOperationRunMutation(
mutation: “mutation call($input: ProductVariantInput!) {productVariantUpdate(input: $input) {
productVariant {
id
last_submitted_price: price
}
userErrors {
field
message
}
}
}”,
stagedUploadPath: “#{key}”) {
bulkOperation {
id
url
status
}
userErrors {
message
field
}
}
}
But I also want to update inventoryQuantity in bulk using inventoryActivate graphql API in the same way as I submited price in bulk but I could not do that. i dont know where I am doing mistake. Please guide ma how can i do this in the same pattern which I am using
Hey @Tayyab_sheikh ,
We outline the BulkOperationsRunMutation (import) mutations that are available along with some other limitations; see doc here - import limitations. While the inventoryActivate mutation is not listed there, depending on the API version you are using it may be worth exploring and testing other approaches to inventory management.
For example, using the productVariantUpdate mutation, the inventoryItem input can help configure tracking and the inventoryQuantities input is used for setting the inventory level of a variant at a specified location. There is also an updated overview of inventory management workflows for apps that provide this sort of management.
I hope the above provides a few insights and resources for you to work with!
Cheers - @awwdam
Shopify Developer Support
Sorry but on doc is writtent
ProductVariantInput.inventoryQuantities
[InventoryLevelInput!]
The inventory quantities at each location where the variant is stocked. Used as input only to the productVariantCreate mutation.
You cannot set Quantities Level on ProductVariantUpdate
Exactly you can’t use it to update unfortunately. anyone found a solution?