OrderItemSelect URL

This URL creates or updates order items in a quotation-selection order according to specified quantities for specified parent or quotation order items.

URL structure

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

Parameter values

quotationStoreId_ i
Specifies the stores for which quotation selection orders should be created or updated as specified by the orderItemId_ i parameter.
quotationContractId_ i
The default contract for the store indicated by quotationStoreId_ i. The contracts for which quotation selection orders should be created or updated as specified by the orderItemId_ i parameter. Ignored if quotationStoreId_ i is not specified.
orderId_ i
Used to resolve OrderItemId_ i abbreviations specified by the orderItemId_ i parameter.
orderItemId_ i
The OrderItems to be copied to selection orders. OrderItems that are in quotation orders are copied to selection orders for their parent orders, in the same store and using the same contract as their quotation OrderQuotationRel objects. OrderItems that are not in quotation orders are copied to selection orders for themselves, in the stores and using the contracts specified by the quotationStoreId_ i and quotationContractId_ i parameters.
quantity_ i
If the corresponding UOM_ i is not specified, the quantity attribute of the corresponding OrderItem specified by OrderItemId_ i. Otherwise, the actual quantity of the corresponding OrderItem specified by OrderItemId_ i, converted to the unit of measure specified by the corresponding UOM. The quantities to be set in the shop cart's quotation selection orders for each of the items specified by orderItemId_ i.
UOM_ i
Specifies the units of measure for the quantities specified by quantity_ i.
outSelectionOrderQuotationRelIdName
Specifies the name-value pairs that should be added to the redirection URL. The values of the added name-value pairs are the identifiers of the OrderQuotationRel objects with relType `selection' whose quotation selection orders were created or updated.
URL
Specifies the redirection URL that is returned if the command completes successfully.

Behavior

For each OrderItem specified by the orderItemId_ i parameter:

  1. Determine the parent order and applicable store and contract pairs:
    1. If the order of the OrderItem is a child order for an OrderQuotationRel object, the parent order is indicated by the parentId attribute of the OrderQuotationRel object, and the applicable store and contract pair is indicated by the childStoreId and tradingAgreementId attributes.
    2. Otherwise, the parent order is the order of the OrderItem, and the applicable store and contract pairs are the store and contract pairs indicated by the quotationStoreId_ i and quotationContractId_ i parameters.
  2. If the parent order does not have status attribute P, I, E, W, or N, throw an exception and rollback.
  3. Determine the applicable selection OrderQuotationRel objects (one for each applicable store and contract pair) with relType `selection' where the childStoreId and tradingAgreementId attributes indicate one of the applicable store and contract pairs, and the parentId attribute indicates the parent order. If any of these selection OrderQuotationRel objects do not yet exist, create them.
  4. For each applicable selection OrderQuotationRel object:
    1. If the selection OrderQuotationRel object does not specify a child quotation order, create an order in the store indicated by the childStoreId attribute of the selection OrderQuotationRel object. When creating the order, copy order level information from the parent shop cart order. Set the order status attribute to P.
    2. Delete (reversing any backorders or allocated inventory) all OrderItems from the child Order indicated by the selection OrderQuotationRel object where:
      1. status attribute is P, I, E, W, or N and the fulfillmentStatus is INT.
      2. CatalogEntryId is the same as for the specified OrderItem.
      3. specifiedItemId is the same as for the specified OrderItem.
      4. correlationGroup is the same as for the specified OrderItem.
      5. supplierPartNumber is the same as for the specified OrderItem.

    For each OrderItem specified by the orderItemId_ i parameter where the value of the quantity parameter is greater than zero:

    1. For each applicable selection OrderQuotationRel object:
      1. Copy the OrderItem to a new OrderItem in the quotation selection Order indicated by the selection OrderQuotationRel object:
      2. Set the quantity_ i to the quantity specified by the quantity_ i and UOM_ i parameters. Re-calculate and set the neededQuantity.
    2. If the prepareFlags attribute of the OrderItem indicates `quotation' and the storeId and tradingAgreementId attributes indicate the same Store and TradingAgreement as the childStoreId and tradingAgreementId attributes of the OrderQuotationRel object:
      1. Set the prepareFlags attribute to indicate `quotation'.
      2. Copy the tradingAgreementId attribute.
      3. Copy the basePrice and baseCurrency attributes if they are not null.
      4. Set the price attribute, converting it if necessary. If conversion is necessary:
        1. If the basePrice and baseCurrency are not null in the OrderItem, convert them to arrive at the price.
        2. If the basePrice and baseCurrency are null in the OrderItem, convert the price attribute to arrive at the price in the new OrderItem, and copy the price and currency to the basePrice and baseCurrency attributes in the new OrderItem.
        3. Set the OrderItem status attribute to be the same as its order status.
        4. Obtain values for other OrderItem attributes by either copying them from the specified OrderItem or accepting their default values, as appropriate. Attributes to copy include but are not limited to correlationGroup, supplierData, shipping address, estimatedAvailabilityTime, and shippingOffset. The supplierData, estimatedAvailabilityTime, and shippingOffset attributes should not be copied unless the storeId and tradingAgreementId attributes indicate the same Store and TradingAgreement as the childStoreId and tradingAgreementId attributes of the OrderQuotationRel object.
    3. Finally, redirect to the URL specified by the URL parameter, appending name value pairs as specified by the outSelectionOrderQuotationRelIdName parameter.

Exception conditions

None.