HCL Commerce Enterprise

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

Read the following topics and refer to them throughout this procedure, paying particular attention to the contract modelling examples in the second link:

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 2b: Create a catalog filter for the storefront asset store base for default contract

Create a catalog filter for product entitlement that extended site stores can inherit. For example, this catalog filter can entitle customers to purchase every catalog entry in the master catalog, or just a subset. Use Management Center to create this catalog filter. Note that this catalog filter does not support price adjustments like the catalog filter in HCL Commerce Accelerator.

Procedure

Create a catalog filter using the information in Managing catalog filters

Step 2c: Create the storefront asset store base for default contract

Use the sample contract XML provided in this step to create this new contract in the storefront asset store. In the XML, you must specify the name of the price rule and the catalog filter that you created in the previous steps. You can then import the contract XML into HCL Commerce.

Procedure

  1. 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>
  2. 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; 
  3. Import the contract to HCL Commerce by issuing the following URL:
  4. For each extended site store that must refer to your new storefront asset store base for default contract, complete these steps:
    1. For reference purposes only, export the storefront asset store base for default contract you just created using the ContractExport URL. You must export this contract so that you can look up certain contract values when you edit the default contract XML.
    2. Export the default contract of the extended site store by issuing the following URL:
    3. Open the exported default contract XML in an editor.
    4. Within the <BuyerContract> element, add the following contract reference XML code:
      <ContractReference>
          <ContractRef
              name = "contract_Ref_Name"
              majorVersionNumber = "major_Version_Number"
              minorVersionNumber = "minor_Version_Number"
              origin = "Deployment">
              <ContractOwner>
                  <OrganizationRef distinguishName = "Organization_Ref_distinguish_Name"/>
              </ContractOwner>
          </ContractRef>
      </ContractReference>
      
    5. In the contract reference XML code you added, update the following variables (variables are shown in italics in the previous sample):
      Variable Replace with
      contract_Ref_Name The full contract name you gave to the storefront asset store base for default contract in a previous step, for example:

      MadisonsStorefrontAssetStore Base for Default Contract

      Refer to the contract XML you exported for the storefront asset store base for default contract.

      major_Version_Number This number must match the majorVersionNumber value in the storefront asset store base for default contract.
      minor_Version_Number
      This number must match the minorVersionNumber value in the storefront asset store base for default contract.
      Organization_Ref_distinguish_Name This number must match the Organization distinguishName value in the storefront asset store base for default contract.
    6. Save and close the file.
    7. Import the updated default contract XML to HCL Commerce by issuing the following URL:

Step 3a: Create price rules for extended site store default contracts

This price rule sets pricing for catalog entries available on the extended site store. You can assign the same price rule to more than one store. You must create price rules for specific extended site stores if either of the following are true:
  • 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

Create a price rule using the following tasks as reference:

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

  1. Open HCL Commerce Accelerator. Select the correct store.
  2. Click Merchandise > Catalog Filter and Price Rule.
  3. Click the Price Rule tab.
  4. In the Property Value column, select the price rule to assign to the store contract.
  5. Click Save.

Step 4: Test your results

Procedure

  1. 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.
  2. 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.