QueryCatalogInfo

Use the QueryCatalogInfo pipeline component to retrieve catalog information for every item in the order form.

Intended use: Order Processing pipeline, Product Info stage.

Values Read

The QueryCatalogInfo pipeline component reads the following values from the indicated dictionary.

Key

Dictionary

Description

item.product_catalog

Order

String. The catalog that contains the item.

item.product_id

Order

String. The product identifier.

item.product_variant_id

Order

Optional. String. An additional identifier that is used to distinguish variants of a particular product such as different colors of an item.

item.catalog_language

Order

Optional. String. The language of the data being retrieved from the catalog.

order.catalog_language

Order

Optional. String. The language of the data being retrieved from the catalog.

CommerceResources

Context

The CommerceResourceCollection that contains all the resources for the site.

catalog_language

Context

Optional. String. The language for the context.

CatalogCacheConfiguration

Context

Optional. The CacheConfiguration object that configures the behavior of the catalog cache.

Values Written

The QueryCatalogInfo pipeline component writes the following values to the Order dictionary.

Key

Description

item._product_*

Optional. Product properties for each item. The column name is appended to form the key name. For more information, see the Remarks section.

item.delete

Optional. A flag that indicates that the item should be deleted from the order. For more information, see the Remarks section.

Remarks

The QueryCatalogInfo pipeline component retrieves product information from the catalog system for every item in the order. It adds the retrieved information to each Item dictionary in the order form.

Items are identified by a combination of the product_catalog, product_id, and product_variant_id keys. The product_variant_id key is required only if the product is a variant, such a particular color of an item that comes in multiple colors. The catalog_language key is required only if the product is available in more than one language.

If the catalog_language key is changed for any items when they are in the order form, the next time that the Order pipeline is run, it will check to see that the items are still valid in the specified language. If the language is missing, product information is retrieved in the default language of the catalog. If the language is specified and is valid for the catalog, the information in the specified language is retrieved. If the language is specified and not valid for that catalog, the properties of the item from the default language will be returned.

If no data is found for an item, the QueryCatalogInfo pipeline component marks the item for deletion by creating a key in the Item dictionary. The key, delete, is assigned a value of one (1). The RequiredProdInfo pipeline component checks for this flag and deletes the item if the key is found. Typically, this deletion occurs when an item in the basket is removed from a catalog. The QueryCatalogInfo pipeline component also marks an item for deletion if the item is a product family, instead of a product variant.

If data for an item is found, the QueryCatalogInfo pipeline component writes an entry to the corresponding Item dictionary for every property. The name of the entry is the prefix _product_ followed by the property name. For example, a product property named "weight" would be stored as _product_weight. The value of the entry is set to the corresponding data from the catalog system.

If no language is specified the default language for the catalog is used. If a supported language is specified, but localized data does not exist in the catalog for a requested property, this component does not retrieve any data for the property.

The QueryCatalogInfo pipeline component uses caching information from the CacheConfiguration object that is the value of the CatalogCacheConfiguration key. The QueryCatalogInfo pipeline component stores data in the CacheConfiguration object with other catalog data.

See Also

Other Resources

RequiredProdInfo

Pipeline Component Reference