Inventory List Object Import and Export

Use the inventory.xsd schema file to import or export inventory lists.

For development purposes, inventory lists are included in the site import process, enabling you to export a site and then import it on another instance without losing inventory-related information. When you export an Inventory file, it's first sorted in ascending alphabetical order based on productID.

Object Information Details
Schema file inventory.xsd
Business Manager import location site > Merchant Tools > Products and Catalogs > Import & Export
Granularity Selected inventory lists.
Pipelets
  • ImportInventoryLists
  • ExportInventoryLists

Salesforce B2C Commerce imports or exports Inventory List records and their associated Product Inventory Records using an XML file. The structure of the XML file follows the semantics of the XML inventory.xsd schema definition.

The following code example shows a typical import file:

<?xml version="1.0" encoding="UTF-8" ?>
<inventory xmlns="http://www.demandware.com/xml/impex/inventory/2007-05-31"> #Specifies the inventory.xsd file that defines the schema.
	<inventory-list>
		<records>
			<record product-id="ProductWithAllocation"> #Sets the stock level at 10 for product "ProductWithAllocation".
				<allocation>10</allocation>
				<perpetual>false</perpetual>
			</record>
			<record product-id="ProductWithBackorderAllocation"> #Sets stock level and backorder allocation to 10 for product "ProductWithBackorderAllocation".
				<allocation>10</allocation>
				<perpetual>false</perpetual>
				<preorder-backorder-handling>backorder</preorder-backorder-handling>
				<preorder-backorder-allocation>10</preorder-backorder-allocation>
			</record>
			<record product-id="ProductWithPerpetualFlag">
				<perpetual>true</perpetual>
			</record>
		</records>
	</inventory-list>

Inventory list export contains these attributes:

  • allocation
  • allocation-timestamp
  • perpetual
  • preorder-backorder-handling
  • preorder-backorder-allocation
  • in-stock-date
  • in-stock-datetime
  • ats (available to sell)
  • on-order
  • turnover