Inventory List Import

Salesforce B2C Commerce imports an Inventory List record and its associated Product Inventory Records via an XML file. The structure of the XML file follows the semantic of the XML inventory.xsd schema definition.

A typical import file is shown in the following example:

<?xml version="1.0" encoding="UTF-8" ?>

Specify the inventory.xsd file that defines the schema.

<inventory xmlns="http://www.demandware.com/xml/impex/inventory/2007-05-31">
	<inventory-list>

ProductInventoryRecord Objects

		<records>

Set the stock level at 10 for product "ProductWithAllocation".

			<record product-id="ProductWithAllocation">
				<allocation>10</allocation>
				<perpetual>false</perpetual>
			</record>

Set the stock level at 10 and the backorder allocation at 10 for product " ProductWithBackorderAllocation ".

			<record product-id="ProductWithBackorderAllocation">
				<allocation>10</allocation>
				<perpetual>false</perpetual>
				<preorder-backorder-handling>backorder</preorder-backorder-handling>
				<preorder-backorder-allocation>10</preorder-backorder-allocation>
			</record>

Define "ProductWithPerpetualFlag" as a product always in stock.

			<record product-id="ProductWithPerpetualFlag">
				<perpetual>true</perpetual>
			</record>
		</records>
	</inventory-list>