HOWTO Filter listProducts Results On Inventory Stock Level
(Doc ID 2332458.1)
Last updated on NOVEMBER 23, 2019
Oracle Commerce Cloud Service - Version N/A and later Information in this document applies to any platform.
The project has a requirement is to only display products whose inventory is greater than 0. Data returned from a search navigation response offer childSkus.quantity in the viewmodel, but the listProducts REST endpoint does not include inventory details. Filtering products in widget code produces a bad customer experience because of pagination. Pagination operates based on the totalResults attribute which doesn't have access to inventory values. For example there might be totalResult = 144 but actually 123 products that are in stock i.e quantity > 0.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!