OrderItemMove URL

Split or merge an order by moving items from one order to another order.

URL structure

http:// host_name/ path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

This diagram displays the structure for the OrderItemMove URL.

Parameter values

fromOrderItemId
The input OrderItems. Any OrderItems not in the orders specified by the fromOrderId parameter are ignored. OrderItem abbreviations are resolved using the orders specified by fromOrderId. This parameter can be repeated.
fromOrderId
The orders from which OrderItems will be moved. This parameter is used to resolve OrderItem abbreviations specified in fromOrderItemId.
toOrderId
Indicates a destination order for the output OrderItems. If this parameter is not specified, it means there is no output order, and the input OrderItems will be simply removed from the source order specified by the fromOrderId parameter.
URL
Required: The URL to be called when the command completes successfully.
createIfEmpty
The valid value of this parameter is 1 or 0. The default value is 0. If the parameter createIfEmpty is specified to 1 and there is no transferred order items, a new empty order will be created when either the toOrderId parameter is ** or the toOrderId parameter is .**. but there is no current pending order. The symbol "**" means to create new pending order; the symbol ".**." means to create new pending order if there are no pending orders currently.
deleteIfEmpty
Specifies that orders should be deleted if no OrderItems remain in them after this command completes processing. Set the value of this parameter to * to delete orders.
inOrderName
Specifies the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an input order. This parameter can be repeated.
outOrderName
Specifies the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an output order. This parameter can be repeated.
outOrderItemName
Specifies the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an output OrderItem. This parameter can be repeated.
inRemerge
A list of the OrderItems that should be merged with other OrderItems in the same order and with the same correlationGroup attribute, if possible. This parameter can be repeated.
inMerge
A list of OrderItems that should be merged with other OrderItems in the same order if possible, regardless of their correlationGroup attributes. The value of each OrderItem is the reference number of an input order. This parameter can be repeated.
inCheck
A list of OrderItems that should be checked on inventory. The value of each OrderItem is the reference number of an input order. This parameter can be repeated.
inAllocate
A list of OrderItems that should be allocated from existing inventory. The value of each OrderItem is the reference number of an input order. This parameter can be repeated.
inBackorder
A list of OrderItems that should be allocated from expected inventory. The value of each OrderItem is the reference number of an input order. This parameter can be repeated.
inReverse
A list of OrderItems whose allocations should be released (that is, de-allocated from existing or expected inventory as appropriate). The value of each OrderItem is the reference number of an input order. This parameter can be repeated.
outRemerge
A list of the OrderItems that should be merged with other OrderItems in the same order and with the same correlationGroup attribute, if possible. The value of each OrderItem is the reference number of an output order. This parameter can be repeated.
outMerge
A list of OrderItems that should be merged with other OrderItems in the same order if possible, regardless of their correlationGroup attributes. The value of each OrderItem is the reference number of an output order. This parameter can be repeated.
outCheck
A list of OrderItems that should be checked on inventory. The value of each OrderItem is the reference number of an output order. This parameter can be repeated.
outAllocate
A list of OrderItems that should be allocated from existing inventory. The value of each OrderItem is the reference number of an output order. This parameter can be repeated.
outBackorder
A list of OrderItems that should be allocated from expected inventory. The value of each OrderItem is the reference number of an output order. This parameter can be repeated.
outReverse
A list of OrderItems whose allocations should be released (that is, de-allocated from existing or expected inventory as appropriate). The value of each OrderItem is the reference number of an output order. This parameter can be repeated.
moveAutoAddedOrderItems
The default value for this parameter is 0. This parameter means that the auto added order items such as a free gift will be moved.
moveOrderPromotionCode
The default value for this parameter is 0. The valid values for this parameter are 1 and 0. If a value of 1 is specified, the promotion code will be merged into the target order. This parameter is supported in Fix Pack 4 or higher.
refreshContractAndOffer
The default value for this parameter is 1. The valid values for this parameter are 1 and 0. If a value of 1 is specified, the price information for all of the order items is refreshed. This parameter is supported in Fix Pack 3 or higher.
doInventory
The default value for this parameter is Y. The valid values for this parameter are Y and N. If a value of N is specified, the inventory action will not be performed. This parameter is supported in Fix Pack 5.

Example 1

The following example first creates a new order containing all unallocated or backordered OrderItems presently in orders 123 and 456, and then displays orders 123 and 456, and the new order.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderId=123
&fromOrderId=456&fromOrderItemId=*ub&toOrderId=**&inOrderName=orderId&outOrderName=orderId
&URL=/webapp/commerce/OrderDisplay

Example 2

The following example first creates a new order containing all OrderItems in orders 123 and 456 that are not allocated, and any other OrderItems with the same CorrelationGroup attribute, and then displays orders 123 and 456, and the new order.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=*ug
&fromOrderItemId=*bg&fromOderId=123&fromOrderId=&456&toOrderId=**&inOrderName=orderId
&outOrderName=orderId&URL=/webapp/commerce/OrderDisplay

Example 3

The following example first creates a new order containing all unallocated amounts in orders 123 and 456 for OrderItems whose items are not discontinued, and then displays orders 123 and 456, and the new order.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=*cub
&fromOderId=123&fromOrderId=&456&toOrderId=**&inOrderName=orderId
&outOrderName=orderId&URL=/webapp/commerce/OrderDisplay

Example 4

The following example first removes unallocated OrderItems in orders 123 and 456 for discontinued items, and then displays orders 123 and 456.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=*dub
&fromOderId=123&fromOrderId=&456&inOrderName=orderId&URL=/webapp/commerce/OrderDisplay

Example 5

The following example first creates a new order containing all OrderItems in orders 123 and 456 for OrderItems that are not validly allocated and not validly backordered and whose items are not discontinued and an other OrderItems with the same CorrelationGroup attribute, and then displays orders 123 and 456, and the new orders.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=*igc
&fromOderId=123&fromOrderId=&456&toOrderId=**&inOrderName=orderId&outOrderId=orderId
&URL=/webapp/commerce/OrderDisplay

Example 6

The following example first removes discontinued OrderItems and any other OrderItems with the same CorrelationGroup attribute from orders 123 and 456 if they are not validly backordered, and then displays orders 123 and 456.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=*igd
&fromOderId=123&fromOrderId=&456&toOrderId=**&inOrderName=orderId
&URL=/webapp/commerce/OrderDisplay

Example 7

The following example first merges, into an existing order called 789, all the OrderItems in orders 123 and 456 for OrderItems that are not validly allocated and not validly backordered and whose items are not discontinued, and then displays orders 123, 456, and 789.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=*ic
&fromOderId=123&fromOrderId=&456&toOrderId=&789&inOrderName=orderId&outOrderName=orderId
&URL=/webapp/commerce/OrderDisplay

Example 8

The following example first removes discontinued OrderItems from orders 123 and 456 if they are not validly allocated and are not validly backordered, and then displays orders 123 and 456.


    
http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=*id
&fromOderId=123&fromOrderId=&456&inOrderName=orderId&URL=/webapp/commerce/OrderDisplay

Example 9

The following example first creates a new order and moves OrderItems 1001 and 1004 to the new order. They will be merged in the new order if possible (to prevent merging, you can also specify outMerge=*n), and then displays affected orders.

http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=1001
&fromOrderItemId=1004&&toOrderId=**&outMerge=**&inOrderName=orderId&outOrderName=OrderId
&URL=/webapp/commerce/OrderDisplay

Example 10

The following example first moves OrderItems 1002 and 1003 to order 1001. They will be merged in the OrderItems of order 1001 if possible (to prevent merging, you can also specify outMerge=*n), and then displays affected orders.

http://myhostname/webapp/wcs/stores/servlet/OrderItemMove?fromOrderItemId=1002
&fromOrderItemId=1003&&toOrderId=1001&outMerge=**&inOrderName=orderId&outOrderName=OrderId
&URL=/webapp/commerce/OrderDisplay

Behavior

  • Used to move OrderItems from one or more input orders to an output order.
  • When a new order is created, order level information such as payment information and billing address are copied from one of the corresponding input orders.
  • If the moveOrderPromotionCode parameter is set to 1, the order promotion codes will be merged into the output order. If this parameter is set to 0 or is not specified, the order promotion codes will not be merged.
  • OrderItems are moved by creating new OrderItems in the output order and copying OrderItem level information such as CorrelationGroup, ShippingAddress, ShippingMode, Offer, Contract, CatalogEntry, ItemSpec, Quantity, and NeededQuantity from the input OrderItem to the output OrderItem. The input OrderItem is deallocated and deleted from the input order. If the output order for an input OrderItem is the same as its input order, no change is made. If the refreshContractAndOffer parameter is set to 1 or is not specified, all of the price information for the order item in the output order will be refreshed. If the parameter is set to 0, only the price of the moved order item is refreshed.
  • If any orders are changed, they are "unlocked" so that OrderPrepare will be called by OrderDisplay the next time it is used to display any of those orders.
  • If the doInventory parameter is set to N, the inventory action will not be performed in the command. If this parameter is set to Y or is not specified, the DoInventoryActionCmd is called for the input orders, and then for the output orders if it is not also an input order. The input orders are the orders specified by the fromOrderId parameter. The output order is the order specified by the toOrderId parameter. The purpose of calling DoInventoryActionCmd is to provide a way to transfer allocations from the input order to the output order. Since the calls are done in the same transaction, any allocations released in this transaction will be available only to subsequent allocation requests made in the same transaction.
  • Orders whose OrderItems are all deleted are deleted if they are listed in the deleteIfEmpty parameter. Otherwise, they are not deleted, but do remain as empty orders.
  • While using a two-tier machine to run OrderItemMove command, it has to be noted that it uses the WebSphere Commerce Server timestamp in orderItemMoveCmdImpl for the estimated ship date. The command will then resolve all existing future orderitems using the query,
    orderitems.ESTAVAILTIME>current_timestamp
    
    with the current timestamp, which is the database current timestamp. Herein, all available orderitems will be treated as future orders. In such a scenario, the command gives an error
    
    ERR_MISSING_ORDERITEMS.
    
    This error can be avoided if we set the same timestamp in both WebSphere Commerce Server and database node.

Exception conditions

None.