Inventory management apps provide merchants with various ways to manage their inventory. For example, an inventory management app might query and adjust inventory quantities on behalf of a merchant. This guide describes the inventory management lifecycle, provides use cases for inventory management apps, and offers some developer tools and resources to get you started. ## How it works Inventory is the set of items that a merchant tracks and uses to conduct their business. This can include items that are physically at a location and ready to be sold, items that are incoming to a merchant's location, and items that are set aside for holds or inspection. Merchants track inventory to avoid selling products that have run out of stock, and determine when they need to order or make more of a product. Apps and third-party logistics providers can automate the [inventory management process](/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states) by querying and adjusting inventory quantities on behalf of merchants. The following diagram shows some of the inventory management activities that an app or third-party logistics provider can perform in the context of an order lifecycle: <figure class="figure"><img src="https://cdn.shopify.com/shopifycloud/shopify_dev/assets/apps/fulfillments/inventory-management-apps/lifecycle-62e51d415216a65f68c543428bf8ca9f5ee8dc856119c543f77936850dceb7e9.png" class="lazyload" alt="A diagram showing some of the inventory management activities that an app or third-party logistics provider can perform in the context of an order cycle." width="100%" height="1248"></figure> - **Customers** place and receive orders that contain product variants. - **Shopify** decrements the available inventory quantity for product variants that are included in an order, and increments the committed inventory quantity for the order. After the order is fulfilled, Shopify decrements the committed inventory quantity. - **Apps or third-party logistics providers** automate the inventory management process by querying inventory quantities at one or more locations, managing inventory quantities, and moving inventory quantities between states. - **Merchants or third-party fulfillment services** track inventory in the Shopify admin and fulfill orders. ## Inventory states An inventory state represents the quantities of a product at a specific location or quantities that have been committed to orders. Inventory is grouped into different states: <figure class="figure"><img src="https://cdn.shopify.com/shopifycloud/shopify_dev/assets/apps/fulfillments/inventory-management-apps/states-questions-f81184ebfede355ee9094cebd0bdd163d2f184919b8c2bcef5dd4f898d309ec0.png" class="lazyload" alt="The relationships between inventory states and the questions each state answers." width="100%" height="1954"></figure> | Inventory state | Description | | --- | --- | | `incoming` | The inventory that’s on its way to a merchant's location. For example, the inventory might be in an incoming shipment. Incoming inventory isn’t available to sell until it has been received and its state has been changed to `available`. <br></br>The `incoming` state is the only state that represents quantities that aren't physically present at a location. Incoming inventory is surfaced at its destination location. | | `on_hand` | The total number of units that are physically at a location. <br></br>The `on_hand` state equals the sum of inventory quantities that are in the `available`, `committed`, `reserved`, `damaged`, `safety_stock`, and `quality_control` states. | | `available` | The inventory that a merchant can sell. Available inventory isn’t committed to any orders and isn’t part of incoming transfers. | | `committed` | The number of units that are part of a placed order but aren't fulfilled. When a draft order is created, the inventory isn't committed until the draft order is completed and an order is created. | | `reserved` | The on-hand units that are temporarily set aside. For example, a merchant might want to set on-hand units aside for holds or inspection. <br></br>Inventory quantities in a `reserved` state display as **Unavailable** to merchants that are tracking inventory in the Shopify admin. When a draft order is created, merchants can optionally [reserve the units for a limited period of time](https://help.shopify.com/en/manual/fulfillment/managing-orders/create-orders/create-draft#reserve-items). | | `damaged` | The on-hand units that aren't sellable or usable due to damage. <br></br>Inventory quantities in a `damaged` state display as **Unavailable** to merchants that are tracking inventory in the Shopify admin. | | `safety_stock` | The on-hand units that are set aside to help guard against overselling. <br></br>Inventory quantities in a `safety_stock` state display as **Unavailable** to merchants that are tracking inventory in the Shopify admin. | | `quality_control` | The on-hand units that aren't sellable because they're currently in inspection for quality purposes. <br></br> Inventory quantities in a `quality_control` state display as **Unavailable** to merchants that are tracking inventory in the Shopify admin. | > Note: > The `incoming`, `available`, `committed`, `reserved`, `damaged`, `safety_stock`, and `quality_control` states are mutually exclusive. ### GraphQL queries and mutations The following diagram shows the relationships between inventory states and the GraphQL Admin API query or mutation that's executed: <figure class="figure"><img src="https://cdn.shopify.com/shopifycloud/shopify_dev/assets/apps/fulfillments/inventory-management-apps/states-queries-mutations-cb40dcc9754f5728d1f5be51ba5b865d13626f9e0e73d4c981c4fa4a7629eae2.png" class="lazyload" alt="The relationships between inventory states and GraphQL Admin API queries and mutations." width="100%" height="2444"></figure> - The [`inventoryLevel`](/docs/api/admin-graphql/latest/queries/inventoryLevel) and [`inventoryItem`](/docs/api/admin-graphql/latest/queries/inventoryItem) queries retrieve inventory quantities in the `incoming`, `on_hand`, `available`, `committed`, `reserved`, `damaged`, `safety_stock`, and `quality_control` states. - The [`inventoryAdjustQuantities`](/docs/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) mutation adjusts the inventory quantity for a given product, state, or location combination by the given delta. For example, if the previous inventory count in the `available` state is 100, and you want to change it to 102, then the given delta (difference) is 2. - The [`inventorySetQuantities`](/docs/api/admin-graphql/latest/mutations/inventorySetQuantities) mutation explicitly sets the quantity of inventory in the `on_hand` or `available` state to the given value. - The [inventoryMoveQuantities](/docs/api/admin-graphql/latest/mutations/inventoryMoveQuantities) mutation moves a quantity of inventory between the `available` state and the `reserved`, `damaged`, `safety_stock`, and `quality_control` states, or between unavailable states (`reserved`, `damaged`, `safety_stock`, and `quality_control`). For example, 100 units of inventory can be moved from the `reserved` state to the `available` state. ## Use cases Common use cases for managing inventory include the following: - Manage what customers can purchase on the merchant's sales channels - Organize and manage goods throughout the supply chain - Determine when to make a purchase order to increase product quantities - Centralize inventory and order data so that merchants can sell across multiple online and offline channels, and use multiple warehouses ## Webhooks Your app can subscribe to the following inventory-related webhooks. For more information on webhook payloads, refer to the [`InventoryItem`](/docs/api/admin-graphql/latest/objects/InventoryItem) and [`InventoryLevel`](/docs/api/admin-graphql/latest/objects/InventoryLevel) reference topics. > Note: > Changes to `committed`, `reserved`, `damaged`, `safety_stock`, and `quality_control` inventory states don't trigger webhooks. <table> <tr> <th>Webhook topic</th> <th>Description</th> </tr> <tr> <td><code>inventory_items/create</code></li></td> <td>Occurs when an inventory item is created.</td> </tr> <tr> <td><code>inventory_items/update</code></td> <td>Occurs when an inventory item is updated.</td> </tr> <tr> <td><code>inventory_items/delete</code></td> <td>Occurs when an inventory item is deleted.</td> </tr> <tr> <td><code>inventory_levels/connect</code></td> <td>Occurs when an inventory level is connected.</td> </tr> <tr> <td><code>inventory_levels/disconnect</code></td> <td>Occurs when an inventory level is disconnected.</td> </tr> <tr> <td><code>inventory_levels/update</code></td> <td>Occurs when an inventory level is updated.</td> </tr> </table> ## Developer tools and resources Explore the following developer tools and resources to learn more about managing inventory. <div class="resource-card-grid"> <div> <a class="resource-card" href="/docs/api/admin-graphql/latest/objects/InventoryLevel" data-theme-mode=""> <div class="resource-card__indicator-container"><img src="/assets/resource-cards/graphql" data-alt-src="/assets/resource-cards/graphql-dark" aria-hidden="true" class="resource-card__icon themed-image"></div> <h3 class="resource-card__title"> InventoryLevel object </h3> <p class="resource-card__description">Consult the GraphQL Admin API reference to learn more about the InventoryLevel object.</p> </a> </div></p> <p><div> <a class="resource-card" href="/docs/api/admin-graphql/latest/objects/InventoryItem" data-theme-mode=""> <div class="resource-card__indicator-container"><img src="/assets/resource-cards/graphql" data-alt-src="/assets/resource-cards/graphql-dark" aria-hidden="true" class="resource-card__icon themed-image"></div> <h3 class="resource-card__title"> InventoryItem object </h3> <p class="resource-card__description">Consult the GraphQL Admin API reference to learn more about the InventoryItem object.</p> </a> </div> </div> ## Limitations You can't use the Admin API to adjust or move inventory quantities in the `committed` state. Inventory quantities in the `committed` state are only affected by the creation and fulfillment of a merchant's orders. ## Next steps - Learn how to [sync and maintain accurate inventory quantities, and transition products to different inventory states](/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states).