Develop > Presentation layer > Customize promotions > Promotion engine customization


Example: Promotion engine configuration XML file

The configurable components of the promotion engine are specified in a configuration XML file, WCSPromotionEngineConfig.xml. The configuration file is stored in the /WC_INSTALL/instances/instance/xml/PromotionEngineConfiguration/ directory.

This following example code represents a complete promotion engine configuration XML file:

<?xml version="1.0" encoding="UTF-8"?>
<PromotionEngine impl="com.ibm.commerce.marketing.promotion.runtime.DefaultPromotionEngine">   
<Name>PromotionEngine</Name>      
<SingleJVMConfiguration>true</SingleJVMConfiguration>      
<PromotionCodeManager impl="com.ibm.commerce.marketing.promotion.code.WCSPromotionCodeManager">         
<PromotionCodeResolver impl="com.ibm.commerce.marketing.promotion.code.DefaultPromotionCodeResolver"/>      
</PromotionCodeManager>      
<CouponManager impl="com.ibm.commerce.marketing.promotion.coupon.DefaultCouponManager"/>    
     
<PromotionContextFactory impl="com.ibm.commerce.marketing.promotion.runtime.DefaultPromotionContextFactory"/>      
<DefaultBehavior>         
<StatelessInvocation>true</StatelessInvocation>         
<CheckTargetingAtRuntime>true</CheckTargetingAtRuntime>         
<SkipTargetingOnCodeEntered>true</SkipTargetingOnCodeEntered>         
<PriceAdjustmentBasedOnStandardOfferPrice>true</PriceAdjustmentBasedOnStandardOfferPrice>         
<Debug>false</Debug>      
</DefaultBehavior>    
     
<ExternalEntityFactoryRegistry impl="com.ibm.commerce.marketing.promotion.dependency.ExternalEntityFactoryRegistry">         
<OrderFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSOrderFactory"/>         
<OrderItemFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSOrderItemFactory"/>         
<CustomerFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSCustomerFactory"/>         
<CustomerProfileFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSCustomerProfileFactory"/>         
<CatalogEntryFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSCatalogEntryFactory"/>         
<StoreFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSStoreFactory"/>         
<CampaignFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSCampaignFactory"
        
<PriceConverterFactory impl="com.ibm.commerce.marketing.promotion.integration.dependency.WCSPriceConverterFactory"/>      
</ExternalEntityFactoryRegistry>       
     
<PersistenceManagerRegistry impl="com.ibm.commerce.marketing.promotion.persistence.PersistenceManagerRegistry">         
<PromotionPersistenceManager impl="com.ibm.commerce.marketing.promotion.PromotionSessionBeanPersistenceManager">            
<InitialCacheSize>1024</InitialCacheSize>            
<MaxCacheSize>8192</MaxCacheSize>         
</PromotionPersistenceManager>        
        
<PromotionPolicyPersistenceManager impl="com.ibm.commerce.marketing.promotion.policy.PromotionPolicySessionBeanPersistenceManager">            
<InitialCacheSize>32</InitialCacheSize>            
<MaxCacheSize>1024</MaxCacheSize>         
</PromotionPolicyPersistenceManager>          
        
<PromotionGroupPersistenceManager impl="com.ibm.commerce.marketing.promotion.group.PromotionGroupSessionBeanPersistenceManager">            
<InitialCacheSize>32</InitialCacheSize>            
<MaxCacheSize>1024</MaxCacheSize>         
</PromotionGroupPersistenceManager>          
        
<DynamicAttributePersistenceManager impl="com.ibm.commerce.marketing.promotion.dynattr.DynamicAttributeSessionBeanPersistenceManager">            
<InitialCacheSize>32</InitialCacheSize>            
<MaxCacheSize>1024</MaxCacheSize>         
</DynamicAttributePersistenceManager>          
        
<PromotionArgumentPersistenceManager impl="com.ibm.commerce.marketing.promotion.runtime.PromotionArgumentSessionBeanPersistenceManager"/>          
        
<CouponPersistenceManager impl="com.ibm.commerce.marketing.promotion.coupon.CouponSessionBeanPersistenceManager"/>          
        
<StatsPersistenceManager impl="com.ibm.commerce.marketing.promotion.stats.StatsSessionBeanPersistenceManager"/>      
</PersistenceManagerRegistry> 
     
<PromotionEventListenerRegistry impl="com.ibm.commerce.marketing.promotion.event.ListenerRegistry"> 
        
<!-- DO NOT MODIFY THE SECTION BELOW -->        
        
<Listener impl="com.ibm.commerce.marketing.promotion.event.PrintPromotionDebugEventListener">            
<Name>[SYSTEM]DEBUGDAEMON</Name>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionDebugEvent</ListensFor>         
</Listener>         
<Listener impl="com.ibm.commerce.marketing.promotion.coupon.CouponDaemon">            
<Name>[SYSTEM]COUPONDAEMON</Name>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAppliedEvent</ListensFor>         
</Listener>         
<Listener impl="com.ibm.commerce.marketing.promotion.event.WCSPromotionSuspendedEventListener">            
<Name>[SYSTEM]PROMOTIONSUSPENDHELPER</Name>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionSuspendedEvent</ListensFor>         
</Listener>          
        
<!-- DO NOT MODIFY THE SECTION ABOVE --> 
        
<!--        
        
<Listener impl="com.ibm.commerce.marketing.promotion.event.PrintPromotionLifeCycleEventListener">            
<Name>PrintLifeCycleEventListener</Name>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionChangedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionCreatedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionDeployedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionRemovedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionResetEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionResumedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionSuspendedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionWithdrawnEvent</ListensFor> 
        
</Listener> 
        
<Listener impl="com.ibm.commerce.marketing.promotion.event.PrintPromotionExecutionEventListener">            
<Name>PrintExecutionEventListener</Name>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAssessedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAppliedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionEliminatedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionQualifiedEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionRejectedEvent</ListensFor>         
</Listener> 
        
<Listener impl="com.ibm.commerce.marketing.promotion.event.PrintPromotionRASEventListener">            
<Name>PrintRASEventListener</Name>            
<StoreKey>               
<DN>ou=BlueMall B2C Organization,o=Seller Organization,o=Root Organization</DN>               
<Identifier>BlueStore 201</Identifier>            
</StoreKey>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionDebugEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionErrorEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionLogEvent</ListensFor>            
<ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionTraceEvent</ListensFor>         
</Listener>          -->    
     
</PromotionEventListenerRegistry>      
<PromotionExecutionSequenceBuilder impl="com.ibm.commerce.marketing.promotion.runtime.DefaultSequenceBuilder"/>      
<PromotionExecutionAgendaBuilder impl="com.ibm.commerce.marketing.promotion.runtime.DefaultAgendaBuilder">         
<InvocationTemplates>            
<Template>               
<TemplateKey>                  
<StoreKey>                     
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<Name>All Promotions</Name>               
</TemplateKey>               
<MonetaryValuePresence>                  
<Price>true</Price>                  
<ShippingCharge>false</ShippingCharge>                  
<Tax>false</Tax>                  
<ShippingTax>false</ShippingTax>               
</MonetaryValuePresence>               
<PromotionGroupKey>                  
<StoreKey>                     
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<GroupName>ProductLevelPromotion</GroupName>               
</PromotionGroupKey>                
              
<PromotionGroupKey>                  
<StoreKey>                     
<DN>o=root organization</DN> 
                    
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<GroupName>OrderLevelPromotion</GroupName>               
</PromotionGroupKey>                
              
<PromotionGroupKey>                  
<StoreKey>                     
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<GroupName>ShippingPromotion</GroupName>               
</PromotionGroupKey>            
</Template>            
<Template>               
<TemplateKey>                  
<StoreKey>                     
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<Name>Order Level Promotion</Name>               
</TemplateKey>               
<MonetaryValuePresence>                  
<Price>true</Price>                  
<ShippingCharge>false</ShippingCharge>                  
<Tax>false</Tax>                  
<ShippingTax>false</ShippingTax>               
</MonetaryValuePresence>               
<PromotionGroupKey>                  
<StoreKey>                     
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<GroupName>OrderLevelPromotion</GroupName>               
</PromotionGroupKey>            
</Template>            
<Template>               
<TemplateKey>                  
<StoreKey>                     
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<Name>Product Level Promotion</Name>               
</TemplateKey>               
<MonetaryValuePresence>                  
<Price>true</Price>                  
<ShippingCharge>false</ShippingCharge>                  
<Tax>false</Tax>                  
<ShippingTax>false</ShippingTax>               
</MonetaryValuePresence>               
<PromotionGroupKey>                  
<StoreKey>                     
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<GroupName>ProductLevelPromotion</GroupName>               
</PromotionGroupKey>            
</Template>            
<Template>               
<TemplateKey>                  
<StoreKey> 
                    
<DN>o=root organization</DN>                     
<Identifier>NullEntity</Identifier>                  
</StoreKey>                  
<Name>Shipping Promotions</Name>               
</TemplateKey>               
<MonetaryValuePresence>                  
<Price>true</Price>                  
<ShippingCharge>false</ShippingCharge>                  
<Tax>false</Tax>                  
<ShippingTax>false</ShippingTax>               
</MonetaryValuePresence>               
<PromotionGroupKey>               
<StoreKey>                  
<DN>o=root organization</DN> 
                 
<Identifier>NullEntity</Identifier>               
</StoreKey>               
<GroupName>ShippingPromotion</GroupName>            
</PromotionGroupKey>         
</Template>         
<Template>            
<TemplateKey>               
<Name>Order And Product Level Promotion</Name>               
<StoreKey>                  
<DN>o=root organization</DN>                  
<Identifier>NullEntity</Identifier>               
</StoreKey>            
</TemplateKey>            
<MonetaryValuePresence>               
<Price>true</Price>               
<ShippingCharge>false</ShippingCharge>               
<Tax>false</Tax>               
<ShippingTax>false</ShippingTax>            
</MonetaryValuePresence>            
<PromotionGroupKey>               
<StoreKey>                  
<DN>o=root organization</DN>                  
<Identifier>NullEntity</Identifier>               
</StoreKey>               
<GroupName>OrderLevelPromotion</GroupName>            
</PromotionGroupKey>            
<PromotionGroupKey>               
<StoreKey>                  
<DN>o=root organization</DN>                  
<Identifier>NullEntity</Identifier>               
</StoreKey>               
<GroupName>ProductLevelPromotion</GroupName>            
</PromotionGroupKey>         
</Template>      
</InvocationTemplates>   
</PromotionExecutionAgendaBuilder>
</PromotionEngine>


Related concepts

Black box view of the promotion engine's architecture

Promotion engine components

Customize promotions


Related tasks

Configure the promotion engine


+

Search Tips   |   Advanced Search