SetPendingOrder command

This command sets a pending order as the current pending 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, SetPendingOrder  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.
storeId
The reference number of a store.
URL
(Required) The URL to be called when the command completes successfully.
orderId
Specifies an order using the order reference number or one of the Order abbreviations ".", "*", ".t", "*t". This parameter can be repeated.
  • If the parameter is omitted, nothing will be set current and all pending orders that have been marked current, for the specified store, will be unmarked.
  • If a specified pending order no longer exists, it is not set current.
outOrderName
Specifies names of name-value pairs to be added to the redirection URL specified by the URL parameter. This parameter can be repeated.

Example 1

For the customer that runs this command, the example marks all pending orders to current. The reference number of the pending orders that have been set current are added to the redirection URL under the name of orderId. When the command completes, it calls the OrderItemDisplay command.

    http://myhostname/webapp/wcs/stores/servlet/SetPendingOrder?orderId=*
    &outOrderName=orderId&URL=/webapp/wcs/command/OrderItemDisplay

Example 2

In this example, we first use OrderItemAdd to an an order. This creates an order and gets an orderId (assume it is 112) from the ORDERS table. We then set this pending order to the current pending order. 

     http://myhostname/webapp/wcs/stores/servlet/OrderItemAdd?catEntryId=322200305
     &quantity=1&URL=OrderItemDisplay&orderId=** 
     http://myhostname/webapp/wcs/stores/servlet/SetPendingOrder?orderId=112&URL=OrderItemDisplay

Behavior

Calls the SetCurrentPendingOrdersCmd task command and passes to it the numbers of the pending orders that are to be marked current. 

Exception conditions

If the order is not found then an application exception is raised.