Place order
•
Version: 10
Some tooltip text!
• 1 minute to read
• 1 minute to read
Once the customer has accepted the quote, you can place the order.
Create order based on quote version
To create an order, you have to select which alternative to use.
NSQuoteAgent qa;
Integer quoteAlternativeId = 9;
NSPluginUrlResponse order = qa.PlaceOrder(quoteAlternativeId, true, "256", "fall campaign", "ENG");
if (order.GetIsOk()) {
printLine("Order placed successfully! " + order.GetUrl());
}
Parameters
- ID of the alternative to place the order on
- Should the sale be set to sold? (bool)
- Purchase order number
- Comment
- Culture (for culture-sensitive data, such as dates or multi-language texts)
Tip
To place an order for an archived version of the quote, call CreateAndSaveQuoteVersion()
passing the ID of the old version. Then get the quote alternative ID from the newly created copy (which is now the active version).
Get the order confirmation document
String GetOrderConfirmation(Integer quoteVersionId, Integer confirmationTemplateId)
Generates a base64-encoded stream (PDF). No permanent document is created or stored anywhere!
NSQuoteAgent qa;
String orderConfirmation = qa.GetOrderConfirmation(1,1);
printLine(orderConfirmation.subString(0,20));
This example prints the 1st 20 characters of the stream.