Creates an order for a specific Account and Price List.

API Details

requestCPQStruct.CreateOrderRequestDOThe request data object.

Request Data Object - CPQStruct.CreateOrderRequestDO
AccountIdIDYesThe Id of the Account to be associated with the order.
PriceListIdIDYesThe Id of the PriceList to be associated with the order. Only the products associated with the Price List appear on the cart.
PricingDateDatetimeNoDate and time associated with the order and represents the date when the order will be priced.

API Response

Response Data Object - CPQStruct.CreateOrderResponseDO
orderIdIDThe Id of the newly created order object

Code Sample

The following code sample enables you to create an order for a valid account with an Account Id and a Price List with a valid Price List Id. Using the sample, you can search for a valid account using an account number. If an account exists with the account number entered, you can create an order using the createorder() API. You can invoke this API in use cases when you want to create an order based on the account and price list. 

public void createOrder()
	// Create the request
	Apttus_Config2.CPQStruct.CreateOrderRequestDO request = new Apttus_Config2.CPQStruct.CreateOrderRequestDO();
	// Add request parameters
	request.AccountId = accountId;
	request.PriceListId = priceListId;
	request.PricingDate =;
	// Create a new order
	Apttus_Config2.CPQStruct.CreateOrderResponseDO result = Apttus_Config2.OrderWebService.createOrder(request);
	// Assign orderId to local variable
	orderId = result.OrderSO.Id;