Reference > Shop flow URLs > Order Management subsystem URLs > Order quotation URLs
OrderQuotationRequest URL
Submits requests for quotation orders to one or more quote-enabled stores for items in specified orders. Any existing quotation orders for the specified orders from any of the specified fulfillment centers are deleted. (Use the OrderQuotationCheck controller command to check to see if all the requested quotation orders have been received.)
You cannot use this command with static and dynamic kits.
URL structure
- http:// host/ path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path.
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
Parameter values
- quotationType
- Specifies the type of quotation requested, "initial" or "final". The default value of this parameter is "initial".
- orderId
- Specifies the shopcart for which quotations are to be requested. The default value of this parameter is ".". This parameter can be repeated.
- deleteOrderQuotationRelId
- Specifies the OrderQuotationRel objects to be deleted (along with their child orders) if their type is "initial", "final", or "selection" and if their parent orders are one of the shopcarts specified in the orderId parameter. The default value of this parameter is "*n". This parameter can be repeated.
- quotationStoreId_ i
- Specifies a store from which quotations are to be requested. Stores that are not quote-enabled under the contract specified by the quotationContractId_ i parameter for the current user in the current store are ignored.
- quotationContractId_ i
- Specifies a contract containing a ReferralInterfaceTC that indicates a PolicyCommand to be used to obtain a quotation. A system exception is thrown if a specified contract does not contain such a ReferralInterfaceTC or is not deployed in the store indicated in quotationStoreId_ i. This parameter is ignored if quotationStoreId_ i is not specified.
- quotationUserId_ i
- Specifies the user ID to be sent with the quotation request sent to the store indicated by storeId_ i for the contract indicated by quotationContract_ i. This parameter is ignored if quotationStoreId_ i is not specified.
- quotationPassword_ i
- Specifies a password for the user ID specified by the quotationUserId_ i parameter. This parameter is ignored if quotationStoreUserId_ i is not specified.
- outOrderQuotationRelIdName
- Specifies the name-value pairs that should be added to the redirection URL. The values of the name-value pairs are the identifiers of the OrderQuotationRel objects created by this command invocation. This parameter can be repeated.
- URL
- Specifies the redirection URL that is returned when the command successfully completes.
Example 1
The following example requests initial quotations for the current shopping cart in store 1111 from referral stores 2222 and 3333. All existing initial, final, and selection orders for the shopping cart are deleted before the requests are sent. After the requests are sent, it re-directs to a URL that waits for the quotation responses to arrive.
http://myhostname/webapp/wcs/stores/servlet/OrderQuotationRequest?storeId=1111 &orderId=. "ationType=initial "ationStoreId_1=2222"ationStoreId_2=3333 &deleteOrderQuotationRelId=*parent. &URL= WaitForInitialQuotations
Example 2
The following example requests final quotations for the selection orders for the current shopping cart in store 1111 from referral stores 2222 and 3333. After the requests are sent, it re-directs to a URL that waits for the quotation responses to arrive.
http://myhostname/webapp/wcs/stores/servlet/OrderQuotationRequest?storeId=1111 &orderId=. "ationType=final "ationStoreId_1=2222"ationStoreId_2=3333 &URL= WaitForFinalQuotations
Behavior
- The ResolveOrdersCmd and ResolveOrderQuotationRelsCmd task commands are invoked to evaluate any abbreviations specified by the orderId and deleteOrderQuotationRelId parameters.
- For each order specified by the orderId parameter, if it has status attribute 'P' or 'E':
- Assign a displaySequence number to each of the specified quotation store and contract pairs:
- Assign sequence numbers that reflect the sequence in which the store and contract pairs appear in the quotationStoreId_ i and quotationContractId_ i parameters, when the parameters are arranged in sequence of i from low to high.
- Remove from the quotationStoreId_ i and quotationContractId_ i parameter list (that is, ignore) specified store and contract pairs that are not quote enabled for the current user in the current store.
- If quotationType is initial:
- For each store and contract pair specified by the quotationStoreId_ i and quotationContractId_ i parameters:
- Determine a list of OrderItemData for which quotations should be requested,...
- Include all order items from the specified order.
- If quotationType is final:
- Determine a list of OrderQuotationRel objects with relType "selection" whose parent order is the order specified by the orderId parameter and whose childStoreId attribute indicates one of the stores specified by the quotationStoreId_ i parameter and whose tradingAgreementId attribute indicates the contract specified by the corresponding quotationContractId_ i parameter.
- For each store and contract pair specified by the quotationStoreId_ i and quotationContract_ i parameters:
- Determine a list of OrderItemData for which quotations should be requested,...
- Include all OrderItems from the child order referenced by OrderQuotationRel object in the preceding determined list whose childStoreId and tradingAgreementId attributes indicate the specified store and contract.
- For each store and contract pair specified by the quotationStoreId_ i and quotationContractId_ i parameters, delete all OrderQuotationRel objects for this order, store, and contract whose relType attributes match the specified quotationType and also delete any child orders they reference. Also delete the OrderQuotationRel objects specified by the deleteOrderQuotationRelId parameter, and their child orders, but only those ones with relType "initial", "final", or "selection" and whose parentOrderId attribute indicates the order being processed (specified by the orderId parameter).
- For each store and contract pair (specified by the quotationStoreId_ i and quotationContractId_ i parameters) that has OrderItemData in its above determined list:
- Create a new OrderQuotationRel object for the specified order with the specified relType. Set the childStoreId and tradingAgreementId attributes to indicate the store and contract. Set the displaySequence attribute to the displaySequence number assigned (above) to the store and contract pair. Set the tradingAgreementId attribute to indicate the TradingAgreement of the contract.
- Set the timeoutTime attribute of the OrderQuotationRel object to the current time plus the number of seconds specified by the quoteWaitFor attribute of the ReferralInterfaceTC of the TradingAgreement of the contract.
- Call the requestOrderQuotationCmd to request quotations for each of the preceding created OrderQuotationRel objects and its above determined list of OrderItemData (if the list is not empty). Pass the specified quotationUserId and quotationPassword as well as the OrganizationId of the order.
- Redirect to the URL specified by the URL parameter, by setting the viewTaskName response property to "RedirectView", setting the redirecturl response property to the value specified by the URL parameter, and adding response properties with names and values as specified by the outOrderQuotationRelIdName parameter.
Exception conditions
- If the value of a specified input parameter is missing or invalid, the command throws an ECApplicationException with error message _ERR_BAD_MISSING_CMD_PARAMETER and error view GenericApplicationError.
Related concepts
Related reference
Order Management subsystem URLs