Extending HCL Commerce with xC extension points

For some parts of HCL Commerce, you can write extension code to extend HCL Commerce controller or task commands. You create extension code in the development environment.

Overview

The term xC stands for externalized customization; customizations that are external to the default HCL Commerce platform logic. The default HCL Commerce code runs on the Transaction server, whereas your custom xC code runs on the Customization server. By isolating your custom code, you can easily and frequently upgrade without worrying about HCL overwriting your code.

IBM provides xC extension points in some HCL Commerce controller commands or task commands in the HCL Commerce Transaction server. You can configure these extension points to run your extension code. Extension code is the custom business logic that you create. Extension points are an optional approach for customizing HCL Commerce. It is recommended that you leverage the xC model to implement simple customizations by using the provided extension points. In some cases, using extension points can be easier to implement than directly customizing a framework or subsystem. For example, HCL provides extension points that make it easy to integrate HCL Commerce with an external tax system or external payment system.

To implement extension code, you need to implement a REST API in the Customization server, which follows the input/output specifications of the xC extension point. After you implement extension code, you need to register the code in the HCL Commerce database so that the HCL Commerce command framework is aware of existing extension code. When a command is called, HCL Commerce checks whether any extension code is assigned to the extension point. If yes, the Transaction server calls out to the Customization server to execute your custom logic. You can configure your extension code to run before (preUE), as a replacement for (replaceUE), or after an existing command (postUE).

You can browse the following section to see if any extension points suit your customization requirements, xC extension points.
Note: HCL Commerce Version 9 supports both the traditional customization model and xC customization model at the same time. If you have customizations in different business logic flows some can be done using one way and some the other, however it is not recommended that you use the two customization models in a single HCL Commerce customization. Trying to use both models increases the complexity in architecture and programming and defeats the purpose of xC separation. For example, the extension point order_item_add_pre supports customizing the order flow to complete an action before an item is added to the cart. But since the extension point cannot access the database, it is not recommended that you customize the OrderItemAdd command to query an external database table and pass to the User Exit (UE) for processing. For more information about developing by using the traditional customization model (local model), see Customizing HCL Commerce.