OrderItemDelete URL
Delete an order item from a pending order.
URL structure
- http:// host_name/ path/
- The fully qualified name of your WebSphere Commerce server and the configuration path.
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.
- storeId
- The store reference number.
- URL
- (Required) The URL to be called when the command completes successfully.
- orderItemId
- (Required) The reference numbers of the items to be deleted from the orders. This parameter is required only if catEntryId is not specified. This parameter can be repeated.
- catEntryId
- The catalog entry ID of the item to be deleted from the order.
- orderId
- Specifies zero or more orders, using order reference numbers or one of the special abbreviations ".", "*", ".t", "*t". See the Order abbreviations for a description of these abbreviations. If this parameter is omitted, it defaults to ".".
- outOrderName
- Name-value pairs to add to the redirection URL. The values of the added name-value pairs are the reference numbers of the input orders.
Example 1
The following example deletes the items that are associated with shipping address number 2 from the customer's order, and then calls the OrderItemDisplay command to re-display the items in the customer's order:
http://myhostname/webapp/wcs/stores/servlet/OrderItemDelete? orderItemId=2&URL=/webapp/wcs/stores/servlet/OrderItemDisplay
Example 2
The following example deletes the items with catalog entry ID of 2 from the customer's current pending orders. The reference numbers of the current pending orders are passed to the OrderItemDisplay command using the orderId parameter.
http://myhostname/webapp/wcs/stores/servlet/OrderItemDelete? &catEntryId=2&orderId=.&outOrderName=orderId&URL=/webapp/wcs/stores/servlet/OrderItemList
Behavior
- De-allocates existing and expected inventory from deleted or canceled OrderItems by calling DoInventoryActionCmd and specifying all the items in the order in the reverseOrderItems parameter.
- Deletes items that have not been released to fulfillment.
- For each of the items to be deleted, the command does the following if orderItemId is specified:
- Obtains the order that the item is in.
- If the order is in either pending or editing state, unlocks it and updates the timestamp.
- The command does the following if catEntryId is specified:
- Compiles the list of orders for processing. The ResolveOrdersCmd task command is invoked to obtain the current pending orders, if needed.
- From the resolved orders, it finds out all the pending or editing order items that contain the specified product.
- For each order which contains the order items searched out, it unlocks the order and updates the timestamp.
- If the order was generated from a quote, the command resets SKIP_REPRICING and PREPAREFLAGS_PRICE_REFRESHED prepare flags in all order items for each order that contains items to be deleted.
- It calls the task command DoInventoryActionCmd with the action "REVERSE_INVENTORY" to reverse inventory for the order items to be deleted.
For each order item to be deleted, if the OrderTrashCan feature is enabled, the order item is collected with other deleted items and sent to the trashcan. The order item's status changes to 'J' . If the OrderTrashCan feature is disabled, the order item is deleted from the database directly. See, Configuring deleting order items and requisition lists.
- It calls the task command PrepareShipInfoCmd to verify the order shipping info.
- It updates the price for the order if the store price refresh flag is 8.
- On successful completion, it calls the specified URL.
Exception conditions
If there are no products or orders match the specified parameters, the command execution fails.
Related concepts
Order Management subsystemRelated reference
Order Management subsystem URLs