<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smbxml SYSTEM "http://www.netsuite.com/xml/dtd/smb_4_06.dtd">
<!--
smbXML Service Item for Sale 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 service item for sale record import example, including mandatory and optional item elements. A service 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 a service 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, a service 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 service 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 this item record, the record will fail to import. 

The following example represents a very minimal import for a service item record, but it is enough to allow us to import the record below. Service item records may also be created through the user interface at Lists > Items > New > Service for Sale. For a complete example of a service item record import, see the example below.-->
			<serviceSaleItem handle="SSAL1547">
				<name>Computer Services</name>
			</serviceSaleItem>
		</addOrUpdate>
	</request>
	<request>
		<!--Add an account record to be referenced on this item record. -->
		<addOrUpdate>
			<account handle="ICME7895">
				<accountTypeRef>
					<name>Income</name>
				</accountTypeRef>
				<name>Computer Services</name>
			</account>
		</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="CAT165">
				<name>Business</name>
				<parentRef>
					<name>Computer Services</name>
				</parentRef>
			</storeCategory>
		</addOrUpdate>
	</request>
Add another store category.
	<request>
		<addOrUpdate>
			<storeCategory handle="CAT786">
				<name>Networking</name>
				<parentRef>
					<parentName>Computer Services</parentName>
					<name>Business</name>
				</parentRef>
			</storeCategory>
		</addOrUpdate>
	</request> -->

	<!--Add a service item record.-->
	<!--Below is a list of the mandatory and optional references used in a service item for sale 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:
		-	incomeAccountRef				created in the UI or via smbXML
		-	storeCategoryRef				created in the UI only
		-	storeDisplayThumbnailRef	created in the UI only
		-	storeDisplayImageRef			created in the UI only
		-	priceLevelRef						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 a service item record already exists for this item, the information should be updated. If a record does not exist, a new record will be created.-->
			<serviceSaleItem handle="SSAL2156">
				<!--The serviceSaleItem 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 serviceSaleItem element. Creating this handle allows you to reference this item in other smbXML documents using handle references.-->
				<name>Network Configuration</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>Network Repair &amp; Installation</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. The &amp; string can be added to insert an ampersand into you XML document. -->
				<parentHandle handle="SSAL1547"/>
				<!--The parentHandle element is a reference to an existing item record. This particular item was created at the beginning of this example. Service item records can also be created in the UI at Lists > Items > New > Service for Sale. 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 user interface, 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>Services</parentName>
					<parentName>On-Site</parentName>
					<name>Computer Services</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. The default value if this element is not included is false.-->
				<salesDescription>On site network installation and repairs&#xD;Does not include any needed parts or equipment.</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>Computer Services</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. -->
				<rate>30</rate>
				<!--The rate element is used to record the price you sell this item for. This element is not required and the information entered populates the Rate 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 rate 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>30</itemPrice>
					</itemPriceLine>
					<itemPriceLine>
						<itemPriceTypeRef>
							<name>Alternate Price 1</name>
						</itemPriceTypeRef>
						<itemPrice>40</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>30</itemPrice>
					</itemPriceLine>
					<itemPriceLine>
						<itemPriceTypeRef>
							<name>Alternate Price 1</name>
						</itemPriceTypeRef>
						<currencyRef>
							<name>British pound</name>
						</currencyRef>
						<itemPrice>45</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.

smbXML does not currently support price lists for multiple currencies only. If you use Multiple Currencies without Multiple Prices, you can import a rate using the rate element for your default currency. Any other currency prices must be entered manually through the UI. -->
				<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>Network Repair &amp; Installation</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>Computer Services</parentName>
						<parentName>Business</parentName>
						<name>Networking</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>On site network installation and repairs&#xD;Does not include any needed parts or equipment.</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>serviceman.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>On site network installation and repairs with one of our qualified technicians.&#xD;We can also help train your IT personnel to maintain the network on a day-to-day basis. Any additional parts or equipment must be purchased separately.</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>serviceman.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>Schedule an appointment now and get a free computer system analysis.</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>Schedule an appointment now and get 10% off your total services.</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. -->
			</serviceSaleItem>
		</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. -->