(Enterprise)

Enable WebSphere Commerce stores to share promotions

If the site uses an extended sites store model, we can enable WebSphere Commerce to share promotions between our extended site stores. To share promotions between extended site stores, we must create a relationship between the stores that are to share the promotion. The promotion engine must also be configured to use sequence and agenda builders to use this relationship and be able to evaluate the promotion.


Procedure

  1. Create a store relationship between the two stores.

  2. Create a self-referencing store relationship. Without this relationship definition, promotions that belong to a customer-facing store are not evaluated. Furthermore, when a customer-facing store has multiple store relationships defined, this self-referencing relationship definition specifies the relative priority of the various promotion sources. The priority is determined by the relative values in the SEQUENCE column. For example, the following shows a relationship that is defined in the STOREREL table:

    STRELTYP_ID RELATEDSTORE_ID STORE_ID SEQUENCE STATE OPTCOUNTER
    -23 10103 10151 1 1 0
    -23 10151 10151 0 1 0

  3. Configure the promotion engine to use the sequence builder and the agenda builder implementations that can use the promotions store relationship.

    1. Update the WCSPromotionEngineConfig.xmlfile, which is in the workspace_dir/WC/xml/PromotionEngineConfiguration/ directory.

    2. Locate the following XML element:

        <PromotionExecutionSequenceBuilder
        impl="com.ibm.commerce.marketing.promotion.runtime.DefaultSequenceBuilder"
        />

    3. Change it to match the following code:

        <PromotionExecutionSequenceBuilder
        impl="com.ibm.commerce.marketing.promotion.runtime.StorePathSupportedSequenceBuilder"/>

    4. Locate the following XML element:

        <PromotionExecutionAgendaBuilder
        impl="com.ibm.commerce.marketing.promotion.runtime.DefaultAgendaBuilder">

    5. Change it to match the following code:

        <PromotionExecutionAgendaBuilder
        impl="com.ibm.commerce.marketing.promotion.runtime.StorePathSupportedAgendaBuilder">

    6. Save the file.