Product Catalog Integration

Product catalog integration is the process of offering products from different vendor catalogs for sale on a Web site. Another scenario that is conceptually similar concerns a company providing access to an office supply catalog on their internal Web site, allowing employees to order their own office supplies. This process needs to be considered from the perspective of the recipient of a vendor catalog as well as from the perspective of the vendor providing the catalog.

Importing Catalogs in the Commerce Server XML Format

Generating Catalogs in the Commerce Server XML Format

Creating Catalog XDR Schema

Importing Catalogs in the Commerce Server XML Format

The process of importing a catalog is normally performed in the Catalog Editor module of Commerce Server Business Desk. For more information about importing a catalog in the proper XML format, see Importing an XML Catalog File. However, a catalog in the proper Extensible Markup Language (XML) format can be imported into the Commerce Server Catalogs database programmatically by using the ImportXML method of the CatalogManager object. For more information about this method, see CatalogManager.ImportXML.

To validate that your catalog XML file conforms to the proper schema:

  1. Edit the second line in your catalog XML file so that it references the catalog XML Data-Reduced (XDR) file provided in the Commerce Server root installation folder. For example:

    <MSCommerceCatalogCollection xmlns="x-schema:C:\Program Files\Microsoft Commerce Server\CatalogXMLSchema.xml">

  2. Open your catalog XML file in Internet Explorer. Internet Explorer will validate that the XML file conforms to the specified schema and show diagnostic errors in the event that it does not conform.

Ee824311.note(en-US,CS.20).gifNote

  • These steps only confirm that the catalog XML file conforms to the XDR schema. It does not validate whether the catalog schema, such as product, category, and property definitions, are compatible with any pre-existing catalog schema, or whether products and categories in the catalog XML file are consistent with the catalog schema defined in that XML file. This validation occurs when the file is imported, and any problems found are written to the event log.

If Microsoft BizTalk Server is installed on the same computer as Commerce Server, you can use an Application Integration Component (AIC), as defined by BizTalk Server, to automate the process of importing XML catalogs into Commerce Server as they arrive from vendors through BizTalk Server. For more information about creating an AIC, see the BizTalk Server documentation.

Generating Catalogs in the Commerce Server XML Format

A product catalog must exist in the XML format expected by Commerce Server in order to be successfully imported. If the vendor supplying the catalog is also using Commerce Server as the source of the catalog, as well as using BizTalk Server to deliver the catalog, the process is quite simple. A business manager can select a catalog and send it to a trading partner. For more information about sending a catalog to a trading partner, see Sending a Catalog to a Trading Partner.

If you are a vendor who does not use Commerce Server as the source of your catalog, you can still use BizTalk Server to deliver your product catalog to Commerce Server. You might even be able to take advantage of the Mapper feature in BizTalk Server, using the Looping functoid, to convert your product catalog from its native format to the XML format expected by Commerce Server. For more information about using the Mapper feature and the Looping functoid to convert the catalog to the proper XML format, look for "Commerce Server catalogs" in the BizTalk Server documentation.

If vendors are not using BizTalk Server, they will need to devise a proprietary solution to convert their catalog format to the XML format expected by Commerce Server. For more information about this format, see Catalog XML Structures.

Creating Catalog XDR Schema

You must create a catalog XDR schema to enable catalog exchange between Commerce Server 2002 and BizTalk Server. The file CatalogXMLSchema.xml that is installed with Commerce Server 2002 provides backward compatibility with older installations of Commerce Server.

Use the following sample code to create a catalog XDR schema using a connection string to the catalog database:

     Dim oCatalogManager 
     FmtXdr = 2
     Set oCatalogManager = CreateObject("Commerce.CatalogManager")
     Call oCatalogManager.Initialize("connection string to the catalog database", true)
     Call oCatalogManager.ExportXml("path of the xml file", ,true, FmtXdr)

Use the following code to create a catalog XDR schema using a product catalog site name:

     Dim oCatalogManager 
     FmtXdr = 2
     Set oCatalogManager = CreateObject("Commerce.CatalogManager")
     Call oCatalogManager.Initialize(sitename, false)
     Call oCatalogManager.ExportXml("path of the xml file", ,true, FmtXdr)

For more information, see Catalog XML Structures.

Copyright © 2005 Microsoft Corporation.
All rights reserved.