Partilhar via


ImportOption Element

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

The ImportOption element specifies options for importing business data and actions to perform after you complete the import operations.

Put the ImportOption element within the BusinessData element.

The following table lists the attributes of the ImportOption element.

Attribute

Data Type

Description

Name

String

Specifies the name of a property that defines the configuration of the import data and import operations. Property names are not case-sensitive. The import options differ based on the type of data that is being staged.

Val

String

Specifies the value of the property to be set.

The following table lists the valid names and values for catalog data.

Name

Value

CatalogsToImport

A comma-separated list of the names of the catalogs to import.

ErrorThreshold

A numeric value that determines the severity level that represents a fatal error. The default ErrorThreshold set for staging is 1.

In non-transactional mode, an import process continues until the error count reaches the value specified by the ErrorThreshold property. When this occurs, the import process stops.

If the ErrorThreshold value is <0>, the exception with the message "Validations_InvalidThreshold" is thrown.

GenerateFullTextIndexes

Whether full text indexes are generated after the import operation. Valid values are "Yes" and "No".

For more information about full text indexes, see What Is a Full-Text Catalog?

ImportSchemaChanges

Whether schema changes should be performed during the import operation. Valid values are "Yes" and "No".

If the catalog schema does not exist when this property is set to "Yes", the staging import operation will continue, even though no schema changes exist. No exception is thrown with a null catalog schema.

If set to "Yes", the schema of conflicting properties will change during the import.

MaterializeVirtualCatalog

Whether to materialize the virtual catalogs that will be updated. Valid values are "Yes" and "No".

When you materialize a virtual catalog, the virtual catalog data is stored in tables. This improves the run-time performance of the virtual catalog. It has the performance of a base catalog for all search and browse operations.

Mode

How catalog data is to be imported. The following table specifies the valid values.

ValueDescription
Full Specify to delete all data in the catalog database for the specified catalogs and replace it with the staged catalog data.
IncrementalSpecify to add new data and update existing data that has changed. Deletes items that are marked for deletion.

Operation

Specifies the type of import operation to perform. The only valid value for staging is "Import". This operation validates the catalog data file during the import process. The import operation stops if the errors reach the error threshold.

OverwriteRelationships

Whether to overwrite existing relationships and hierarchies or merge new data with the existing data. This property is valid when Incremental mode is specified for import. Valid values are "Yes" and "No".

If the value is "Yes", the existing values in the database are deleted and set to the values in the XML file. All existing relationships and hierarchies are deleted and reconstructed from the XML file.

If the value is "No", new data is added to the database and existing data is updated. The catalog system adds relationships and hierarchies from the XML file.

PropertiesToImport

A comma-separated list of the names of the catalog properties to import. Only the properties specified and the mandatory properties are imported. You might use this property to import a catalog, but not the prices of the products in the catalog.

RefreshCache

Whether to update the catalogs cache on the destination server after the deployment finishes. Valid values are "Yes" and "No". Specify "No" if you want to manually update the cache on the destination server after the deployment finishes or if you have configured post-deployment scripts to update the cache.

TransactionMode

Specifies whether to enable data reversion for the selected catalogs if errors occur. This property refers to the SQL transaction and specifies how the import process behaves when an error occurs. If an error occurs during the staging of the catalog data, the transaction will be aborted and the catalog data will be reverted automatically to the initial state. Valid values are "Yes" and "No".

  • Yes - Transact each catalog. A transaction is used for each catalog to be imported. If the import fails for a catalog, the import operation for that catalog stops. But the import process continues for any additional catalogs.

  • No - Transact each product in the import file. Continue the import if there are errors when you import individual products. A transaction is used on a per-item basis, not a per-catalog basis. If an error occurs, the product is skipped, and the import continues. If the import fails, the database may be changed.

The following table lists the valid names and values for marketing data.

Option

Description

Promocode

Specifies how promotional codes or coupons are to be staged. The following table specifies the valid values.

Incremental Stage only the promotion codes that have changed since the last deployment.
Full Stage all promotion codes, regardless of any changes since the last deployment.
Bb498326.alert_note(en-US,CS.70).gifNote:
Do not include Promocode if you do not want to stage promotional codes.

RefreshCache

Whether to update the Marketing configuration cache on the destination server after the deployment finishes. Valid values are "Yes" and "No". Specify "No" if you want to manually update the cache on the destination server after the deployment finishes or if you have configured post-deployment scripts to update the cache.

The following table lists the valid names and values for orders data.

Option

Description

RefreshCache

Whether to update the Orders configuration cache on the destination server after the deployment finishes. Valid values are "Yes" and "No". Specify "No" if you want to manually update the cache on the destination server after the deployment finishes or if you have configured post-deployment scripts to update the cache.

The following table lists the valid names and values for site terms data.

Option

Description

RefreshCache

Whether to update the Site Terms cache on the destination server after the deployment finishes. Valid values are "Yes" and "No". Specify "No" if you want to manually update the cache on the destination server after the deployment finishes or if you have configured post-deployment scripts to update the cache.

Remarks

When you stage business data, you export data from a source database and import data to a destination database. The ImportOption element specifies how the import operation is conducted. Each type of data is exported as an XML data file.

Do not delete catalogs when they are being imported.

Example

The following example specifies several export options and import options for the staging of catalog data.

<BusinessData BusinessDataID="777b7fd9-524b-4092-b8bd-2b5518725f1f" BusinessDataTypeName="Catalog">
  <ExportOption Name="MODE" Val="FULL" /> 
  <ExportOption Name="SCHEMAEXPORTTYPE" Val="RELEVANT" /> 
  <ExportOption Name="EXPORTDELETEDITEMS" Val="YES" /> 
  <ExportOption Name="EXPORTEMPTYVALUES" Val="YES" /> 
  <ExportOption Name="CATALOGSTOEXPORT" Val="Adventure Works Catalog,AW VC Pesos,AWC_Virtual" /> 
  <ExportOption Name="CATALOGSTOEXPORT_SOURCECULTURE" Val="Adventure Works Catalog,AW VC Pesos,AWC_Virtual" /> 
  <ExportOption Name="PROPERTIESTOEXPORT_SOURCECULTURE" Val="BaseCatalog Name,Brand,Catalog Name,Category Name,MultipleChoice Custom 1,List Price,Definition Name,Description,Display Name,Type,Image_filename,Image_height,Image_width,Date of Introduction,Is Searchable,Last Modified,Name,OnSale,Primary Parent Category,SKU,Color,Product Id,Size,Category Pricing,VariantCode,VariantId" /> 
  <ExportOption Name="EXPORTASVIRTUALCATALOG" Val="YES" /> 
  <ExportOption Name="EXPORTDEPENDENTBASECATALOGS" Val="YES" /> 
  <ExportOption Name="CATALOGSETSTOEXPORT" Val="NO" /> 
  <ImportOption Name="MODE" Val="FULL" /> 
  <ImportOption Name="ERRORTHRESHOLD" Val="1" /> 
  <ImportOption Name="OVERWRITERELATIONSHIPS" Val="YES" /> 
  <ImportOption Name="TRANSACTIONMODE" Val="NO" /> 
  <ImportOption Name="MATERIALIZEVIRTUALCATALOG" Val="NO" /> 
  <ImportOption Name="IMPORTSCHEMACHANGES" Val="YES" /> 
  <ImportOption Name="GENERATEFULLTEXTINDEXES" Val="NO" /> 
  <ImportOption Name="REFRESHCACHE" Val="NO" /> 
  </BusinessData>

See Also

Other Resources

What Are the Import Options?

Business Data Staging Options

BusinessData Element

ExportOption Element

CSS Business Data XML Configuration File Syntax Elements