Import Semantics

This section describes the semantics that apply when importing a Commerce Server Catalog XML file. Commerce Server can import XML files exported from previous versions of Commerce Server. The import method will automatically detect the schema version.

Catalog Schema Semantics

Catalog Data Semantics

Catalog Schema Semantics

Schema defined in the XML file must not conflict with any schema elements (product, category, and property definitions) that are already defined in the catalog database. If there is a conflict then a descriptive error will be written to the application event log and the import will fail. Schema conflicts can include:

  • Redefining a property to use a different data type than it is already defined as.
  • Redefining a property to use different minimum and maximum values.
  • Redefining a product or category definition to have a different set of member properties.
  • Redefining a language-neutral property as multilingual, or redefining a multilingual property as language neutral.
  • Importing a catalog in an update mode with different product and variant identifiers.

Schema elements are never deleted as a result of importing an XML-formatted catalog — only new schema is added.

The data types that are referenced in the Commerce Server Catalog XML format are mapped to SQL Server data types as follows:

Catalog XML data type SQL data type
string nvarchar
number int
Bignumber bigint
datetime datetime
Currency money
Money money
boolean bit
Enumeration nvarchar(128)
Real real
Float decimal
Filename nvarchar(256)
Text ntext

Ee799291.note(en-US,CS.20).gif Note

  • The bignumber, boolean, and real data types are not currently supported by Commerce Server Business Desk.

Catalog Data Semantics

An XML-formatted catalog file can define new catalogs or it can define updates to catalogs that already exist in the catalog database.

If a catalog that you want to import already exists in the catalog database, the existing catalog can be replaced by the imported catalog, or you can merge the two catalogs. Keep in mind the following if you decide to merge the catalogs:

  • Products can be modified or added.
  • Product variants can be modified or added.
  • Categories can be modified or added.
  • Products, product variants, and categories can only be deleted if the schema of the catalog XML file is version 1.5 or 2.0. The version 1.0 schema, the version used by Commerce Server 2000, does not support deletions.
  • Be aware that a product element that has the same identifying properties as a product that already exists will cause the existing product to be updated. This product element can specify only a subset of the properties that apply to that product in order to update certain properties (for example, to update only the description property or the price).
  • If a product that you want to import already exists in the catalog database (for example, it has the same identifier as an existing product), but is based on a different definition, then the existing product in the database will be deleted and replaced with the new product.
  • If a product being imported already exists in the catalog database you must specify all the parent categories and all the relationships each time the product is imported (or else those relationships will be deleted).

Copyright © 2005 Microsoft Corporation.
All rights reserved.