Inventory Item

Inventory item records are used to track information about items for which you maintain a stock. For information about using this record in the UI, see Inventory Items.

Supported Operations

add | addList | delete | deleteList | get | getList | getSavedSearch | getSelectValue | search | update | updateList | upsert | upsertList

Note:

You can also use the asynchronous equivalents of SOAP web services list operations. For information about asynchronous operations, see SOAP Web Services Asynchronous Operations. For more information about request processing, see Synchronous Versus Asynchronous Request Processing.

Field Definitions

The SOAP Schema Browser includes definitions for all body fields, sublist fields, search filters, and search joins available to this record. For details, see the SOAP Schema Browser’s inventory item reference page.

Note:

For information on using the SOAP Schema Browser, see SOAP Schema Browser.

Usage Notes

Working with Inventory Items Sublists

The SOAP Schema Browser includes all sublists associated with the inventory item record. See the following information for usage notes regarding specific Inventory Item sublists. Usage notes are not provided for every sublist type.

InventoryItemLocations

To provide a locations list, the Multi-Location Inventory feature must be enabled at Setup > Company > Enable Features. Click the Items & Inventory subtab, and select the Multi-Location Inventory check box. Otherwise, single entries for each corresponding field can be entered in the regular record fields.

ItemVendorList

The Vendor sublist (ItemVendorList) on inventory items contains a schedule field that holds pricing schedule values. Note that when this field is set, it triggers a recalc on add and update operations.

Merchandise Hierarchy Sublist

This sublist is available if the Merchandise Hierarchy feature is enabled at Setup > Company > Setup Tasks > Enable Features, on the Items & Inventory subtab.

Getting Bin Details for Items

If the Bin Management feature is enabled, you can use ItemSearchAdvanced to get bin-related details about inventory items. The following code snippets illustrate a search that returns the quantity available per bin.

Accessing Inventory Detail Data

If the Advanced Bin / Numbered Inventory Management feature is enabled, inventory items that have Use Bins set to True include data from a new Inventory Detail subrecord. This subrecord includes quantity on hand and quantity available values per bin number.

If this feature is enabled, you must use the 2011.2 endpoint or later to access the newly supported subrecord and the most up to date bin fields for inventory items. You need to update any SOAP web services code from a previous endpoint that accesses these fields, to avoid errors or unexpected results.

For more details, see Updating SOAP Web Services Code When Advanced Bin / Numbered Inventory Management is Enabled.

Examples

Java

Note:

In this sample the variable “c” is a shortcut for the client that needs to communicate with NetSuite via SOAP web services

           public void AddInventoryItem() throws Exception {
        RecordRef TaxSchedule = new RecordRef();
        TaxSchedule.setInternalId("3");
        RecordRef BookDpt = new RecordRef();
        BookDpt.setInternalId("1");

        InventoryItem NewItem = new InventoryItem();
        NewItem.setItemId("New Book Delivery");
        NewItem.setTaxSchedule(TaxSchedule);
        NewItem.setDisplayName("J.K.R. Book");
        NewItem.setDepartment(BookDpt);
        c.addRecord(NewItem);
    } 

        

SOAP Request

           <soapenv:Body>  
         <add xmlns="urn:messages_2018_2.platform.webservices.netsuite.com">   
            <record xsi:type="ns7:InventoryItem" xmlns:ns7="urn:accounting_2018_2.lists.webservices.netsuite.com">    
               <ns7:taxSchedule internalId="3" xsi:type="ns8:RecordRef" xmlns:ns8="urn:core_2018_2.platform.webservices.netsuite.com"/>    
               <ns7:itemId xsi:type="xsd:string">Testing Second New Item WS</ns7:itemId>    
               <ns7:displayName xsi:type="xsd:string">J.K.R. Book</ns7:displayName>    
               <ns7:department internalId="1" xsi:type="ns9:RecordRef" xmlns:ns9="urn:core_2018_2.platform.webservices.netsuite.com"/>   
            </record>  
         </add> 
      </soapenv:Body> 

        

SOAP Response

            <soapenv:Body>
         <addResponse xmlns="urn:messages_2018_2.platform.webservices.netsuite.com">
            <writeResponse>
               <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2018_2.platform.webservices.netsuite.com">
                  <platformCore:statusDetail>
                     <platformCore:afterSubmitFailed>false</platformCore:afterSubmitFailed>
                  </platformCore:statusDetail>
               </platformCore:status>
               <baseRef internalId="244" type="inventoryItem" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2018_2.platform.webservices.netsuite.com"/>
            </writeResponse>
         </addResponse>
      </soapenv:Body> 

        
Note:

As of the 2013.1 endpoint, locationBinQuantityAvailable has a type of SearchColumnStringField. In earlier endpoints, it had a type of SearchColumnDoubleField.

Related Topics

Items
Usage Notes for Item Record Types
Working with Matrix Items in SOAP web services
Shared Field Definitions for Items
Item Search
How to Use the SOAP Web Services Records Help
SOAP Web Services Supported Records
SOAP Schema Browser
SuiteTalk SOAP Web Services Platform Overview

General Notices