WebSphere Commerce Version 8.0.3.0 or later

Catalog export configuration files

You can work with the catalog export configuration files to customize how catalog data gets exported.

The catalog export configuration files are located in the following directory:
  • WC_eardir/xml/config/com.ibm.commerce.catalog/dataextract
  • WebSphere Commerce DeveloperWCDE_installdir\workspace\WC\xml\config\com.ibm.commerce.catalog\dataextract

Handling parameters in the configuration files

The wc-dataload.xml file determines the main input parameters to consider when catalog exports from the Swagger UI are run. For example, it performs certain tasks based on whether you indicate the export of categories or products.

You can specify optional, comma-separated parameters in JSON format when you post the body of the catalog_export class.

The wc-dataload.xml file contains the following optional parameters:
firstTwoLinesAreHeader
Indicates whether the first two lines are considered the header. The default value is false.
firstLineIsHeader
Indicates whether the first line is the header. The default value is true.
tokenDelimiter
Specifies what to use as the token delimiter.
CSVColumnList
A list of column names that are separated by a comma. If not specified, all configured CSV columns are returned in the predefined order. The resulting exported CSV file contains only the specified CSV columns and in the order that they are specified.
currency
The price column in the CSV file depends on this parameter. If not specified, the default value is the store's default currency. The price value that is exported are in this currency.
seoUrlEnabled
This parameter is for the SEOURL column. If set to true, the SEOURL is constructed and returned. Otherwise, the returned SEOURL results in an empty string. The value can be true or false. The default value is false, if not specified.
imageUrlEnabled
This parameter is for both Thumbnail and FullImage columns. If set to false, the image paths in the database are returned. If set to true, the Thumbnail and FullImage columns are constructed and contain a complete URL for displaying the images. The value can be true or false. The default value is false, if not specified.
The business object configuration files contain optional parameters, depending on whether you indicate category or products as the export object type. The following optional parameters are for the export of the product object type:
attributeUsage
Indicates whether defining and descriptive attributes and values are returned. If 1 is specified, only defining attributes and values are returned. If 2 is specified, only descriptive attributes and values are returned. If not specified, or specified a value other than 1 or 2 is specified, the default behavior is to return both defining and descriptive attributes and values.
attributeList
If specified, only the specified comma-separated attribute identifiers are returned.
urlPrefix
The URL prefix. The default value is http://localhost/webapp/wcs/stores/servlet/.
productionServerHostName
The host name of the production server. The default value is the server where the data extract is running from. Specify this parameter value if you run the data extract on a staging environment and want the URL to point to a production server.
imageUrlPrefix
The image URL prefix. The default value is http://localhost/wcsstore/.

For more information about when these optional handler-specific parameters can be used, see the content of the catalog export configuration files.

In addition to the optional values, you can also specify the optional query parameters that are available to all REST services. For example, to scope the catalog export based on the 10001 catalog ID,

{
catalogId : "10001"
}

For a list of all the optional query parameters that can be used with the WebSphere Commerce REST API, see WebSphere Commerce Storefront REST API.

Extending the catalog export configuration files

To extend the catalog export configuration files, create the following directory structure:
  • WC_eardir/xml/config/com.ibm.commerce.catalog-ext/dataextract
  • WebSphere Commerce DeveloperWCDE_installdir\workspace\WC\xml\config\com.ibm.commerce.catalog-ext\dataextract

Then, in the new extension directory, create new files that contain only the changed parameter values that you want to use.