Place Quote (POST)
Create a quote to discover and price products and services.
Additionally, insert, update, or delete a quote line item.
You can also group quote line items based on location, work types, or departments, if groups are enabled for your org. Groups provide a visualization of the products to view large quotes.
This API supports a maximum of 300 transaction line items.
- Special Access Rules
- You need the Create on Quotes user permission to create quotes.
- Resource
-
1/commerce/quotes/actions/place - Resource example
-
1https://yourInstance.salesforce.com/services/data/v67.0/commerce/quotes/actions/place - Available version
- 60.0
- HTTP methods
- POST
- Request body for POST
-
- JSON example
- This example shows a sample request to create a
quote.
1{ 2 "pricingPref": "System", 3 "configurationInput": "RunAndAllowErrors", 4 "configurationOptions": { 5 "validateProductCatalog": true, 6 "validateAmendRenewCancel": true, 7 "executeConfigurationRules": true, 8 "addDefaultConfiguration": true 9 }, "graph": { 10 "graphId": "createQuote", 11 "records": [{ 12 "referenceId": "refQuote", 13 "record": { 14 "attributes": { 15 "type": "Quote", 16 "method": "POST" 17 }, 18 "opportunityId": "---", 19 "quoteProp1": "value1", 20 "quoteProp2": "value2" 21 } 22 }, 23 { 24 "referenceId": "refQuoteLineItem1", 25 "record": { 26 "attributes": { 27 "type": "QuoteLineItem", 28 "method": "POST" 29 }, 30 "QuoteLineItemProp1": "value1", 31 "QuoteLineItemProp2": "value2" 32 } 33 }, 34 { 35 "referenceId": "refQuoteLineItemAttribute", 36 "record": { 37 "attributes": { 38 "type": "QuoteLineItemAttribute", 39 "method": "POST" 40 }, 41 "QuoteLineItemId": "@{refQuoteLineItem1.id}", 42 "AttributeDefinitionId": "0tjxx0000000001AAA" 43 } 44} 45 ] 46 } 47} - This example shows a sample request to insert, update, or delete a quote line
item.
1{ 2 "pricingPref": "System", 3 "configurationInput": "skip", 4 "graph": { 5 "graphId": "updateQuote", 6 "records": [ 7 { 8 "referenceId": "refQuote", 9 "record": { 10 "attributes": { 11 "type": "Quote", 12 "method": "PATCH", 13 "id": "0Q0xx0000004E2mCAE" 14 }, 15 "Name": "Quote_Acme" 16 } 17 }, 18 { 19 "referenceId": "refQuoteLineItemToCreate1", 20 "record": { 21 "attributes": { 22 "type": "QuoteLineItem", 23 "method": "POST" 24 }, 25 "QuoteId": "0Q0xx0000004E2mCAE", 26 "PricebookEntryId": "01uxx0000008yXPAAY", 27 "Product2Id": "01txx0000006i2UAAQ", 28 "Quantity": 2.0, 29 "UnitPrice": 800.0, 30 "PeriodBoundary": "Anniversary", 31 "BillingFrequency": "Monthly", 32 "StartDate": "2024-03-11" 33 } 34 }, 35 { 36 "referenceId": "refQuoteLineItemToPatch2", 37 "record": { 38 "attributes": { 39 "type": "QuoteLineItem", 40 "method": "PATCH", 41 "id": "0Q0xx0000004E2mCAE" 42 }, 43 "Quantity": 2.0, 44 "UnitPrice": 600.0 45 } 46 }, 47 { 48 "referenceId": "refQuoteLineItemToDelete3", 49 "record": { 50 "attributes": { 51 "type": "QuoteLineItem", 52 "method": "DELETE", 53 "id": "0Q0xx0000004E2mYLK" 54 } 55 } 56 } 57 ] 58 } 59} - This example shows a sample request to define grouping of quote line
items.
1{ 2 "pricingPref": "Force", 3 "configurationInput": "skip", 4 "graph": { 5 "graphId": "groupLines", 6 "records": [ 7 { 8 "referenceId": "refQuote", 9 "record": { 10 "attributes": { 11 "type": "Quote", 12 "method": "PATCH", 13 "id":"0Q0xx0000004C99CAE" 14 }, 15 "Name": "From Place Quote API" 16 } 17 }, 18 { 19 "referenceId": "refQlg1", 20 "record": { 21 "attributes": { 22 "type": "QuoteLineGroup", 23 "method": "POST", 24 "action": "GroupBy", 25 "criteria": { 26 "Quantity": 1 27 } 28 }, 29 "Name": "From Place Quote API Group", 30 "QuoteId": "@{refQuote.id}" 31 } 32 }, 33 { 34 "referenceId": "refQuoteItem1", 35 "record": { 36 "attributes": { 37 "type": "QuoteLineItem", 38 "method": "PATCH", 39 "id":"0QLxx0000004DJcGAM" 40 }, 41 "QuoteLineGroupId": "@{refQlg1.id}", 42 "Quantity": 1 43 } 44 } 45 ] 46 } 47} - This example shows a sample request for the initial grouping of the quote with the
quote lines assigned to the first
group.
1{ 2 "pricingPref": "Force", 3 "graph": { 4 "graphId": "test", 5 "records": [ 6 { 7 "referenceId": "refQuote", 8 "record": { 9 "attributes": { 10 "type": "Quote", 11 "method": "PATCH", 12 "id": "0Q0xx0000004CAmCAM" 13 } 14 } 15 }, 16 { 17 "referenceId": "refQlg1", 18 "record": { 19 "attributes": { 20 "type": "QuoteLineGroup", 21 "method": "POST", 22 "action": "GroupAll" 23 }, 24 "Name": "From PQ API Group", 25 "QuoteId": "@{refQuote.id}" 26 } 27 } 28 ] 29 } 30} - This example shows a sample request to ungroup a quote but retain the quote
lines.
1{ 2 "pricingPref": "Force", 3 "configurationInput": "skip", 4 "graph": { 5 "graphId": "test", 6 "records": [ 7 { 8 "referenceId": "refQuote", 9 "record": { 10 "attributes": { 11 "type": "Quote", 12 "method": "PATCH", 13 "id":"0Q0xx0000004C99CAE" 14 }, 15 "Name": "From Place Quote API" 16 } 17 }, 18 { 19 "referenceId": "refQlg1", 20 "record": { 21 "attributes": { 22 "type": "QuoteLineGroup", 23 "method": "DELETE", 24 "id": "{GroupId}", 25 "action": "Ungroup" 26 } 27 } 28 } 29 ] 30 } 31} - This example shows a sample request to create a new
group.
1{ 2 "pricingPref": "Force", 3 "configurationInput": "skip", 4 "graph": { 5 "graphId": "test", 6 "records": [ 7 { 8 "referenceId": "refQuote", 9 "record": { 10 "attributes": { 11 "type": "Quote", 12 "method": "PATCH", 13 "id":"0Q0xx0000004C99CAE" 14 }, 15 "Name": "From Place Quote API" 16 } 17 }, 18 { 19 "referenceId": "refQlg1", 20 "record": { 21 "attributes": { 22 "type": "QuoteLineGroup", 23 "method": "POST" 24 }, 25 "Name": "From PQ API Group", 26 "QuoteId": "@{refQuote.id}" 27 } 28 } 29 ] 30 } 31} - This example shows a sample request to delete a
group.
1{ 2 "pricingPref": "Force", 3 "configurationInput": "skip", 4 "graph": { 5 "graphId": "test", 6 "records": [ 7 { 8 "referenceId": "refQuote", 9 "record": { 10 "attributes": { 11 "type": "Quote", 12 "method": "PATCH", 13 "id":"0Q0xx0000004C99CAE" 14 }, 15 "Name": "From Place Quote API" 16 } 17 }, 18 { 19 "referenceId": "refQlg1", 20 "record": { 21 "attributes": { 22 "type": "QuoteLineGroup", 23 "method": "DELETE", 24 "id": "{GroupId}", 25 "action": "DeleteGroup" 26 } 27 } 28 } 29 ] 30 } 31} - This example shows a sample request to move a
group.
1{ 2 "pricingPref": "Force", 3 "configurationInput": "skip", 4 "graph": { 5 "graphId": "test", 6 "records": [ 7 { 8 "referenceId": "refQuote", 9 "record": { 10 "attributes": { 11 "type": "Quote", 12 "method": "PATCH", 13 "id":"0Q0xx0000004C99CAE" 14 }, 15 "Name": "From PlaceQuote Api" 16 } 17 }, 18 { 19 "referenceId": "0QLxx0000004CBYGA2", 20 "record": { 21 "attributes": { 22 "type": "QuoteLineItem", 23 "method": "PATCH" 24 "id": "0QLxx0000004CBYGA2" 25 }, 26 "Quantity": 2, 27 "QuoteLineGroupId": "@{GroupId2}" 28 } 29 ] 30 } 31} - Properties
-
Name Type Description Required or Optional Available Version catalogRatesPref String Rate card entries defined in the catalog that must be fetched for quote line items with usage-based pricing during the quote creation process. Valid values are: - Fetch—Retrieves the rate card entries defined in the catalog for quote line items during the quote creation process.
- Skip—Skips the retrieval of rate card entries for quote line items during the quote creation process.
The default value is Skip.
This property is available when the Usage-Based Selling feature is enabled.
Optional 62.0 configurationInput String Configuration input for the place quote process. Valid values are: - RunAndAllowErrors
- RunAndBlockErrors
- Skip
The default value is RunAndBlockErrors.
Optional 60.0 configurationOptions Configuration Options Input Configuration options during the ingestion process. Optional 60.0 graph Object Graph Input The sObject graph representing the quote structure. You can perform create, update, or delete operations on objects from the Sales Transaction context definition by using this property. Additionally, perform create, update, or delete operations on custom objects and fields in your extended context definition. Required 60.0 pricingPref String Pricing preference during the quote process. Valid values are: - Force
- Skip
- System
The default value is System.
Optional 60.0
- Response body for POST
- Place Quote