This command moves OrderItems in one order to another order.
Command structure
- http://host_name/path/
- The fully qualified name of your WebSphere Commerce Server and the configuration path.
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. This parameter can be repeated.
- URL
- (Required) The URL to be called when the command completes successfully. This parameter can be repeated.
- deleteIfEmpty
- Specifies that orders should be deleted if no OrderItems remain in them after this command completes processing.
- 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 by the CheckInventory task command. 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 by the CheckInventory task command. 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.
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 &fromOderId=456&fromOderItemId=*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 &fromOderItemId=*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.
- AllocateInventory is called first 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 AllocateInventory 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.
- 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.
- 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. Then the input OrderItem is de-allocated 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 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.
- 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.
Exception conditions
None.