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.
Below are then field on item record fields that correspond with fields exposed to field sets:
The following example, shows a query string that returns data from the Quantity Backordered field on the item record:
Json Response:
Thanks
Abhi
Download Netsuite Guru Android App
Follow Me on Linkedin
Our FB Page
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:
-
Go to Setup > SuiteCommerce Advanced > Setup Web Site.
-
Click the Field Sets subtab.
-
Enter a Name for the field set, for example: Qty Backordered.
-
Enter a Field Set ID, for example: qtybackordered.
-
Select Item for Record Type.
-
(Optional) Enter a description for the field set.
-
In the Field Set popup window, select from the item quantity fields identified in the table below.
-
Enter a Name for the field set, for example: Qty Backordered.
-
Click Save.
-
Use the field set in a query to the Item Search API.
| 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
Post a Comment
Thanks for you message, please join us on Facebook and Linkedin