Shopify / shopify_python_api

ShopifyAPI library allows Python developers to programmatically access the admin section of stores
http://shopify.github.io/shopify_python_api
MIT License
1.23k stars 349 forks source link

Consultation of inventory levels other than on hand #728

Open sagudelo1200 opened 1 month ago

sagudelo1200 commented 1 month ago

Overview

I would like to request a new functionality for the Python API. It would be very useful to have a method on the InventoryLevel class that allows to query the inventory on hand, stock and committed inventory in a more direct way.

Type

Motivation

What inspired this feature request? What problems were you facing?

The context of this request is as follows: we have developed an integration between our inventory and invoicing software and our ecommerce on Shopify to keep inventory up to date using Python. However, we have encountered a problem that we need to solve.

Currently, if we have 20 units in our inventory and a sale of 5 units is made through Shopify, these 5 units are moved from available to committed. However, in our actual inventory (in our inventory system, Ofima) the 20 units are still recorded until we sync the order and perform invoicing, at which point the 5 units will be deducted. If there is a delay in invoicing and the inventory sync cron job is run, Shopify refreshes and redisplays 20 units, which does not reflect the actual inventory status.

Having a method to directly query the committed inventory would help maintain inventory accuracy between our systems and Shopify, avoiding inconsistencies and improving stock management.

Thank you for your attention and support 🤩.

SamirAlmeidaCodes commented 1 month ago

Very good feature recommendation.

So this feature will basically give you the option to query inventory in hand, committed, available and unavailable is that it?