Inventory: Sample Use Cases and Flows

This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping-off point as you plan your app's implementation.

Create Inventory Item in the Default Location

In this scenario, you want to add a new inventory item to the default location in your Wix store. This is useful when you have new stock arriving at to a warehouse which is defined as your default store location, and you need to update your inventory system. Read more about Locations.

To create an inventory item in a specific location call Create Inventory Item and provide the necessary details such as variantId, productId, and any other relevant information.

Create Inventory Item in Specific Location

In this scenario, you want to add a new inventory item to a specific location in your Wix store. This is useful when you have new stock arriving at a particular warehouse or store location, and need to update your inventory system accordingly. Read more about Locations.

To create an inventory item in a specific location:

  1. Call Query Stores Locations to identify the location where you want to update your stock.
  2. Call Create Inventory Item and provide the necessary details such as variantId, productId, and any other relevant information, and specify the location in the where this inventory item will be stored by including the locationId in your request.

Increment Inventory of a Variant in a Specific Location

When you receive additional stock for a specific variant of a product or when customer wants to return/refund an item, you need to update the inventory quantity in your system. This ensures that your stock levels are accurate and customers can see the correct availability.

To increment the inventory of a variant in a specific location:

  1. Identify the variant of the product whose inventory you want to increment. You will need the variantId for this step.
  2. Call Bulk Increment Inventory Items By Variant And Location and include the IncrementData.variantId and IncrementData.locationId to update the inventory quantity for the specified variant in a specific location.

Change Inventory Items Tracking Method to In Stock for a Specific Product

In this scenario, you want to change the inventory tracking method for a specific product to "In Stock". This is useful when you don't manage stock levels for products that are not physically stored or have continuous Inventory.

To change the inventory items tracking method to "In Stock" for a specific product:

  • Call Bulk Update Inventory Items By Filter endpoint to update the inventory item.
  • In the request body, set the inventoryItem.inStock field to true.
  • Include a filter with the product ID, for example, {"productId": "f54bc047-ea9d-4910-afa0-a9bea33af481"}.

Find all in-stock products available in a specific location

In this scenario, you want to retrieve a list of all products that are currently in stock at a specific location. This can be useful for managing inventory, ensuring stock levels are adequate, and making informed business decisions.

To find all in-stock products available in a specific location:

  1. Call Query Stores Locations to identify the location for which you want to check the stock. This ID is necessary to filter the inventory items by location.

  2. Call Search Inventory Items and include locationId and availabilityStatus in the filter parameter of your request to retrieve inventory items based on their availability status at a specific location :

Copy
1
  1. To get more info about the products call Search Products and include a list of productId retrieved from the previous call in the filter:
Copy
1
Was this helpful?
Yes
No