Instant Pricing (POST)

Fetch instant pricing data on the quote or order line data grid and associated summary component. This API offers capabilities to either create a context or update the existing one based on the provided context ID.

You can also group quote line items or order 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.

Resource 

1/industries/cpq/quotes/actions/get-instant-price

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/industries/cpq/quotes/actions/get-instant-price

Available Version 

60.0

Requires Chatter 

No

HTTP Methods 

POST

Request Body for POST 

JSON Example

1{
2  "correlationId": "7847127122596",
3  "contextId": "0000000b28op21g00281751271041790cc1e5686282849a387dd3c59b310418b",
4  "records": [
5    {
6      "referenceId": "0Q0xx0000004DOSCA2",
7      "record": {
8        "attributes": {
9          "type": "Quote",
10          "method": "POST"
11        },
12        "Name": "Test Quote Proration Pricing",
13        "OpportunityId": "006xx000001a4ISAAY",
14        "Pricebook2Id": "01sxx0000005ptpAAA"
15      }
16    },
17    {
18      "referenceId": "refQuoteLine",
19      "record": {
20        "attributes": {
21          "type": "QuoteLineItem",
22          "method": "POST"
23        },
24        "QuoteId": "0Q0xx0000004DOSCA2",
25        "PricebookEntryId": "01uxx0000008zHmAAI",
26        "Product2Id": "01txx0000006jmWAAQ",
27        "Quantity": 2,
28        "UnitPrice": 25,
29        "StartDate": "2022-09-28",
30        "EndDate": "2028-09-27",
31        "PeriodBoundary": "ANNIVERSARY",
32        "BillingFrequency": "ANNUAL"
33      }
34    }
35  ]
36}

This example shows a sample request to specify grouping of lines based on criteria.

1{
2    "contextId": "0000000b28op21g00281751271041790cc1e5686282849a387dd3c59b310418b",
3    "correlationId": "7847127122596",
4    "records": [
5        {
6            "referenceId": "0Q0xx0000004DOSCA2",
7            "record": {
8                "attributes": {
9                    "type": "Quote",
10                    "method": "PUT"
11                }
12            }
13        },
14        {
15            "referenceId": "0QLxx0000004F3gGAE",
16            "record": {
17                "attributes": {
18                    "type": "QuoteLineItem",
19                    "method": "PUT"
20                },
21                "Quantity": 5
22            }
23        }, {
24            "referenceId": "0QLxx0000004F3hGAE",
25            "record": {
26                "attributes": {
27                    "type": "QuoteLineItem",
28                    "method": "PUT"
29                },
30                "Quantity": 2
31            }
32        },
33        {
34            "referenceId": "GroupId1",
35            "record": {
36                "attributes": {
37                    "type": "QuoteLineGroup",
38                    "method": "POST",
39                    "action": "GroupBy",
40                    "criteria": {
41                        "Quantity": 5
42                    }
43                },
44                "Name": "record"
45            }
46        }, {
47            "referenceId": "GroupId2",
48            "record": {
49                "attributes": {
50                    "type": "QuoteLineGroup",
51                    "method": "POST",
52                    "action": "GroupBy",
53                    "criteria": {
54                        "Quantity": 2
55                    }
56                },
57                "Name": "record1",
58            }
59        }
60    ]
61}

This example shows a sample request for the initial grouping of the quote with the quote lines assigned to the first group.

1{
2    "contextId": "0000000b28op21g00281751271041790cc1e5686282849a387dd3c59b310418b",
3    "correlationId": "7847127122596",
4    "records": [
5        {
6            "referenceId": "0Q0xx0000004CAgCAM",
7            "record": {
8                "attributes": {
9                    "type": "Quote",
10                    "method": "PUT"
11                }
12            }
13        },
14        {
15            "referenceId": "GroupId1",
16            "record": {
17                "attributes": {
18                    "type": "QuoteLineGroup",
19                    "method": "POST",
20                    "action": "GroupAll" 
21                },
22                "Name": "sample"
23            }
24        }
25    ]
26}

This example shows a sample request to ungroup a quote but retain the quote lines.

1{
2    "contextId": "0000000b28op21g00281751271041790cc1e5686282849a387dd3c59b310418b",
3    "correlationId": "7847127122596",
4    "records": [
5        {
6            "referenceId": "0Q0xx0000004CAgCAM",
7            "record": {
8                "attributes": {
9                    "type": "Quote",
10                    "method": "PUT"
11                }
12            }
13        },
14         {
15            "referenceId": "0QLxx0000004CBYGA2",
16            "record": {
17                "attributes": {
18                    "type": "QuoteLineItem",
19                    "method": "PUT"
20                },
21                "Quantity": 2,
22                "QuoteLineGroupId": null
23            }
24        },
25        {
26            "referenceId": "GroupId1",
27            "record": {
28                "attributes": {
29                    "type": "QuoteLineGroup",
30                    "method": "DELETE",
31                    "action": "Ungroup"
32                }
33            }
34        }
35    ]
36}

This example shows a sample request to create a new group.

1{
2    "contextId": "0000000b28op21g00281751271041790cc1e5686282849a387dd3c59b310418b",
3    "correlationId": "7847127122596",
4    "records": [
5        {
6            "referenceId": "0Q0xx0000004CAgCAM",
7            "record": {
8                "attributes": {
9                    "type": "Quote",
10                    "method": "PUT"
11                }
12            }
13        },
14        {
15            "referenceId": "GroupId1",
16            "record": {
17                "attributes": {
18                    "type": "QuoteLineGroup",
19                    "method": "POST"
20                },
21                "Name": "sample"
22            }
23        }
24    ]
25}

This example shows a sample request to delete a group.

1{
2    "contextId": "0000000b28op21g00281751271041790cc1e5686282849a387dd3c59b310418b",
3    "correlationId": "7847127122596",
4    "records": [
5        {
6            "referenceId": "0Q0xx0000004CAgCAM",
7            "record": {
8                "attributes": {
9                    "type": "Quote",
10                    "method": "PUT"
11                }
12            }
13        },
14        {
15            "referenceId": "GroupId1",
16            "record": {
17                "attributes": {
18                    "type": "QuoteLineGroup",
19                    "method": "DELETE",
20                    "action": "DeleteGroup"
21                },
22                "Name": "sample"
23            }
24        }
25    ]
26}

This example shows a sample request to move a group.

1{
2    "contextId": "0000000b28op21g00281751271041790cc1e5686282849a387dd3c59b310418b",
3    "correlationId": "7847127122596",
4    "records": [
5        {
6            "referenceId": "0Q0xx0000004CAgCAM",
7            "record": {
8                "attributes": {
9                    "type": "Quote",
10                    "method": "PUT"
11                }
12            }
13        },
14        {
15            "referenceId": "0QLxx0000004CBYGA2",
16            "record": {
17                "attributes": {
18                    "type": "QuoteLineItem",
19                    "method": "PUT"
20                },
21                "Quantity": 2
22                "QuoteLineGroupId": "{@GroupId2}"
23            }
24        },
25    ]
26}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
contextIdStringID generated by the context service. If you don’t specify a context ID, a new context is created.Optional59.0
correlationIdStringClient-generated ID for tracking multiple related API requests.Optional59.0
recordsObject with Reference Input[]List of pricing data to be fetched.Required59.0

Response Body for POST 

Instant Pricing