Example: Understanding how prices are displayed on extended sites stores
Learn about the database relationships used to display prices on an extended sites store. These relationships are important because an extended sites store can use customer-specific prices, site-specific prices, or asset store-specific prices during runtime.
- To use customer-specific prices, an extended sites store must have a customer-specific contract with an associated price rule, which is responsible for pointing to a customer-specific price list.
- To use site-specific prices during runtime, the default contract or the base default contract must be associated to a price rule, which points to the store's default price list.
- To use shared pricing across extended sites stores, the storefront asset store's base default contract must be associated to a price rule, which points to an asset store-specific price list.
In all three scenarios, we must associate a price rule to your contract in order to use the correct price list at runtime. For more information about price rules, see Price rule assignment and contracts. The following example illustrates the relationships in the database tables for an AuroraB2BStore extended sites store that is configured to use store-specific pricing at runtime. We can use this example to troubleshoot any pricing issues that we might notice in our extended sites store.
![]()
- 1 The STORECNTR database table defines the relationship between a store and a contract. A store can be associated with multiple contracts. We can use the CONTRACT database table to determine the types of contracts associated to a store. We can have a default contract, Base for default contract, Storefront asset store base for default contract, or a customer specific contract.
- A default contract applies to all shoppers who browse the store and do not have any other associated customer contract.
- A Base for default contract is a base contract that can be shared by other contracts.
- A StorefrontAssetStore Base for default contract is a default base contract that is inherited by all associated extended sites stores. This contract is a reference contract for the store, which can be shared between multiple stores.
- A customer contract applies to a specific shopper account.
In the image, the AuroraB2BStore (10701) is associated with two contracts in the STORECNTR database table: 10504 (e-site default contract), 10503 (e-site base default contract).
- 2 Each contract can have 'reference contracts', which are specified in the TRADING database table. By default, the default contract for an extended site store refers to the 'Base for default contracts', which refers to the 'StorefrontAssetStore Base for default Contract' with a trading agreement type of 'Contract' (Reftrading_Id). Therefore, all terms and conditions associated with the referrer contracts are inherited. In this price list example, if a valid price rule is not associated to the default contract, WebSphere Commerce checks its referrer contracts for valid price rules.
Note: It is not necessary that a customer-specific contract inherits from its default or base contracts.
In the image, we can see in the TRADING database table that 10504 (e-site default contract) references 10503 (e-site Base for default contract) which in turn references 10003 (SFAS Base Default Contract). The contract_Id is the same as the trading_Id.
- 3 Each contract has multiple terms and conditions associated with it, which govern a seller's relationship with a buyer. For example, terms and conditions can dictate the products and prices that a buyer is able to see on the storefront. For price rules, from the TERMCOND database table, look at the termcond_Id's that have tcsubtype_Id=PriceRuleTC. Ensure that the row with the relevant trading_Id (contract_Id) has a pricerule_Id value in the Stringfield1 column of the table. The row that has a value in the Stringfield1 column is the default price rule associated with this contract. Each contract can have only one associated price rule at a time. If a pricerule_Id does not exist for the specific row, WebSphere Commerce searches for rows with referrer trading_Ids (trading_Id==reftrading_Id) and the tcsubtype_Id=PriceRuleTC condition. WebSphere Commerce uses the first pricerule_Id that is returned within its referenced contracts.
Note: If your price rule is not assigned to our customer contract or default contract as expected, then assign your price rule to a contract. See Assigning a price rule to a contract. In the image, Term condition 10005 is associated with trading_Id 10504 (e-site default contract), which has Stringfield1 (pricerule_Id) 10801. If a pricerule_Id did not exist for this record, WebSphere Commerce first checks termcond_Id=10004 for an associated price rule as the term condition belongs to the 'e-site base default contract'. Then, it would check termcond_Id=10003 for a price rule as it is associated to 'SFAS base default contract'. The key here is to ensure that for term condition 10005, the correct pricerule_Id exists in the Stringfield1 column unless we want the store to use the asset store-specific price rule.
- 4 Each store is associated with a number of offer price and list price lists. The association is defined within the STORETPC database table. If you encounter issues where the expected price list is not available in Management Center for a given extended sites store, then the relationship between the price list and the store does not exist in the STORETPC table. The table links the STOREENT_ID and the TRADEPOSCN_ID (which is your price list).
In the image, 10701 is associated to tradeposcn_Id 11551, which is the store-specific price list. We can see from the name and description field of the TRADEPOSCN database table. Any price list that we want the store to use must be associated to the storeent_Id in the STORETPC database table.
- 5 A price rule has many elements that are either a condition or an action. These elements are defined within the PRELEMENT database table and are associated to a pricerule_Id. Ensure that this table contains the price list element that we want your price rule to use. The element is described in the PRELEMENTATTR database table with the specific tradepsocn_Id (price list).In the image, Prelement_Id 10006 is associated to tradepsocn_Id 11551 in the PRELEMENTATTR table. Prelement_Id 10006 means that the price rule element is referencing the store-specific price list (tradepsocn_Id 11551).
Note: If the price list is incorrect, then you need to either fix your price rule in Management Center to reference the correct price list, or fix the term condition to reference the correct price rule.
Related concepts
Price rule assignment and contracts
Trading agreement data
Contract referral
organization. They define what is being sold under the contract; the price of the items being sold; how the items are shipped; how orders are paid for; how item returns are handled; how orders are approved; and where orders are shipped from.">Contract terms and conditions
price rules, you should know which database tables store data about price rules. In addition, you should understand what is happening behind the scenes when the store displays a price generated by a price rule. This knowledge helps you understand what you need to create or change to support customized conditions and actions in price rules.">Price rule data storage and process flow
Related tasks
price lists. A price entry is a row in a price list.">Limiting the size of a price list to be exported
price rules used for storefront pricing.">Manage price rules
Assigning a price rule to a contract
Related reference
Case Study: WebSphere Commerce contract modeling