Consumer direct extended site: Creating and assigning initial price rules
You can switch your extended site stores to use price rules instead of their existing pricing terms. You can leave any extended site store to use its existing pricing term if you do not want to switch that store to use price rules. If you do switch your extended site stores to use price rules, the price rule overrides any existing pricing term that the store uses.
To make price rule maintenance easier, you might also want to create a new base contract, called a storefront asset store base for default contract.Before you begin
Step 1: Decide whether to add a storefront asset store base for default contract
If you have two or more extended site stores that use the same prices, consider creating a storefront asset store base for default contract. You can assign a price rule to this base contract. The price rule is inherited by any extended site stores that do not have their own price rule assigned. This makes pricing for extended site stores easier to manage because you can manage the price rule assignment in the storefront asset store, rather than for each extended site store.
If you do not need a storefront asset store base for default contract, skip to Step 3a: Create price rules for extended site store default contracts.
Step 2a: Create a price rule for the storefront asset store base for default contract
Procedure
Step 2b: Create a catalog filter for the storefront asset store base for default contract
Procedure
Step 2c: Create the storefront asset store base for default contract
Procedure
-
Copy the following sample contract XML to an empty file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Trading SYSTEM "publish-contract.dtd"> <Trading> <Contract state = "Active" origin = "Deployment" name = "store_Identifier Base for Default Contract" majorVersionNumber = "1" minorVersionNumber = "0" contractUsage = "OrganizationBuyer"> <ContractOwner> <Member> <Organization distinguishName = "organization_DN"/> </Member> </ContractOwner> <TermCondition type = "CatalogFilterTC"> <Property name = "catalogFilterId" value = "catalog_Filter_Id"/> </TermCondition> <TermCondition type = "PriceRuleTC"> <Property name = "priceRuleId" value = "price_Rule_Id"/> </TermCondition> </Contract> </Trading>
-
In the file, update the following variables in the XML (variables are shown in italics in the
previous sample):
Variable Replace with store_Identifier
The identifier of your store, for example, MadisonsStorefrontAssetStore
. As a result, the full contract name would be:MadisonsStorefrontAssetStore Base for Default Contract
organization_DN
The distinguished name of the organization for this contract. To get the correct name, you can run the following SQL statement (replace storeent_id with the correct ID for your store):
select dn from orgentity where orgentity_id in (select member_id from storeent where storeent_id=storeent_id);
catalog_Filter_Id
The ID of the catalog filter you created in Management Center. To get the correct ID, you can run the following SQL statement (replace catalog_filter_name with the name of the catalog filter in Management Center, and replace storeent_id with the correct ID for your store):
select catfilter_id from catfilter where identifier='catalog_filter_name' and storeent_id=storeent_id;
price_Rule_Id
The ID of the price rule you created in Management Center, for example, 12345
.To get the correct ID, you can run the following SQL statement (replace price_rule_name with the name of the price rule in Management Center, and replace storeent_id with the correct ID for your store,):
select pricerule_id from pricerule where identifier='price_rule_name' and storeent_id=storeent_id;
- Import the contract to HCL Commerce by issuing the following URL:
-
For each extended site store that must refer to your new storefront asset store base for
default contract, complete these steps:
Step 3a: Create price rules for extended site store default contracts
- You did not create a storefront asset store base for default contract; however, you want to switch to price rules for the extended site store.
- You created a storefront asset store base for default contract with a price rule in the previous steps; however, you do not want the extended site store to inherit that price rule. For example, if a specific extended site store uses a different price list, or if the store must mark up base costs differently, then that store needs its own price rule.
Procedure
Step 3b. Assign the price rules to the extended site store default contracts
Using HCL Commerce Accelerator, you can access a Price Rule tab in which you can select the price rule to use for your store. You do not need to assign a price rule to an extended site store that inherits a price rule from the storefront asset store base for default contract.
Procedure
- Open HCL Commerce Accelerator. Select the correct store.
- Click .
- Click the Price Rule tab.
- In the Property Value column, select the price rule to assign to the store contract.
- Click Save.
Step 4: Test your results
Procedure
-
For each extended site store that you assigned a price rule to, log on to the store and check
that the prices you see are valid.
This ensures that the new price rules are working as expected.
-
For each extended site store that you did not assign a price rule to, log on to the store and
check that the prices you see are valid.
This ensures that the existing pricing terms are still working as expected.