OrderItemDisplay URL
Lists all order items that are in pending state.
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 another user on whose behalf the command will be run. Only a person with the authority to to perform the "becomeUser" action on this command can specify this parameter and run the OrderItemDisplay command on behalf of another user.
- 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 the store for the orders to list. If you omit this parameter, the session storeId is used. It is an error if you omit this parameter and there is no storeId in the session.
- orderId
- Specifies zero or more orders, using order reference numbers or one of the following special abbreviations: ".", "*", ".t", or "*t". See Order abbreviations for a description of these abbreviations. If this parameter is omitted, the default is "*". The specified orders must belong to the specified store. (Otherwise, the ResolveOrdersCmd task command will throw an ECApplicationException specifying the _ERR_INVALID_ORDER_REFNUM error message.) This parameter can be repeated.
- outOrderName
- Names of name-value pairs to be added to the response properties passed to the view command. The value of each added name-value pair is an array of the reference numbers of the specified orders. If this parameter is omitted, its value defaults to "orderId". This parameter can be repeated.
- addressId
- The reference number of the address for the items to display. If this parameter is omitted, all order items for the specified orders are displayed.
- remerge
- A list of the order items that should be merged with other order items in the same order and with the same correlationGroup attribute if possible. This parameter can be repeated.
- merge
- A list of order items that should be merged with other order items in the same order if possible, regardless of their correlationGroup attributes. This parameter can be repeated.
- check
- A list of order items that should be checked by the CheckInventoryAvailabilityCmd task command. This parameter can be repeated.
- allocate
- A list of order items that should be allocated from existing inventory. This parameter can be repeated.
- backorder
- A list of order items that should be allocated from expected inventory. This parameter can be repeated.
- reverse
- A list of order items whose allocations should be released (that is, de-allocated from existing or expected inventory as appropriate). This parameter can be repeated.
doPrice
Specifies whether the command should perform the price calculation subtasks. Set to either do the price tasks (Y), or not (N). Turning off these tasks might result in better performance, but customers might not get the most current price, or product entitlement, when changes occur.
doInventory
Specifies whether the command should perform the inventory calculation subtasks. Set to either do the price tasks (Y), or not (N). Turning off these tasks might result in better performance, but customers might not get the most current inventory level, when changes occur.
The remerge, merge, check, allocate, backorder and reverse parameters are applicable only if ATP inventory is enabled. (See the INVENTORYSYSTEM column in the STORE table.) They represent lists of order items that will be passed to the DoInventoryAction task command which calls AllocateInventoryCmd task command, which invokes the CheckInventoryAvailabilityCmd, AllocateExistingInventoryCmd, AllocateExpectedInventoryCmd, DeallocateExistingInventoryCmd, and DeallocateExpectedInventoryCmd task commands as specified below. Also, these parameters accept OrderItem abbreviations, which are detailed in the help for Order Management subsystem URLs.
The default ATP parameter values are as follows:
- remerge=*n
- merge=*n
- check=***
- allocate=*n
- backorder=*n
- reverse=*n
Example 1
The following example displays all the products and items that correspond to address reference number 2 and all the customer's pending orders. The reference numbers of these orders are passed to the OrderItemDisplay command using the orderId parameter.
http:// myhostname/webapp/wcs/stores/servlet/OrderItemDisplay?addressId=2
Example 2
The following example first creates a new order with a single item using the OrderItemAdd command then displays the shipping details for the items.
http:// myhostname/webapp/wcs/stores/servlet/OrderItemAdd?catEntryId=322200305 &quantity=1&orderId=**&URL=OrderItemDisplay
Example 3
The following example shows how to use doPrice and doInventory parameters. In this example, order item prices are not refreshed if the item is not expired, and inventory actions are not performed.
http:// myhostname/webapp/wcs/stores/servlet/OrderItemDisplay?orderId=1234 &storeId=10001&catalogId=10001&doPrice=N&doInventory=N
Behavior
- The ResolveOrdersCmd task command is invoked to evaluate any abbreviations specified by the orderId parameter.
- The ResolveOrderItemsCmd task command is invoked to evaluate any abbreviations specified by the ATP parameters.
- If the addressId parameter is specified and if the address that it specifies belongs to the user executing the command, the addressId parameter is set in the response properties with the address identifier of the address belonging to the same user with status "P" and the same nickname.
- If the shipping addresses of the specified order items (see the addressId parameter) belong to the user executing the command, they are refreshed with the identifiers of the addresses belonging to the same user with status "P" and the same nicknames. For registered users, the shipping addresses of order items with no address are set to indicate the address with status "P" belonging to the user, and with a nickname the same as the value for the user of the LOGONID column of the USERREG database table, if such an address exists. If there is no such address, then set the addressId to null for this order item.
- Call the CheckAndResetOrderItemPriceFlagCmd task command to check and reset the PREPAREFLAGS_PRICE_REFRESHED bit flag of each order item if its created time has been expired.
- If store price is 8, for each order item, if the PREPAREFLAGS_PRICE_REFRESHED price bit flag is 0, update the price and then sets the flag to 1; if the flag is 1 and doPrice is N, this order item price is not refreshed.
If store price is 0, 1, 2 or 4, for each order item, if the flag is 0 or the item's last update item has been expired, update the price and set the flag to 1; if the flag is 1 and doPrice is N, the price is not refreshed; if the flag is 1 and doPrice is Y, which is the default value, then update the price if the order item last update time has been expired. An order item price is considered expired if more than the number of seconds specified in the QUOTEGOODFOR column of the STORE database table have passed since the order item was most recently updated, according to the LASTUPDATE column of the ORDERITEMS database table. However, prices of order items are not refreshed if their PREPAREFLAGS attribute values indicate that their prices were manually overridden, generated, or obtained from quotations. One of the following methods is used to refresh the prices:
- If the GetContractUnitPriceCmd task command is defined in the CMDREG database table, it is called to obtain the contract price using the trading agreements (contracts) indicated by the PRICEREFFLAGS column of the STORE database table.
- Otherwise, the GetBaseUnitPriceCmd task command is called to obtain the price using the trading agreement specified by the TRADING_ID column of the ORDERITEMS database table.
- The returned price is stored in the CURRENCY and PRICE columns of the ORDERITEMS database table. If the price resulted from a conversion from a different currency, the price from which it was converted is stored in the BASECURRENCY and BASEPRICE columns.
- Prices for order items with component items (those whose CONFIGURATIONID column indicates a non-null value and whose PREPAREFLAGS column does not indicate "notConfigured") are determined by adding the prices for each component item (in the OICOMPLIST database table), first multiplying each such price by the component CATALOGQUANTITY value. When a component item does not explicitly specify a price, its price is determined in the same way as for an order item with no components, except that once the contract of the first component item is determined, that same contract will be used to retrieve the prices of any remaining component items for the same order item.
- The trading agreements of all order items in the specified orders (see the orderId parameter) are checked to ensure they define compatible payment methods and are associated with the same account.
- If the doInventory parameter is set to Y, and ATP inventory is enabled (see the INVENTORYSYSTEM column in the STORE table), the DoInventoryActionCmd task command is called for each specified order to perform the ATP inventory operations specified by the remerge, merge, check, allocate, backorder, and reverse parameters. Otherwise, if ATP inventory is not enabled, the CheckInventoryCmd task command is called for each order to make sure there is still sufficient inventory for each order item at their assigned fulfillment centers.
If that task command throws an ECApplicationException exception with error message key _API_BAD_INV, indicating insufficient inventory for some order items, then the ResolveFulfillmentCenterCmd task command is called to re-assign fulfillment centers to the order items. If that task command throws an ECApplicationException exception with error message key _ERR_CANT_RESOLVE_FULFILLMENTCENTER, indicating that it is unable to assign fulfillment centers with sufficient inventory to certain order items, name-value pairs named "errorOrderItemId" whose values are the order item reference numbers of those order items are added to the response properties.
- If addressId is specified, the command sets the OrderItemDisplayViewShiptoDsp view command to display a specific shipping details page; otherwise, it sets the OrderItemDisplayViewShiptoAssoc view command to display a general shipping details page.
- Name-value pairs are added to the response properties as specified by the outOrderName parameter.
Exception conditions
- If the specified address reference number does not refer to an existing address object in the ADDRESS database table, the command throws an ECApplicationException with error message _ERR_INVALID_ADDR and error view GenericApplicationError.
- If the PRICEREFFLAGS of the STORE database table indicates that none of the trading agreements for an order item are available to the user of the order item, the command throws an ECApplicationException with error message _ERR_NO_ELIGIBLE_TRADING and error view GenericApplicationError.
- If the task command did not return a price for an order item, the command throws an ECApplicationException with error message _ERR_RETRIEVE_PRICE and error view GenericApplicationError.
- If an order item specifies a configurationId but there are no components in the OICOMPLIST database table with that configurationId for the order item, the command throws an ECApplicationException with error message _ERR_INVALID_COMPONENT_LIST and error view GenericApplicationError.
- If the task command did not return a price for an order item component or an order item component specifies a price in a currency that is different from (and not convertible to) the currency of the order item, the command throws an ECApplicationException with error message _ERR_COMPONENT_PRICE_CALCULATION and error view GenericApplicationError.
- If order items have trading agreements that specify payment methods incompatible with those of other items in the order or that specify accounts that are different from those of other items in the order, the command throws an ECApplicationException with error message _ERR_TRADINGS_INCOMPATIBLE_ACCOUNT_PAYMENT and error view InvalidInputErrorView.
Related concepts
Order Management subsystemRelated reference
Order Management subsystem URLs