Concept - cXML Order Injection

Product Version


Product To Version



1 Introduction

cXML Order Injection describes the receiving and handling of a cXML order request, generally sent from a procurement system. After receiving a cXML file, it is parsed, a basket is created with certain values from the cXML file, and an order is created.

1.1 References

2 General Concept

This feature is very flexible and will most likely be implemented differently in every project. Therefore, one of the main goals for this implementation was the exchangeability and extensibility of the provided functionality. To achieve this, the handler chain framework has been chosen. This allows projects to easily extend, replace, or remove standard functionality.

Before the handler chain is being executed, ICM receives the cXML via a pipeline call and tries to determine the version of the cXML file evaluating the cXML DOCTYPE tag. If the version cannot be determined, the registered default handler chain will be used, in standard case the CXMLOrderInjectionChainV2. The handler chain manages everything else, like unmarshalling the provided cXML, checking user credentials, creating a basket, mapping different values to the basket, and finally creating the order. In any case, a response will be sent, either including a success message or some information about any problems that occurred, based on the cXML Standard.

3 Handler Chain

There are two main chains implemented in the standard implementation and several handlers. Some of the handlers are version-independent, and some work with version-specific classes. This can be differentiated by the package name. Version-independent handlers can easily be reused in a different chain for a new version.

The first is PreCXMLOrderInjectionChainV2. It handles all kinds of preparation to place the order later. Currently (7.10.31) implemented handlers are:

Name of HandlerDescription


ParseCXMLOrderInjectionHandlerHandler that parses the input stream to an

Handler that checks if the user data sent in the cXML Header are valid.

MapBasketCXMLOrderInjectionHandlerHandler that maps the cXML OrderRequest to a basket.yes
MapLineItemsCXMLOrderInjectionHandlerHandler that adds items from a cXML order request to a

Handler that adds a shipping method to the basket from cXML.

MapOrderAddressesCXMLOrderInjectionHandlerHandler that adds an invoice address and shipping address for the whole order if specified in the

Handler that sets the configured payment method at the basket.

PrepareBasketForOrderCreationCXMLOrderInjectionHandlerHandler that prepares a basket for the order creation by validating and calculating.yes

The second chain CreateOrderCXMLOrderInjectionChainV2 creates the actual order and has only one handler:

Name of HandlerDescriptionVersion-independent

Handler that creates an order from a basket, which was created from a cXML order request.


In a development environment the actual loaded handlers can be checked via a pipeline call to InspectHandlerChains-Start, like https://<yourServer>/INTERSHOP/web/WFS/inSPIRED-inTRONICS_Business-Site/en_US/-/USD/InspectHandlerChains-Start.

If there is a failure in any of the handlers, the chain will be rolled back. In standard implementation that means the reverseInvoke() from MapBasketCXMLOrderInjectionHandler will be called, which moves the basket into the basket history.

4 Versioning

The cXML order injection feature released with 7.10.31 is based and tested on cXML Version 1.2.049. In ICM, the implemented cXML feature is referred to as V2.

Other minor cXML versions will most likely work with V2 as well but that has not been tested.

If another feature version is needed, this can be done by implementing a new handler chain for the according version and registering it via Guice. Please refer to Cookbook - cXML Order Injection | Recipe: How To Support Another Version of cXML.

5 Testing offers a testing tool for your environment.

If your environment is only available internally, you can follow Cookbook - cXML Order Injection | Recipe: How To Test My System.


The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources