How to Search Query for Returning Item Quantity in Netsuite Suite Commerce?

Hi All,

To get Quantity in Item Search in search result  then field sets are very important.
Create a field set that includes item quantity detail fields, and then use that field set in a query to the Item Search API.

To create a field set that includes item quantity information:

  1. Go to Setup > SuiteCommerce Advanced > Setup Web Site.
  2. Click the Field Sets subtab.
    1. Enter a Name for the field set, for example: Qty Backordered.
    2. Enter a Field Set ID, for example: qtybackordered.
    3. Select Item for Record Type.
    4. (Optional) Enter a description for the field set.
    5. In the Field Set popup window, select from the item quantity fields identified in the table below.
  3. Click Save.
  4. Use the field set in a query to the Item Search API.
 Below are then field on item record fields that correspond with fields exposed to field sets:
Field Label on the
Locations Subtab of the
Item Record
Field Set Field Name Field ID
Quantity Available Available (Detail) quantityavailable_detail
Quantity Backordered Back Ordered (Detail) quantitybackordered_detail
Quantity Committed Quantity Committed (Detail) quantitycommitted_detail
Quantity On Hand On Hand (Detail) quantityonhand_detail
Quantity On Order On Order (Detail) quantityonorder_detail



The following example, shows a query string that returns data from the Quantity Backordered field on the item record:

http://www.mywebstore.com/api/items?
pricelevel=5&fieldset=myfieldsetwithqtybackordered

Json Response:
items: [
{
      qtybackordered_detail:{
         qtybackordered:10
         locations:[
                     {
                        internalid:1,
                        qtybackordered:6
                     },
                     {
                        internalid:2,
                        qtybackordered:4
                     }
                     ]
                                 }
}
]

Thanks
Abhi

 Download Netsuite Guru Android App
Follow Me on Linkedin
Our FB Page

Comments