WebSphere Commerce Search and the B2B business model

WebSphere Commerce Search includes support for the B2B store.


Prices in WebSphere Commerce Search

Prices returned by WebSphere Commerce Search are either indexed or calculated:

Indexed prices are populated quickly, but not evaluated dynamically. To ensure that the storefront displays accurate prices, we can change the price mode to suit your business needs. See Changing price modes.

When you work with prices and currencies in WebSphere Commerce Search, a separate index column is used by default to handle multiple currencies.


Typical B2B flows

A typical business-to-business storefront navigation shopping flow involves scenarios such as unique pricing, catalog filtering, ordering on a customer's behalf, and multiple contract selections. Sellers, Sales Managers, and Account Representatives can use either the Management Center or Accelerator. These personnel can implement pricing strategies that meet the site's business needs over time, and to filter their catalog for product and price entitlement.

We can use WebSphere Commerce Search catalog filters to enhance the business-to-business storefront keyword search and browsing experience. We can use the Catalog Filter and Pricing tool to filter the catalog to a specific set of catalog entries. Items we can specify include which categories, catalog entries, attribute dictionary attributes, and catalog entry properties to include or exclude from the catalog filter. Use catalog filters for our product entitlement, that is, to entitle customers to a subset of the catalog. See
Use catalog filters.


Contract price indexing and facets

WebSphere Commerce Search builds calculated prices into the search index, so that the Aurora B2B starter store can use the indexed price mode to support contract-based pricing based on calculated prices.

The results that are displayed in the storefront facet values are based on the selected contract. Asset stores can either share prices, or use different prices for Extended Sites based on the selected pricing model.


Configurable price fields

The following configurable fields are available to support pricing:


Changing price modes

To change price modes in WebSphere Commerce Search:

  1. Set the SearchProfilesPrice Search profiles global defaults property in the wc-component.xml file. See Search properties in the component configuration file (wc-component.xml).

  2. Set the wc.search.priceMode property in the STORECONF table. See Search configuration properties in the STORECONF table.


Prioritized price mode settings in starter stores

Different starter stores can use different price modes in WebSphere Commerce Search, instead of relying on the values in the preceding configuration files. Starter stores that use the Business Object Document (BOD) command framework prioritize prices in the following order:

  1. By passing in the search profile in the store URL. This flag receives the highest priority.

  2. By specifying the search profile in the search request. That is, any search request can contain a price mode and entitlement check, for business or performance considerations.

  3. By using the storepath. For example, B2B stores by default use the calculated price mode, while B2C stores use the indexed price mode. Extended sites inherit the asset store configuration.

  4. By using the site-level setting as a fallback. Indexed mode is used by default.

Displaying prices is managed differently if we are using the REST framework. Starter stores inherit price modes in the following order:

  1. Store-level

  2. Asset store

  3. Site

  4. Profile

Note: The wc.search.entitlement property in the STORECONF table inherits price modes in the same order, except for Profile, which is ignored.


Indexing prices

We can index price data into the following locations, based on the number of contracts the site contains or the source of the price data:


Calculating prices

Prices can be calculated either fully, or for a specified catalog entry, contract, or currency. When full price recalculations are used, all prior price data is removed from the index before the B2B contract prices are recalculated. To help decide when and where to calculate prices, consider the following options:


Full price recalculations logic


Recalculations logic


Customization logic

Active and future contract prices are built into the catalog entry index by using field definitions that start with price_, followed by a combination of contract and currency. For example, price_USD_10001 or price_CNY_10002. In contrast, for releases without indexed contract prices, the catalog entry index uses field definitions that start with price_, followed only by its currency. The Calculate Price RESTful call resolves all deployed contracts for stores that share the specified master catalog. Then, it initializes the price API command to calculate prices for all the catalog entries that belong to the specified master catalog. When price data is embedded in the master CatalogEntry index, the calculated price result is saved into the TI_CNTRPRICE_#INDEX_SCOPE# temporary table. While when price data is located in extended sub core, the calculated price results are saved into the TI_EXT_CNTRPRICE_#INDEX_SCOPE# table. All the calculated results for a catalog entry are composed into a single column:

Name Type Description
CATENTRY_ID BIGINT NOT NULL The ID of the catalog entry. This column contains all catalog entry for the specified master catalog.
PRICE CLOB Multiple value pairs for different contracts and currency values that are separated with white space.

The NameValuePairTransformer is the default transformer that transforms the wide multiple value column into the dynamic price field. We can generate different dynamic price column names in Solr by customizing or creating a new transformer. If you customize the transformer, we must override the applyFieldNamingPattern method in the following classes to get the updated price column names:

In extended sites, the catalog asset store defines the price in the master catalog so that extended sites share the catalog asset store's prices. Or, the extended site can override the prices so that it contains the extended site-specific prices. Different extended sites can create specific items with specific price. When prices are calculated, the store-specific items are calculated first. Shared items are each calculated per store by their specific contract and currency. The price API gets the correct price, based on the specified contract, price rule, price model, or contract terms and conditions. Different extended sites can define different prices by using different contract. When a shopper logs on to a different extended site store, different contracts are resolved. Then, the shopper sees the relevant prices in the store, even for the same product in the master catalog.

Multiple price columns are set up in the catalog entry index. When a buyer logs on to the storefront, the eligible buyer contract is retrieved. If multiple eligible contracts exist, the buyer can select a contract to set for the session. Then, the corresponding price column that is related to the contract in session is displayed in the storefront. To customize this behavior, the ContractPriceCalculate URL uses ContractPriceCalculateCmd as the overall entry command. The logic can be overridden by a registering a new command implementation in the command registry table. To introduce different calculation logic, override the calculateStoreSpecificItemPrice and calculateSharedItemPrice methods in the ContractPriceCalculateCmd command. The IBM_Admin_CalculatePriceIndex access profile is used to bootstrap the common entry of the com.ibm.commerce.price.commands.CompositeGetContractUnitPriceCmdImpl price API:

If the store uses the price rule price model, we can use the following command implementation for performance reasons:

If the store uses the external price model, we can register our own price command to get your intended price result.


Workspace preview

When we use workspace preview: