Develop > Presentation layer > Customize promotions > Promotion engine customization > Customization scenarios
Customize external entity dependencies
The external entities of the promotion component might not expose sufficient attributes to support the promotions. In this case, introduce additional attributes.
CAUTION:
Dynamic attribute support has not undergone vigorous testing. While it is supported, it may generate unexpected results.
In the promotions system, external entities are implemented using the following pattern (using order as an example):
Procedure
To introduce a custom attribute:
- Extend the WCSOrder object so that the new class exposes the new attribute.
- Extend the WCSOrderFactory class so that the new implementation starts to serve up the extended WCSOrder objects
- Implement the custom OrderFactory implementation class.
- Register the custom implementation in the ExternalEntityFactoryRegistry section of the PromotionEngine configuration.
- Restart WebSphere Commerce so the changes take effect.
Related concepts
Black box view of the promotion engine's architecture
Related reference