Creating an order from a quote
When a customer accepts a quote, the quote is converted into a sales order using the createOrderFromQuote API.
This is usually accomplished by a Field Sales Representative creating the sales order, although, in some cases, a sales order may be generated automatically. For example, a customer’s acceptance of an online quote may automatically trigger the creation of a sales order.
The createOrderFromQuote API is called to create an order from a quote. The document type to be used for the order is configurable in the Applications Manager, and is determined by the createOrderFromQuote API. By default, the document type is Sales Order. The createOrderFromQuote API then creates an order from the quote using the applicable document type, enterprise code, order number, order header key, or both order number and order header key, and links the order to the corresponding quote. The creation of the order is driven by a template, DefaultFromQuoteTemplate, whereby line items and attributes from the quote are automatically copied to the order. Default customer information is copied from the quote to the sales order, as well as all the line items, except the recommended lines. The status of the order is either Draft or Created, depending on whether the DraftOrderFlag is set to Y or N in the input XML file.
After the order is created, the quote is moved to the Ordered status, enabling it to be purged by the purge agent. The associated opportunity record is moved to the Won status, and all the related alternative quotes for the opportunity are moved to the Abandoned status. The opportunity purge agent purges the opportunity after all the associated quotes have been purged.