Data->XML->Data
Conversion Application and Services

[ Login ]


Home
Back

Netsuite smbxml Queries

Information is exported from Netsuite by uploading a smbxml document configured as a query.  Below are several examples of smbxml query documents:

 

A Netsuite XML export is initiated by uploading a query file to Netsuite using the Transactions / Submit XML Document option.  The XML results file will then be available for download on the smbxml Imports status page after the file has been processed.  Click here for additional details on using XML in Netsuite

---------------

The Netsuite smbxml Developer's Guide is an excellent resource for an explanation of the Netsuite smbxml XML language.  It includes details on:

  • What information is available for upload and download via XML.
  • How to create smbxml queries.
  • Required elements in Netsuite smbxml documents.

You may access the Netsuite XML Developer's Guide from within your Netsuite account:

  • Open up the Support tab
  • Click the link for the smbxml Developer's Guide.

 

 

Download all inventoryItem records.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_15.dtd'>
<smbxml>
<request>
<query>
<listType>inventoryItem</listType>
</query>
</request>
</smbxml>

Would you like to edit and / or use this query file?  Right-click the link below and use the "Save Target As...." option to save it to your local computer:

listQuery-inventoryItems.xml

Download an inventoryItem record named "Test Inventory Item".

This is an advanced query - note the constraint element is used under the constraints element.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_15.dtd'>
<smbxml>
<request>
<query returnHandles="false">
<listType>inventoryItem</listType>
<constraints>
<constraint>
<name>name</name>
<operator>equals</operator>
<!--operators: equals, between, contains, greater than, less than, greater than or equal to, less than or equal to-->
<value>Test Inventory Item</value>
<!-- NOTE! Put your inventoryItem name (Item Name/Number) in the value element above -->
<!--Use the value2 element when needed i.e. for the operators such as "between" -->
<!--<value2>03/31/05</value2>-->
</constraint>
</constraints>
</query>
</request>
</smbxml>

Would you like to edit and / or use this query file?  Right-click the link below and use the "Save Target As...." option to save it to your local computer:

listQuery-inventoryItem_by_name.xml

Download all Customers

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_13.dtd'>
<smbxml>
<request>
<query>
<listType>customer</listType>
</query>
</request>
</smbxml>

Would you like to edit and / or use this query file?  Download it to your local computer:
Right-click here and use "Save Target as...." option

Download all Sales Orders

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_13.dtd'>
<smbxml>
<request>
<query>
<listType>salesOrder</listType>
</query>
</request>
</smbxml>

Would you like to edit and / or use this query file?  Download it to your local computer:
Right-click here and use "Save Target as...." option

Download All Tasks

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_15.dtd'>
<smbxml>
<request>
<query>
<preferences>
<preference>
<name>returnHandles</name>
<value>false</value>
</preference>
</preferences>
<listType>task</listType>
</query>
</request>
</smbxml>

Would you like to edit and / or use this query file?  Right-click the link below and use the "Save Target As...." option to save it to your local computer:

listQuery-task.xml

Download All Vendors

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_15.dtd'>
<smbxml>
<request>
<query>
<listType>vendor</listType>
</query>
</request>
</smbxml>

Would you like to edit and / or use this file?  Download it to your local computer:
Right-click here and use "Save Target as..." option

Download All Cases

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_15.dtd'>
<smbxml>
<request>
<query>
<listType>case</listType>
</query>
</request>
</smbxml>

Would you like to edit and / or use this file?  Right-click the link below and use the "Save Target As...." option to save it to your local computer:
listQuery-case.xml

Download the Netsuite smbxml Message element in order to retrieve the case related messages.  See below for a query for retrieving the message records.

Download All Messages

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM 'http://www.netsuite.com/xml/dtd/smb_4_15.dtd'>
<smbxml>
<request>
<query>
<listType>message</listType>
</query>
</request>
</smbxml>

Would you like to edit and / or use this file?  Right-click the link below and use the "Save Target As...." option to save it to your local computer:
listQuery-message.xml

Case-related messages will contain the element <caseNumberRef> as the foreign key to the parent case records.


Copyright © 2004,2005,2006,2007,2008   Stonehaven Technology. All rights reserverd.  Home ] Back ] Contact Us ] Policies ] About This Site ]