Inventory search

Leverage the advanced inventory search features in the inventory service that is available after V2 migration is completed. To ensure that all the inventory records are considered for the advanced search capability, re-synchronize the supply and demand to IV. If not done, the supply/demand search does not return accurate results.

Note:
  • Any inventory record created before the May 2023 release is not considered for search functionality. You can use the existing GET supply and GET demand API to search for older records.
  • If you are not activated to use the inventory search capability, contact IBM® Support to accelerate the activation.
  • There is a limit on the maximum number of item and node values that are allowed in the input for inventory search APIs.

While the inventory availability enables the fulfillment manager to realize the available to sell quantities, a fulfillment manager must understand the underlying inventory supplies and demands at a store location so that supplies can be reallocated based on demand change across selling channels.

Apart from the ability to locate specific supply items at a location, a need to categorize supply or demand is also important. For example, you can locate all supply by supply type of ONHAND so that the fulfillment manager can safely transfer the inventory without impacting other supply types.

In addition to locating a supply list, the decision of the fulfillment manager is influenced by the knowledge of aggregated inventory count for a target set of matching inventory records. For instance, the fulfillment manager might want to know:
  • The total ONHAND supply quantities at node1.
  • The supplies under product class refurbished.
  • The supplies that are available from the e-commerce supply segment.

Inventory Visibility provides a query-based inventory search to enable the fulfillment manager to obtain a paginated list of inventory records and an aggregate view of the records. The search supports both supply and demand inventory records.

The supply and demand search enhancements are broadly classified into two categories:
  • Search APIs
  • Aggregate APIs

Inventory search APIs

The inventory search provides a list of supply or demand records that fits the search criteria. The results are provided in a paginated format. In the search API request, you can build a query based on the following inventory attributes:

  1. Item identifier
  2. Ship node
  3. Type (supply and demand type)
  4. Product class
  5. Unit of measure
  6. Segment and segment type
  7. By distribution group

The distribution group search criteria enables an inventory lookup across all nodes under the network.

Inventory aggregate search APIs

The aggregate search provides an aggregated supply or demand quantity for each inventory type that fits the search criteria. The aggregate search supports the same query input criteria as the inventory search and queried by the distribution group.

For example, if there are five records of ITEM01 supplies:
  • Supply ONHAND 5qty
  • Supply ONHAND 10qty
  • Supply INTRANSIT 7qty
  • Supply PO_PLACED 20qty
  • Supply INTRANSIT 6qty
Then, the aggregate search for ITEM01 by type would yield:
  • ONHAND 15qty
  • INTRANSIT 13qty
  • PO_PLACED 20qty

Examples

Supply search
An example of the inventory search request if the fulfillment manager wants to locate a list of records for ITEM01, NODE01, and of type [ONHAND,PO_PLACED].
{
   "data":{
      "itemId":{
         "operator":"equals",
         "values":[
            "ITEM01"
         ]
      },
      "shipNode":{
         "operator":"equals",
         "values":[
            "NODE01"
         ]
      },
      "type":{
         "operator":"equals",
         "values":[
            "ONHAND",
            "PO_PLACED"
         ]
      }
   }
}
An example of a supply search response.
{
   "meta":{
      "pagination":{
         "nextPageToken":"0",
         "pageSize":20
      }
   },
   "data":[
      {
         "itemId":"ITEM01",
         "supplies":[
            {
               "type":"ONHAND",
               "shipNode":"NODE1",
               "eta":"1900-01-01T00:00:00Z",
               "shipByDate":"2500-01-01T00:00:00Z",
               "quantity":5
            },
            {
               "type":"PO_PLACED",
               "shipNode":"NODE1",
               "eta":"1900-01-01T00:00:00Z",
               "shipByDate":"2500-01-01T00:00:00Z",
               "quantity":5
            }
         ]
      }
   ]
}

For more information, see Search Supplies API.

Demand search
The demand search follows a similar pattern to the supply search APIs. In this example, the demand search request demonstrates the use of distributionGroupID to consider the records created by nodes under DG1 network. Then, the request input for demand search is DG1=[NODE1,NODE2].
{
   "data":{
      "itemId":{
         "operator":"equals",
         "values":[
            "ITEM01"
         ]
      },
      "type":{
         "operator":"equals",
         "values":[
            "OPEN_ORDER",
            "SCHEDULED"
         ]
      },
      "distributionGroupId":"DG1"
   }
}
An example of a demand search result.
{
   "meta":{
      "pagination":{
         "nextPageToken":"0",
         "pageSize":20
      }
   },
   "data":[
      {
         "itemId":"SKU1024",
         "demands":[
            {
               "type":"OPEN_ORDER",
               "shipNode":"NODE01",
               "shipDate":"2016-12-05T00:00:00Z",
               "cancelDate":"2500-01-01T00:00:00Z",
               "minShipByDate":"2500-01-01T00:00:00Z",
               "quantity":10
            },
            {
               "type":"OPEN_ORDER",
               "shipNode":"NODE02",
               "shipDate":"2016-12-05T00:00:00Z",
               "cancelDate":"2500-01-01T00:00:00Z",
               "minShipByDate":"2500-01-01T00:00:00Z",
               "quantity":5
            }
         ]
      }
   ]
}

For more information, see Search Demands API.

Supply aggregate search
An example of a supply aggregate request.
{
   "data":{
      "itemId":"ITEM01",
      "shipNode":{
         "operator":"equals",
         "values":[
            "NODE01"
         ]
      },
      "type":{
         "operator":"equals",
         "values":[
            "ONHAND",
            "PO_PLACED"
         ]
      }
   },
   "aggregations":{
      "field":"type"
   }
}
An example of a supply aggregate search result.
{
   "meta":{
      "pagination":{
         "nextPageToken":"string",
         "pageSize":20
      }
   },
   "data":[
      {
         "itemId":"ITEM01",
         "aggregations":[
            {
               "type":"string",
               "totalQuantity":10
            }
         ]
      }
   ]
}

For more information, see Search Aggregate Supplies API.

Demand aggregate search
An example of a demand aggregate request for DG1.
{
   "data":{
      "itemId":"ITEM01",
      "type":{
         "operator":"equals",
         "values":[
            "OPEN_ORDER",
            "SCHEDULED"
         ]
      },
      "distributionGroupId":"DG1"
   },
   "aggregations":{
      "field":"type"
   }
}
An example of a demand aggregate result.
{
   "meta":{
      "pagination":{
         "nextPageToken":"string",
         "pageSize":20
      }
   },
   "data":[
      {
         "itemId":"ITEM01",
         "unitOfMeasure":"EACH",
         "aggregations":[
            {
               "type":"string",
               "totalQuantity":15
            }
         ]
      }
   ]
}

For more information, see Search Aggregate Demands API.