The internal ID for this record is shoppingcart. You can use the UI to create saved searches with data from the shopping cart. Go to Lists > Search > Saved Searches > New > Shopping cart.
The shopping cart record is scriptable in server SuiteScript only. The shopping cart record is not fully scriptable. Only search is permitted.
Script Samples
The following example uses the search.create(options) method to get shopping cart information. To get carts from a certain website (id:1) which contains a particular item (item id:352), use the following code sample:
var mySearch = search.create({
type: search.Type.SHOPPING_CART,
filters: [{
name: 'websiteid',
operator: search.Operator.EQUALTO,
values: '1'
}, {
name: 'itemid',
operator: search.Operator.EQUALTO,
values: '352'
}],
columns: [{
name: 'itemid'
}, {
name: 'itemqty'
}, {
name: 'websiteid'
}, {
name: 'customerid'
}]
});
mySearch.run().each(function(result){
var name = result.getValue({
name: 'fullurl'
});
var site = result.getValue({
name: 'addtohead'
});
var pageType = result.getValue({
name: 'subcataddtoheadoverride'
});
return true;
});