This topic and discussion board has been closed.
To stay updated on announcements related to the API please review this post about the new Developer changelog.
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Hey all,
When creating a new ProductVariant, there are going to be some changes to the defaults when not specified.
The change to inventory_quantity is live, the change to inventory_management will come next week. Please respond with any comments or questions.
Cheers,
Shopify Apps Team
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Awesome, Ryan!
Thanks for this change, it's very valuable for Excelify customers!
Actually, I noticed that this change was already functioning a couple of days ago, or was I mistaken?
Around this topic there is one strangeness however - when setting the inventory quantity (also through levels), if inventory_management is not "shopify", API wouldn't allow to set the quantity. But in reality that quantity might be already set to something.
Some time ago API allowed to set the quantity regardless of what the inventory_management is, but now it can't.
So in Excelify app context - if the user exports all variants with their quantities, they can't just import them back, because in some cases API will tell that you can't set the inventory because you don't have the inventory_management set to "shopify". I am working around that issue but still, you might think about that aspect.
The biggest issues of all is that with new multi-level inventory it got so slow to create Products with Variants. Products which we could create earlier in 0.25 seconds, now take 6 seconds if there are many variants with inventory. No REST API, no GraphQL API can solve this so far - because in either case we need to run as many requests as there are variants. Any improvements in that area would be totally awesome.
Overall - can feel and appreciate improvements happening, thanks for those!
Maris
Excelify.io
Hi Maris,
The change to the default inventory_quantity is already in yes. The inventory_management will go live next week.
inventory_management can also be set to a fulfillment service, so it's not only able to be set as shopify.
I understand the frustration with with the new product creation, the unfortunate fact is that as the models get more complicated, it will likely slow down. However we are always working to speed things up on our end.
Cheers,
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Ryan -
Currently we create variants that don't have inventory levels (i.e. made on demand goods) with the inventory_management value set to an empty string in order to have them set to "Don't track inventory" - will that still be an option or is that going away? I don't see that called out in the docs as an option either. If it's still going to be an option what should we need to send as the value?
Thanks,
Matt
Hi Matt,
To maintain that behaviour you should be passing null as the inventory_management to be explicit that you do not want inventory tracked.
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Ryan -
Good deal - I'll make that adjustment - thanks!
- Matt
The change to inventory_management will be shipping early this week!
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi, Ryan! I need to update product quantity with API, how can I do it now? with previous request I get 422 error b'{"errors":{"base":["Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. Please use the Inventory Levels API."]}}'
Try this document: https://help.shopify.com/en/api/guides/updating-inventory
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Is there a way to set the inventory during creation of the product variant rather than having to make subsequent calls to the inventory APIs? Right now if we're creating a decent number of variants, we now have to double the calls to make them available. In addition, if we 're-upload' them.. essentially and update, the inventory gets zero'd out and we have to reset them all over again.
By the way, we are passing null (or not passing at all) inventory_management and it's still zeroing the inventory levels out and making the item unavailable.
You can set inventory upon product creation only by using the GraphQL Admin API. You cannot do this in REST any more unfortunately.
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Well.. fiddle. I'd love to understand how to basically make our items not-inventoried.. my only solve right now is to set the inventory to a rather gigantic number.
I've tried when creating the variant to set inventory_policy = "continue", but that doesn't seem to work either.. once inventory is zero, product is unavailable.
Hey George,
It should simply be "inventory_management": null to not track inventory on product create.
{
"product": {
"title": "Test product no inventory",
"inventory_management": null
}
}
The above works for me testing in Postman
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Documentation doesn't specify inventory_management as part of product creation. I'll give it a whirl!
It's not required, but you can specify such as above.
Cheers.
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Well, unfortunately, that didn't work.. here's snippet of the PUT that we're sending to
"/admin/products/" + shopifyProductId + ".json"
ShopifyProduct(id=1491154665551, title=New Product, handle=New Product, vendor=GearLaunch, fulfillment_service=GearLaunch, body_html=null, product_type=Apparel, inventory_management=null, variants=...
It resets the inventory levels to 0 and .. tadah, angry customers. Sigh.
I just tried a new product.. setting it from the start. Creating a new product works fine (always has actually). However as soon as we 'update' the product (resync with the PUT), even though inventory_management is still null, we get a 0 inventory and the item is out of stock.
If you provide a request-ID I can look into it. I do see products on that shop with inventory_management: null and no quantity created successfully.
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Yep.. again, creating them works fine. Updating (the PUT call to "/admin/products/" + shopifyProductId + ".json") is what seems to shoot us in the head.
you probably are trying to update the product instead of the product variant to "inventory_management": null
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022