Develop > Presentation layer > Customize promotions > Promotion engine customization
Customization scenarios
You can customize various aspects of the promotions component, from creating a new promotion type to changing the way the agenda builder selects potentially applicable promotions for evaluation.
Customization implicitly references the set of features that are currently available by default in WebSphere Commerce. There are two types of customization in that context:
- The first type is effectively a configuration more than a customization. This type includes setting up custom groups, templates, associating existing policies to groups, and creating new promotion types using existing components.
- The second type requires Java code to be written. An implied step in the second type of customization is that all of the new or changed Java code must be available on the classpath of the WebSphere Commerce Server in order for the Java Virtual Machine class loader to load the customized code properly.
User interface customization is not discussed in these scenarios.
- Customize promotion organization
If the default promotion groups (order level, product level and shipping) do not meet the business needs, you can customize the promotion organization. Specifically, you can create custom groups that are different than the default groups, so that promotions in the new groups are governed by different policies. This customization should occur during store setup. This process includes incorporating the new promotion groups in an invocation template, and associating policies to the new groups.
- Customize the agenda builder
To change the default logic that selects potentially applicable promotions for evaluation, or to improve system performance by screening promotions prior to evaluation to reduce the number of promotions to be evaluated at runtime, you can customize the agenda builder. A WCS instance has only one agenda builder. Customizations apply to all stores in the same instance.
- Customize the promotion sequence builder
If the current sequence building rules for promotion evaluation do not meet the business requirements, you can customize the sequence builder. A WCS instance has only one sequence builder. Customizations apply to all stores in the same instance.
- Custom promotion policies
The promotion engine is configured with a set of default promotion policies that enforce rules related to promotion exclusivity, combining promotions, redemption limits, and so on. If the default set of promotion policies do not satisfy the business needs, you can implement custom promotion policies.
- Customize the promotion code manager
You can customize how the promotion engine resolves promotion codes to promotions. In addition, you can customize how promotion codes are applied so that a single field in a shopping cart accepts only one promotion code. This means that when multiple promotion codes exist for an order, only the promotion code entered most recently will be applied to the order while all others will be deleted. Without customization, all the promotion codes will be accumulated and will be applied in total.
- 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.
- Customize persistence management
The promotion engine's persistence management implementation consists of seven persistence managers for seven types of objects.
- Overview of creating a new promotion type using existing promotion elements
Add a custom promotion type to WebSphere Commerce Accelerator by reusing elements of the default promotions to simplify the customization. This can save a lot of time compared with implementing something entirely new.
Related concepts