Create Orders From Quote Action

Create multiple orders from a single quote instead of a single order, ensuring easier order management and fulfillment operations.

  • You can create an order by selecting a subset of quote line items.
  • You can split a quote into multiple orders based on quote line group.
  • You can split a quote into multiple orders based on a quote line item field, such as Product2.

See Considerations for Creating Multiple Orders from a Quote. This action is available in API version 65.0 and later.

Special Access Rules 

Ensure the Advanced Order Creation From Quote toggle from Revenue Settings from Setup is enabled to access this action.

Supported REST HTTP Methods 

URI: /services/data/v68.0/actions/standard/createOrdersFromQuote

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a placeholder for your OAuth access token.

Inputs 

InputTypeDescription
orderCreationMethodstringIf specified, represents the method used to create orders. Valid values are CreateSingleOrder—Creates a single order from a quote. This method creates the order header and order line items synchronously; CreateOrderByGroup—Create multiple orders based on a quote line group; or CreateOrderByField—Create multiple orders based on a specified quote line item field. If you’re creating multiple orders from a quote, the order header records are created synchronously and order line items are created asynchronously. If unspecified, the default value is CreateSingleOrder.
orderCreationParametersApex-definedAn Apex ConnectApi.OrderCreationParametersInputRepresentation record that contains the additional parameters required by the specified order creation method.
quoteIdidRequired. The ID of the source quote tied to the orders created.
quoteLineItemIdsidList of quote line item IDs to create the orders from. If specified, the orders are created for the list of provided quote line items. If unspecified, orders are created for all quote line items.

Outputs 

OutputTypeDescription
orderIdsidList of the created order IDs.
requestIdstringThe request ID used to query the async status.
statusUrlstringThe status URL that’s used to track the async status.

Examples 

Create a Partial Order From a Quote

This example shows a sample request to create a partial order from a quote.

1{
2  "inputs": [
3    {
4      "quoteId": "0Q0DU0000005tJc0AI",
5      "quoteLineItemIds": [
6        "0QLDU000000ay2G4AQ",
7        "0QLDU000000ay2n4AA"
8      ],
9      "orderCreationMethod": "CreateSingleOrder"
10    }
11  ]
12}

This example shows a sample successful response.

1{
2    "actionName": "createOrdersFromQuote",
3    "errors": null,
4    "invocationId": null,
5    "isSuccess": true,
6    "outcome": null,
7    "outputValues": {
8      "requestId": null,
9      "statusUrl": null,
10      "orderIds": [
11        "801DU000000EYySYAW"
12      ]
13    },
14    "sortOrder": -1,
15    "version": 1
16  }

Create Orders From a Quote Based on a Quote Line Group

This example shows a sample request to create orders from a quote based on a quote line group.

1{
2  "inputs": [
3    {
4      "quoteId": "0Q0DU0000005tJk0AI",
5      "orderCreationMethod": "CreateOrderByGroup"
6    }
7  ]
8}

This example shows a sample successful response.

1{
2  "actionName": "createOrdersFromQuote",
3  "errors": null,
4  "invocationId": null,
5  "isSuccess": true,
6  "outcome": null,
7  "outputValues": {
8    "requestId": "16PRM0000004DBq",
9    "orderIds": [
10      "801S70000001VKgIAM"
11    ],
12    "success": true,
13    "errors": [],
14    "statusURL": "/services/data/v68.0/sobjects/AsyncOperationTracker/16PRM0000004DBq"
15  },
16  "sortOrder": -1,
17  "version": 1
18}

Create Orders From a Quote Based on a Quote Line Item Field

This example shows a sample request to create orders from a quote based on a quote line item field

1{
2  "inputs": [
3    {
4      "quoteId": "0Q0DU0000005tJW0AY",
5      "orderCreationMethod": "CreateOrderByField",
6      "orderCreationParameters": {
7        "splitFieldName": "Product2Id"
8      }
9    }
10  ]
11}

This example shows a sample successful response.

1{
2  "actionName": "createOrdersFromQuote",
3  "errors": null,
4  "invocationId": null,
5  "isSuccess": true,
6  "outcome": null,
7  "outputValues": {
8    "requestId": "16PRM0000004DBq",
9    "orderIds": [
10      "801S70000001VKgIAM",
11      "801S70000001WKgIBN"
12    ],
13    "success": true,
14    "errors": [],
15    "statusURL": "/services/data/v68.0/sobjects/AsyncOperationTracker/16PRM0000004DBq"
16  },
17  "sortOrder": -1,
18  "version": 1
19}