Quoting operations are also initiated with the /atg/commerce/order/purchase/QuoteFormHandler
. By default, the form handler contains the following properties:
Property | Description |
---|---|
| The ID of the order used in the form handler operation. |
| A note from the customer that accompanies the quote request. |
| The page that the customer is directed to if the form handler successfully submits the order for a quote. |
| The page that the customer is directed to if an error occurs during quote submission. |
| The page that the customer is directed to if the form handler successfully resubmits the order for a quote. |
| The page that the customer is directed to if an error occurs during the quote resubmission. |
| The page that the customer is directed to if the form handler successfully submits the quoted order. |
| The page that the customer is directed to if there is an error while completing the checkout of a quoted order. |
| The page that the customer is directed to if the quote rejection request is successful. |
| The page that the customer is directed to if there is an error during the rejection of a quote. |
| The page that the customer is directed to when the quote is completed successfully. |
| The page that the customer is directed to if there is an error when completing the quote. |
| The map parameters used for the completion of a quote. |
The QuoteFormHandler
, which extends the PurchasProcessFormHandler
, has a number of handle
methods. These handle
methods have corresponding pre
methodName
, post
methodName
, and methodName
methods. For example, the handleRequestQuote
method has corresponding preRequestQuote
, postRequestQuote
and requestQuote
methods. A handle
method calls its pre
methodName
method before executing its methodName
method. Likewise, it calls its post
methodName
method after executing its methodName
method. The pre
and post
methods provide an easy way to extend the functionality of the handle
methods.
The QuoteFormHandler
also has a set of successURL
and errorURL
properties that map to its handle
methods. For example, handleRejectQuote
has corresponding rejectQuoteSuccessURL
and rejectQuoteErrorURL
properties. After a handle
method executes, you can use these properties to redirect the customer to pages other than those specified by the form’s action
attribute. The redirected page’s content depends on the type of operation and whether the operation succeeded or not. For example, if an attempt to request a quote fails, you could redirect the customer to a page explaining what caused the failure.
The value of the redirect properties is a URL relative to the action
page of the form. You can either specify the values of these URL properties in the properties of the form handler or you can set them in the JSP itself using a hidden
tag attribute.
The QuoteFormHandler
uses the following handle
methods:
The
requestQuote
method is used during the submission of an order for quoting. It obtains the properties used to construct thequoteInfo
objects, which are needed by thePrepareForQuoteRequest
pipeline processor. Once the order has been validated, the form handler callsOrderManager.requestQuote
to initiate therequestQuote
pipeline chain. If therequestQuote
pipeline chain is successful, thequoteInfo
object is added to the order and the order’s status is set to PENDING_QUOTE. Once therequestQuote
pipeline has been invoked, therequestQuote
form handler method creates a new order in theOrderHolder
.The
requestRequote
method performs the same actions as therequestQuote
method, but does not modify theOrderHolder
.The
completeQuote
method is used once your third-party quoting system has completed its quoting process and it ready to submit a quote to a customer. Once this method receives anorderId
and thecompleteQuoteParametersMap
, it calls theOrderManager.completeQuote
method.The
acceptQuote
method is used to accept the quoted order and initiate the repricing and checkout process. Once this method receives anorderId
, it callsOrderManager.acceptQuote
to complete the checkout process by running theprocessOrderWithReprice
pipeline chain.The
rejectQuote
method is used when a customer rejects a quote. Once this method receives anorderId
, it callsOrderManager.rejectQuote
to run therejectQuote
pipeline chain. The order’s status is set to REJECTED_QUOTE.
For detailed information on working with form handlers, refer to the Page Developer's Guide. For information on working with the OrderManager
, refer to the Updating an Order with the OrderManager section.