OrderItemUpdate command

This command can do all that OrderItemAdd command can do (that is, add products and items into one or more orders into the order list). It can also update OrderItems in an existing order.

Command structure

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

Diagram of the command structure: the command starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the command name, OrderItemUpdate  and the ? character. End the command with a list of parameters in the form of name value pairs. Separate each name value pair with the & character. For a detailed description of the parameters and their values, refer to the list entitled Parameter values.

Parameter values

forUser
The logon ID of the user on whose behalf the command will be run; only a person with the authority to process orders can specify this parameter.
forUserId
Same as forUser, but identifying the user by the internal user ID, as found in the USERS table.
langId
Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
URL
(Required) The URL to be called when the command completes successfully.
orderItemId_i
The identifier of the OrderItem to be updated. If specified, then the catEntryId_i and partNumber_i parameters (for the same value of i) are ignored.
storeId
The store identifier, which is mandatory only if you want to add products or items to the orders. The storeId is required to check if the item is available in the store. If you have specified the storeId once, it is cached for future use.
catEntryId_i
The identifier of a catalog entry to be used to create a new OrderItem.
partNumber_i
If specified, then the catEntryId_i parameter is ignored. When the partNumber_i and memberId_i parameters are specified, they determine a catalog entry by selecting the PARTNUMBER and MEMBER_ID columns in the CATENTRY table. This command behaves as if the identifier for that catalog entry was specified as the value for catEntryId_i.
expandConfigurationId_i
If specified, then add an OrderItem for each component identified by this parameter whose orderItemId attribute is null.
memberId_i
The identifier for the member that owns the catalog where the order will be placed.
attrName_i
Any distinct attribute that is defined for the item. This parameter can be repeated.
attrValue_i
The value of the attribute in attrName. This parameter can be repeated.
quantity_i
The quantity of the item to be added to the order. This parameter is required when catEntryId_i or partNumber_id are specified. It is optional when OrderItemId_i is specified.
UOM_i
The unit of measure for quantity_i. This value should match one of the primary keys in the QTYUNIT table. When it is not specified, then the value of the QUANTITYMEASURE column of the CATENTSHIP table for the row with the same CATENTRY_ID as the OrderItem is used, and the value of the quantity_i parameter is multiplied by the NOMINALQUANTITY column of the same row in the CATENTSHIP table.
addressId_i
The identifier of the address to which the products and items are shipped.
shipModeId_i
The reference number of the shipping mode to be used for the product or item.
comment_i
A Comment to be included with the created or updated order items.
contractId_i
The ID of the contract associated with the order. This parameter can be repeated.
field1_i
A store-reserved integer value.
field2_i
A store-reserved text value. This parameter accepts up to 254 characters.
offerId_i
The ID of the offer associated with the order. This parameter can be repeated.
orderId
This is an internally-generated identifier that specifies zero or more orders to be updated, using order reference numbers or one of the special abbreviations "**", ".", "*", ".t", "*t". See the Order abbreviations for a description of these abbreviations. If no pending orders exist for a particular store, a new pending order will be created. If more than one pending order is specified, order item entries will be created or updated for each of the specified orders.
outOrderName
Specifies the names of name-value pairs to be added to the redirection URL. The values of the added name-value pairs are the reference numbers of the created or updated orders.
outOrderItemName
Specifies the names of name-value pairs to be added to the redirection URL. The values of the added name-value pairs are the reference numbers of the created or updated order items.
listId
The interest item list ID. When you specify this parameter, the OrderItemUpdate command will create a new order which contains all the items in the list. You may use one of the special abbreviations "." and "*". See the Catalog abbreviations for a description.
orderDesc
Specifies the description for the new order created by this command.
continue
Controls whether the order-item update continues when one or more of the order items cannot be created or updated. A value of 0 terminates and rolls back execution if an order item cannot be created or updated in the target order; a value of 1 ignores the create or update operation for that order item and continues execution. The default value is 0.
orderComment
Sets the order comment if specified.
remerge
A list of the OrderItems that should be merged with other OrderItems in the same order and with the same correlationGroup attribute, if possible. OrderItems are not merged unless their InventoryStatus is "NALC", or they are specified by one or more of the allocate, backorder, and reverse parameters. This parameter can be repeated.
merge
A list of OrderItems that should be merged with other OrderItems in the same order if possible, regardless of their correlationGroup attributes. This parameter can be repeated.
check
A list of OrderItems that should be checked by the CheckInventoryAvailability task command. This parameter can be repeated.
allocate
A list of OrderItems that should be allocated from existing inventory. This parameter can be repeated.
backorder
A list of OrderItems that should be allocated from expected inventory if they are not allocated from existing inventory. This parameter can be repeated.
reverse
A list of OrderItems whose allocations should be released (that is, de-allocated from existing or expected inventory as appropriate). This parameter can be repeated.
configurationId_i
If this OrderItem represents a configured Dynamic Kit, this is the configuration ID. This parameter can be repeated. This parameter can be repeated.

Note: The remerge, merge, check, allocate, backorder and reverse parameters are applicable only if ATP inventory is enabled (see the ALLOCATIONGOODFOR column in the STORE table). They represent lists of OrderItems that will be passed to the AllocateInventory task command, which calls the CheckInventoryAvailability, AllocateExistingInventory, AllocateExpectedInventory, DeallocateExistingInventory, and DeallocateExpectedInventory task commands as specified below. Also, these parameters accept OrderItem abbreviations, which are detailed in the help for Order Management subsystem commands.

The default ATP parameter values are as follows:

Example 1

The following example creates a shipping record for one unit of a catalog entry with reference number 18 and has an attribute of monogram CJK. This shipping record is added to the customer's current pending orders. When the command completes, the OrderItemDisplay command is called.

    http://myhostname/webapp/wcs/stores/servlet/OrderItemUpdate?addressId=2
    &catEntryId=18&attrName=monogram&attrValue=CJK&quantity=1&shipModeId=4
    &URL=OrderItemDisplay

Example 2

The following example adds ten units of catalog entry number 2 to all the customer's current pending orders. When the command completes, the OrderItemDisplay command is called.

    http://myhostname/webapp/wcs/stores/servlet/OrderItemUpdate?catEntryId=2
    &quantity=10&orderId=*&outOrderName=orderId&URL=/webapp/wcs/stores/servlet/OrderItemDisplay 

Example 3

The following example updates three OrderItem IDs.

    http://myhostname/webapp/wcs/stores/servlet/OrderItemUpdate?URL=OrderItemDisplay
    &quantity_1=2&quantity_2=7&orderItemId_1=117&orderItemId_2=118
    &orderItemId_3=113&quantity_3=2

Behavior

Exception conditions

Different exception tasks are called depending on the error.