(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
- Create a store relationship between the two stores.
- 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
- Configure the promotion engine to use the sequence builder and the agenda builder implementations that can use the promotions store relationship.
- Update the WCSPromotionEngineConfig.xmlfile, which is in the workspace_dir/WC/xml/PromotionEngineConfiguration/ directory.
- Locate the following XML element:
<PromotionExecutionSequenceBuilder impl="com.ibm.commerce.marketing.promotion.runtime.DefaultSequenceBuilder" />
- Change it to match the following code:
<PromotionExecutionSequenceBuilder impl="com.ibm.commerce.marketing.promotion.runtime.StorePathSupportedSequenceBuilder"/>
- Locate the following XML element:
<PromotionExecutionAgendaBuilder impl="com.ibm.commerce.marketing.promotion.runtime.DefaultAgendaBuilder">
- Change it to match the following code:
<PromotionExecutionAgendaBuilder impl="com.ibm.commerce.marketing.promotion.runtime.StorePathSupportedAgendaBuilder">
- Save the file.