Difference between `inventoryAdjustQuantities` and `inventoryBulkAdjustQuantityAtLocation`?

Difference between `inventoryAdjustQuantities` and `inventoryBulkAdjustQuantityAtLocation`?

H36615
Visitor
1 0 1
inventoryAdjustQuantities
inventoryBulkAdjustQuantityAtLocation

What's the difference between these two? As far as I know, both of these can update multiple inventory items and their quantities (delta), take around the same time to complete the request, cost the same, have the same 250 items restriction.

Is there any reason I should use one instead of another from these two considering I have one location and thousands of items and variants of which inventories I need to update? What's the effect on the other operation having `bulk` in the name?

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 238 512

Hey @H36615 thanks for getting in touch. My understanding is that inventoryAdjustQuantities only allows you to update a single inventory item and its quantities. Would you be able to share the GraphQL mutation you are using that allows inventoryAdjustQuantities to update multiple items? I tried to test this on my end, but the way the argument is structured should throw back a type mismatch error if you try to include multiple items as the variable input. 

Hope to hear from you soon - let me know if we can clarify anything on our end. 

 

Al | Shopify Developer Support 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

lthomas1
Shopify Partner
30 0 5

Hello @ShopifyDevSup 

I am looking into the same, not sure why we have to use inventoryAdjustQuantities instead of inventoryBulkAdjustQuantityAtLocation if both does the same. 

mutation MyMutation {
  inventoryAdjustQuantities(
    input: {reason: "received", name: "available", changes: [
			{delta: 15, inventoryItemId: "gid://shopify/InventoryItem/{id}", locationId: "gid://shopify/Location/{id}"},
			{delta: -10, inventoryItemId: "gid://shopify/InventoryItem/{id}", locationId: "gid://shopify/Location/{id}"}
		
		]},
  ) {
    userErrors {
      field
      message
    }
		  
		    inventoryAdjustmentGroup {
      createdAt
      id
      changes {
        item {
          inventoryLevels(first: 100) {
            nodes {
              item {
                sku
              }
            }
          }
        }
      }
    }
  }
}

 

And I am not exactly sure how to get the response with quantity, SKU and barcode. I am getting same SKU twice in the inventoryLevels response.

 

Thanks,
Lily