The entire cloning process is facilitated by a pair of pipelines or chains. One chain prepares the order for editing by creating the clone copy. Another chain reconciles the changes with the original order when everything is committed by the agent.
These two chains are executed based on the state of the order. For example, different chains could be defined for handling orders in different states. CSC provides one set of chains for handling all orders is a submitted
state as defined by the submitted order states configured in CSRAgentTools
. These two chains can be modified using standard configuration override techniques.
The CloneEditManager
component contains the configuration for mapping order states to the chain names using properties named initializeEditChains
and reconcileOrderChains
.
The following describes each link in the two chains.
Chain: | ||||
Link | Processor Component | Description | ||
|
| Performs the cloning of the order at the repository level and creates the Commerce objects from the newly created order item by calling | ||
|
| Validates the clone order after it has been created. | ||
|
| Initializes a state object based on the two orders, which is used to later reconcile the changes back to the original order. | ||
Chain: | ||||
|
| Prepares the state object for reconciliation. | ||
|
| Copies the changes to the original order based on the contents of the clone order and information stored in the clone edit state object created in the initialization pipeline. | ||
|
| Executes the core commerce process that validates the original order for checkout. | ||
|
| Executes the core commerce process that removes empty shipping groups from the original order. | ||
|
| Executes the core commerce process that removes empty payment groups from the original order. | ||
|
| Executes the core commerce process that creates implied relationships between commerce objects in the original order. | ||
|
| Executes the core commerce process sets the amount of the payment groups based on relationship in the original order. | ||
|
| Executes a process that adjusts for the authorized amounts of the payment groups in the original. (e.g. new payment groups are authorized and changed payment groups have their authorized amounts adjusted. | ||
|
| Calls | ||
|
| Reconciles gift list quantities for changes made to the original order. | ||
|
| Consumes coupon promotions that may have been claimed and used during the edit process. | ||
|
| Sends the core commerce | ||
|
| Sends fulfillment JMS events for each change applied to the original order. | ||
|
| Sends agent audit events for each change made to the original order. |