<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM "http://www.netsuite.com/xml/dtd/smb_4_06.dtd">
<!--
smbXML Inventory Item Record Import Example

Before attempting to import any example smbXML documents, NetSuite strongly suggests you read the smbXML Developer's Guide. This guide can be found on the NetSuite Web site at Partners > Developer Program > Technical Documentation. The Developer's Guide explains how to construct smbXML documents.

The Document Type Definition (DTD) defines the format used for smbXML documents imported into your NetSuite account. These documents can contain additions, updates and queries of NetSuite records and transactions. The DTD specifies required fields, field order and XML element and attribute structures. The DTD is your guideline for creating smbXML documents. The current DTD can be found on NetSuite's Web site at Partners > Developer Program > Technical Documentation.

This sample file provides a complete inventory item record import example, including mandatory and optional inventory item elements. An inventory item record import contains several references to objects that must already exist in your NetSuite account. Any objects referenced in this example that are available for import with smbXML are created prior to the example. This is necessary for the import to be successful.

Any referenced objects that cannot be created with smbXML must be created using the NetSuite user interface (UI) prior to importing the example. These situations are noted as they occur and instructions for creating the objects in the UI are included.-->

<!--
NetSuite IPR Software Notice
Copyright (c) 2000-2003 NetSuite, Inc. All Rights Reserved.-->

<smbxml missingFieldOverwrite="false">
	<!--The smbxml element may have multiple request elements.

Setting the missingFieldOverwrite attribute to false tells NetSuite to ignore missing elements on import and not to alter information in fields not included in the imported file. If this attribute is set to true, any elements not included in your smbXML file will be erased upon import. Setting the missingFieldOverwrite attribute at the smbxml element level applies the setting to the entire import. This attribute can be overridden at the request element level. Detailed information on this attribute is provided in the smbXML Developer's Guide.-->
	<!--Multiple request elements are allowed in a single smbXML document. Each request may only have one add, addOrUpdate or query command. Each command may only have one record.-->
	<request>
		<!--Add an inventory item to be referenced as a parent on this item record.-->
		<addOrUpdate>
			<!--An addOrUpdate request looks for the existence of an object (in this case, an inventory item) matching the handle or ID of the object being added. If it finds a match the information is updated for the existing object. If there is no match, a new object is created. We want to make certain the inventory item record exists in the system prior to referencing it on this item record. If the referenced record does not exist prior to the import of the item record, the record will fail to import. 

The following example represents a very minimal import for an inventory item record, but it is enough to allow us to import the record below. Inventory item records may also be created through the UI at Lists > Items > New > Inventory Item. For a complete example of an inventory item record import, see the example below.-->
			<inventoryItem handle="INVT1325">
				<name>Blank Media</name>
			</inventoryItem>
		</addOrUpdate>
	</request>
	<!--Add an account record to be referenced on this item record. -->
	<request>
		<addOrUpdate>
			<account handle="COGS4">
				<accountTypeRef>
					<name>Cost of Goods Sold</name>
				</accountTypeRef>
				<name>COGS</name>
			</account>
		</addOrUpdate>
	</request>
	<!--Add another account record to be referenced on this item record.-->
	<request>
		<addOrUpdate>
			<account handle="INCM05">
				<accountTypeRef>
					<name>Income</name>
				</accountTypeRef>
				<name>Blank Media Sales</name>
			</account>
		</addOrUpdate>
	</request>
	<!--Add another account record to be referenced on this item record.-->
	<request>
		<addOrUpdate>
			<account handle="ASST06">
				<accountTypeRef>
					<name>Other Asset</name>
				</accountTypeRef>
				<name>Blank Media Asset</name>
			</account>
		</addOrUpdate>
	</request>
	<!--Add a vendor record to be referenced on this item record. For a complete example of a vendor record import, see the smbXML Vendor Record Example.-->
	<request>
		<addOrUpdate>
			<vendor handle="VEND1212">
				<entityId>American Media</entityId>
			</vendor>
		</addOrUpdate>
	</request>
	<!--The following two records only apply if you use the Web Site or Store features. These features can be enabled at Setup > Enable Features > Web Site.

Add a store category to be referenced on this item record.
	<request>
		<addOrUpdate>
			<storeCategory handle="CAT1565">
				<name>Peripherals</name>
				<parentRef>
					<name>Catalog</name>
				</parentRef>
			</storeCategory>
		</addOrUpdate>
	</request>
Add another store category.
	<request>
		<addOrUpdate>
			<storeCategory handle="CAT4786">
				<name>Drives and Storage Media</name>
				<parentRef>
					<parentName>Catalog</parentName>
					<name>Peripherals</name>
				</parentRef>
			</storeCategory>
		</addOrUpdate>
	</request> -->
	<!--Add an inventory item record.-->
	<!--Below is a list of the mandatory and optional references used in an inventory item record import. This list also includes information about where the objects being referenced may be created.

	Mandatory References:
		-	parentRef							created in the UI or via smbXML  (Parent references are only 														mandatory if the record is a child of another record.)
		
	Optional References:
		-	cogsAccountRef					created in the UI or via smbXML
		-	incomeAccountRef				created in the UI or via smbXML
		-	assetAccountRef					created in the UI or via smbXML
		-	vendorRef							created in the UI or via smbXML
		-	weightUnitRef						standard measurements, cannot be created
		-	storeCategoryRef				created in the UI only
		-	storeDisplayThumbnailRef	created in the UI only
		-	storeDisplayImageRef			created in the UI only
		-	priceLevelRef						created in the UI only
		-	locationRef							created in the UI only
		
Note that for each of these references, where allowed, we have chosen to use handle references. Handle references are more precise and easier to use.-->
	<request>
		<addOrUpdate>
			<!--We use an addOrUpdate command here to indicate that if an inventory item record already exists for this item, the information should be updated. If a record does not exist, a new record will be created.-->
			<inventoryItem handle="INVT1444">
				<!--The inventoryItem element is used to indicate the object you are adding or updating with this request.  You can use the handle attribute to create a handle for your item record with the inventoryItem element. Creating this handle allows you to reference this item in other smbXML documents using handle references.-->
				<name>CD-R 100-pack</name>
				<!--The name element is your company's name for this item. This element is required and the information populates the Item Name/Number field on inventory item records. This field has a maximum length of 60 characters.-->
				<displayName>CD-R 100-pack Bundle</displayName>
				<!--The displayName element is a place to record an additional name for this item. This element is not required and the information populates the Display Name/Code field on item records. If you enter a display name, it will print in the Item column on sales transactions. This field has a maximum length of 60 characters. -->
				<vendorName>CDRW0000-100</vendorName>
				<!--The vendorName element is used to record the name your vendor uses for this item. This element is not required and the information entered populates the Vendor Name/Code field on item records. If you enter a vendor name, it will print on purchase transactions. This field has a maximum length of 30 characters. -->
				<parentHandle handle="INVT1325"/>
				<!--The parentHandle element is a reference to an existing item record. This particular item was created at the beginning of this example. Inventory item records can also be created in the UI at Lists > Items > New > Inventory Items. You can also use a name reference to include parent items. If this item record is a child of existing items, you must include a parentRef or parentHandle for each parent record. If any of the parent records were created in the UI, a name reference must be used unless the parent handles can be determined with a query.

To use name references for parent records, enter the following elements:
				<parentRef>
					<parentName>Storage</parentName>
					<parentName>Removable</parentName>
					<name>Blank Media</name>
				</parentRef>

The top-level parent record is listed first and each level is listed in descending order. These parent records must exist in NetSuite prior to importing your file and the name references must match the record names identically.

With handle references, you do not have to include each level of the parent hierarchy, only the immediate parent handle.-->
				<!-- If you use NetSuite's Web Site feature, you can choose to display this item in your Web site. The Web Site feature is only available in NetSuite and Oracle Small Business Suite. To enable the Web Site feature, go to Setup > Enable Features > Web Site. Check the Web Site box and click Save.

To include this item in your Web site, enter the following element:
				<isOnline>true</isOnline> 
The isOnline element is not required and the information populates the Display in Web Site field on item records. Because this field is a check box and records a true or false value, you must enter either true or false for this element. If this element is not included, the field defaults to false. -->
				<purchaseDescription>80 minute 700 MB CD-R, Pack of 100</purchaseDescription>
				<!--The purchaseDescription element is used to record a description for this item that appears on your purchase transactions. This element is not required and the information entered populates the Purchase Description field of item records. This field has a maximum length of 999 characters. You may use the new line string &#xD; to separate lines. -->
				<cost>9.95</cost>
				<!--The cost element is used to record the price you pay for this inventory item. The cost element is not required and the information entered populates the Purchase Price field on item records. The purchase price is used to calculate the total value of your stock of this inventory item. The information entered in this field must be a currency amount up to 9,999,999,999.99. -->
				<cogsAccountRef>
					<name>COGS</name>
				</cogsAccountRef>
				<!--The cogsAccountRef is used to reference a costs of goods sold account for this item. This particular account was created at the beginning of this example. You can also create COGS accounts through the UI at Lists > Accounts > New. This element is not required and the information entered populates the COGS Account field on item records. COGS accounts must be referenced with name references. If the account you reference is a child of other accounts, you must also include the parent accounts in your name reference.

If you do not include a COGS account reference, your default COGS account will populate this field. You can set a default COGS account at Setup > Set Up Accounting > Accounts. -->
				<vendorHandle handle="VEND1212"/>
				<!--The vendorHandle element is a reference to a vendor record that already exists in NetSuite. This particular vendor record was created at the beginning of this example. Vendor records can also be created in the UI at Lists > Vendors > New. This element is not required and the information populates the Preferred Vendor field on item records.

You can also use a name reference to include this vendor record. If the vendor record was created in the UI, a name reference must be used unless the vendor handle can be determined with a query.

To use name references for vendor records, enter the following elements:
				<vendorRef>
					<name>American Media</name>
				</vendorRef> -->
				<salesDescription>80 minute 700 MB CD-R, Pack of 100</salesDescription>
				<!--The salesDescription element is used to record a description for this item that appears on your sales transactions. This element is not required and the information entered populates the Sales Description field of item records. This field has a maximum length of 999 characters. You may use the new line string &#xD; to separate lines. -->
				<incomeAccountRef>
					<name>Blank Media Sales</name>
				</incomeAccountRef>
				<!--The incomeAccountRef is used to reference an income account for this item. This particular account was created at the beginning of this example. You can also create income accounts through the UI at Lists > Accounts > New. This element is not required and the information entered populates the Income Account field on item records. Income accounts must be referenced with name references. If the account you reference is a child of other accounts, you must also include the parent accounts in your name reference.

If you do not include an income account reference, your default income account will populate this field. You can set a default income account at Setup > Set Up Accounting > Accounts. -->
				<salesPrice>26.95</salesPrice>
				<!--The salesPrice element is used to record the price you sell this item for. This element is not required and the information entered populates the Sales Price field. The information entered in this field must be a currency amount up to 9,999,999,999.99. 

If you use Multiple Prices, the salesPrice element will only set the base price level of your item. You can include a list of price levels with your import. To include a list of item prices, you must include a name reference to each price level. The price levels must exist in NetSuite prior to the import. You can create new price levels in the UI at Lists > Other Lists > New > Price Level.

To include a price list if you use Multiple Prices, enter the following elements:
				<itemPriceList>
					<itemPriceLine>
						<itemPriceTypeRef>
							<name>Base Price</name>
						</itemPriceTypeRef>
						<itemPrice>25.95</itemPrice>
					</itemPriceLine>
					<itemPriceLine>
						<itemPriceTypeRef>
							<name>Alternate Price 1</name>
						</itemPriceTypeRef>
						<itemPrice>35.25</itemPrice>
					</itemPriceLine>
				</itemPriceList>
				
If you also use Multiple Currencies, you can include currency references for each price level.
				<itemPriceList>
					<itemPriceLine>
						<itemPriceTypeRef>
							<name>Base Price</name>
						</itemPriceTypeRef>
						<currencyRef>
							<name>U.S. dollar</name>
						</currencyRef>
						<itemPrice>25.95</itemPrice>
					</itemPriceLine>
					<itemPriceLine>
						<itemPriceTypeRef>
							<name>Alternate Price 1</name>
						</itemPriceTypeRef>
						<currencyRef>
							<name>British pound</name>
						</currencyRef>
						<itemPrice>35.25</itemPrice>
					</itemPriceLine>
				</itemPriceList>
				
The currency records must also exist in NetSuite prior to the file import. You can create new currency records at Lists > Currencies > New.  Multiple Currencies is available in NetSuite and NetSuite Advanced Accounting.

smbXML does not currently support price lists for multiple currencies only. If you use Multiple Currencies without Multiple Prices, you can import a sales price using the salesPrice element for your default currency. Any other currency prices must be entered manually through the UI. -->
				<assetAccountRef>
					<name>Blank Media Asset</name>
				</assetAccountRef>
				<!--The assetAccountRef is used to reference an asset account for this item. This particular account was created at the beginning of this example. You can also create asset accounts through the UI at Lists > Accounts > New. This element is not required and the information entered populates the Asset Account field on item records. Handle references are not currently available for accounts.  Asset accounts must be referenced with name references. If the account you reference is a child of other accounts, you must also include the parent accounts in your name reference.

If you do not include an asset account reference, your default asset account will populate this field. You can set a default asset account at Setup > Set Up Accounting > Accounts. -->
				<!--If you use Multi-Location Inventory, you must import a location list with the quantity on hand and reorder point for each location. You can enable Multi-Location Inventory at Setup > Enable Features > Accounting.  Multi-Location Inventory is available in NetSuite, Oracle Small Business Suite and NetSuite Advanced Accounting.

To import a locations list, enter the following elements:
				<itemLocationList>
					<itemLocationLine>
						<locationRef>
							<name>Warehouse 1</name>
						</locationRef>
						<quantityOnHand>50</quantityOnHand>
						<reorderPoint>10</reorderPoint>
					</itemLocationLine>
					<itemLocationLine>
						<locationRef>
							<name>Warehouse 2</name>
						</locationRef>
						<quantityOnHand>75</quantityOnHand>
						<reorderPoint>10</reorderPoint>
					</itemLocationLine>
				</itemLocationList>

As with any reference, the location records must exist in NetSuite prior to your file import. Location records can only be created through the UI. You can create new location records at Lists > Locations > New.-->
				<totalValue>1990</totalValue>
				<!--The totalValue element is used to record a total value for your entire stock of this inventory item. This element is not required and the information entered populates the Total Value field on item records. The information entered in this field must be a currency amount up to 9,999,999,999.99. You can only enter a total value when creating a new inventory item record. For existing records, NetSuite calculates the total value automatically depending on the quantity on hand and the purchase price. -->
				<quantityOnHand>200</quantityOnHand>
				<!--The quantityOnHand element is used to enter your initial stock of this inventory item. This element is not required and the information entered populates the Quantity On Hand field on item records. The information entered in this field must be a positive integer. This element is only used when Multi-Location Inventory is not enabled. If you use Multi-Location Inventory, you must use the itemLocationList elements explained above. The quantity on hand can only be manually set when creating a new inventory item record. For existing records, stock is replenished by issuing and processing purchase orders. -->
				<reorderPoint>25</reorderPoint>
				<!--The reorderPoint element is used to set a reorder point for this item. This element is not required and the information entered populates the Reorder Point field on item records. The reorder point entered is used to remind you when the stock of this item needs to be replenished. The information entered in this field must be a positive integer. This element is only used when Multi-Location Inventory is not enabled. If you use Multi-Location Inventory, you must use the itemLocationList elements explained above.  -->
				<shippingCost>3.95</shippingCost>
				<!--The shippingCost element is used to set a per-item shipping cost for this item. This element is not required and the information entered populates the Shipping Cost field on item records. The information entered in this field must be a currency amount up to 9,999,999,999.99. To use the shipping cost entered, you must also create a shipping item for per-item shipping costs. You can create a new shipping item at Lists > Shipping Items > New. -->
				<weight>16.5</weight>
				<!--The weight element is used to enter a shipping weight for this item. This element is not required and the information entered populates the Item weight field on item records. The information entered in this field must be a positive integer. To charge shipping by weight, you must also create a shipping item for weight. You can create new shipping items at Lists > Shipping Items > New. -->
				<weightUnitRef>
					<name>oz</name>
				</weightUnitRef>
				<!--The weightUnitRef element is used to indicate the unit measure of the weight entered in the Item weight field. This element is not required and the information entered populates the Item weight field. If you do not include a unit of measure, the default value is pounds. The information entered in this field must be one of the available choices below:
	-  lb for pounds
	-  oz for ounces
	-  kg for kilograms
	-  g for grams
You must only enter the abbreviation for the unit of measure. -->
				<isTaxable>true</isTaxable>
				<!--The isTaxable element is used to indicate if sales tax is charged on this item. This element is not required and the information populates the Taxable field on item records. Because this field is a check box and records a true or false value, you must enter either true or false for this element. -->
				<isInactive>false</isInactive>
				<!--The isInactive element is used to indicate if an item is inactive. This element is not required and the information populates the Item is Inactive field on item records. Because this field is a check box and records a true or false value, you must enter either true or false for this element. If you choose to enter true for this element, the item record is inactive. The record will not appear in lists or be available on transactions. -->
				<!-- If you use Customer Support and Service, you can indicate if this item is available for customer support.

				<offerSupport>true</offerSupport> 
The offerSupport element is not required and the information entered populates the Offer Support field on item records. Because this field is a check box and records a true or false value, you must enter either true or false for this element. If you enter true, this item appears in the Item field on case records. -->
				<!--The following elements only apply if you use the Web Site or Store features. These features can be enabled at Setup > Enable Features > Web Site.
				
				<storeDisplayName>CD-R 100 Bundle</storeDisplayName>
The storeDisplayName element is used to enter a display name for this item that appears in your Web store. This element is not required and the information entered populates the Store Display Name field on item records. If you do not enter a store display name, the name entered in the Item Name/Number field appears in your Web store. The store display name can be a maximum of 40 characters.
				<storeCategoryList>
The storeCategoryList element is used to indicate the beginning of a category list for this item. This element is only required if you are including a category list.
					<storeCategoryRef>
						<parentName>Catalog</parentName>
						<parentName>Peripherals</parentName>
						<name>Drives and Storage Media</name>
					</storeCategoryRef>
The storeCategoryRef elements are references to Web store categories that already exist in NetSuite. Store categories can only be created in the UI at Lists > Categories > New. 

When referencing categories, you must include the entire hierarchy. The top-level parent record is listed first and each level is listed in descending order. These parent records must also exist in NetSuite prior to importing your file and the name references must match the record names identically. 
				</storeCategoryList>
				<storeDescription>80 minute 700 MB CD-R, Pack of 100</storeDescription>
The storeDescription element is used to enter a brief description of this item to appear under the item name in your Web store or site. This element is not required and the information entered populates the Store Description field of item records. You can enter up to 999 characters in this field.
				<storeDisplayThumbnailRef>
					<name>cd08.jpg</name>
				</storeDisplayThumbnailRef>
The storeDisplayThumnailRef element is used to reference an image file to appear in your Web store or site. This element is not required and the information populates the Item Display Thumbnail field. The image referenced appears next to the item listing in you Web site or store. The image being referenced must exist in NetSuite prior to importing this file. To add an image to NetSuite, you must upload that image into your NetSuite File Cabinet. You can upload images at Lists > File Cabinet.
				<storeDetailedDescription>80 minute 700 MB CD-R, Pack of 100&#xD;Includes cases!</storeDetailedDescription>
The storeDetailedDescription element is used to enter a detailed description of this item to appear when the item name is clicked in your Web store or site. This element is not required and the information entered populates the Detailed Description field of item records. You can enter up to 4000 characters in this field. You may use the new line string &#xD; to separate lines.
				<storeDisplayImageRef>
					<name>cd08a.jpg</name>
				</storeDisplayImageRef>
The storeDisplayImageRef element is used to reference an image file to appear in your Web store or site. This element is not required and the information populates the Item Display Image field. The image referenced appears when the item name is clicked. The image being referenced must exist in NetSuite prior to importing this file. To add an image to NetSuite, you must upload that image into your NetSuite File Cabinet. You can upload images at Lists > File Cabinet.
				<onSpecial>false</onSpecial>
The onSpecial element is used to indicate that this item is on special and it appears in the Specials category in your store or site. This element is not required and the information entered populates the On Special field on item records. Because this field is a check box and records a true or false value, you must enter either true or false for this element.
				<specialsDescription>On Sale!  Free Shipping!</specialsDescription>
The specialsDescription element is used to enter a description for this item that appears when the item is on special. This element is not required and the information entered populates the Specials Description field on item records. You can enter up to 4000 characters in this field. You may use the new line string &#xD; to separate lines.
				<isFeatured>false</isFeatured>
The isFeatured element is used to indicate that this item is a featured item and it appears on the Welcome page in your store or site. This element is not required and the information entered populates the Featured Item field on item records. Because this field is a check box and records a true or false value, you must enter either true or false for this element.
				<featuredDescription>Buy 3, get one FREE!</featuredDescription> 
The featuredDescription element is used to enter a description for this item that appears when the item is featured on the Welcome page. This element is not required and the information entered populates the Featured Description field on item records. You can enter up to 4000 characters in this field. You may use the new line string &#xD; to separate lines. -->
			</inventoryItem>
		</addOrUpdate>
	</request>
</smbxml>
<!--
	To import an XML file:
	1.  Click the Transactions tab.
	2.  On the Transactions tab, under the Other heading, click Submit XML Document.
	3.  Click Browse.
	4.  Locate your smbXML field and select it.
	5.  Click Submit. 
	
	You will see a status bar with the import progress.  Once the import is complete, a message appears below the status bar indicating if there are any errors.  You will also have the opportunity to download and view the XML response file from NetSuite.  The response file lists any errors you may have received and acknowledgements for successful imports.

If you received any errors, you can edit your file to correct the errors and import the file again.  Any requests that were successful do not need to be imported again.  

For more information about constructing and importing XML documents, see the Developer's Guide on the NetSuite Web site at Partners > Developer Program > Technical Documentation. -->