Pricing (POST)

Create and hydrate context instance in a single request. Provide a comprehensive response that contains final pricing details per line items and related errors, if any.

If price waterfall is disabled from Salesforce Pricing Setup in your org, this API doesn’t return the waterfall details. You can use the Price Waterfall API to retrieve the waterfall details if price waterfall persistence is enabled in Salesforce Pricing Setup.

Resource 

1/connect/core-pricing/pricing

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/connect/core-pricing/pricing

Available Version 

60.0

Requires Chatter 

No

HTTP Methods 

POST

Request Body for POST 

JSON Example

1{
2  "contextDefinitionId": "11Oxx0000006PdxEAE",
3  "contextMappingId": "11jxx0000004LDDAA2",
4  "jsonDataString": {
5    "Cart": [
6      {
7        "id": "cart_1001",
8        "cart_id": "cart_1001",
9        "PriceBookId": "PriceBookId_1001",
10        "businessObjectType": "Cart",
11        "CartItem": [
12          {
13            "id": "lineItem_1001",
14            "line_item_id": "lineItem_1001",
15            "Quantity": 7,
16            "PriceType": "OneTime",
17            "Frequency": "",
18            "UOM": "",
19            "businessObjectType": "CartItem",
20            "product_id": "01txx0000006i44AAA",
21            "UnitPrice": 6.8,
22            "NetUnitPrice": 0,
23            "Attribute": [
24              {
25                "name": "Color",
26                "code": "RED",
27                "isPriceImpacting": true,
28                "businessObjectType": "Attribute",
29                "id": "Attribute_1001",
30                "attribute_id": "Attribute_1001"
31              },
32              {
33                "name": "Size",
34                "code": "10INCH",
35                "isPriceImpacting": true,
36                "businessObjectType": "Attribute",
37                "id": "Attribute_1002",
38                "attribute_id": "Attribute_1002"
39              }
40            ]
41          },
42          {
43            "id": "lineItem_1002",
44            "line_item_id": "lineItem_1002",
45            "quantity": 3,
46            "PriceType": "OneTime",
47            "Frequency": "",
48            "UOM": "",
49            "businessObjectType": "CartItem",
50            "product_id": "01txx0000006i2SAAQ",
51            "unitprice": 6,
52            "NetUnitPrice": 0,
53            "Attribute": [
54              {
55                "name": "Color",
56                "code": "BLUE",
57                "isPriceImpacting": true,
58                "businessObjectType": "Attribute",
59                "id": "Attribute_1003",
60                "attribute_id": "Attribute_1003"
61              },
62              {
63                "name": "Size",
64                "code": "6INCH",
65                "isPriceImpacting": true,
66                "businessObjectType": "Attribute",
67                "id": "Attribute_1004",
68                "attribute_id": "Attribute_1004"
69              }
70            ]
71          }
72        ]
73      }
74    ]
75  },
76  "pricingProcedureId": "9QMxx0000004CKKGA2",
77  "configurationOverrides": {
78    "skipWaterfall": true,
79    "useSessionScopedContext": true,
80    "persistContext": true,
81    "referenceKey": "referenceKey-12345",
82    "displayContext" : false,
83    "taggedData": false,
84    "isHighVolumeLineItems": false
85  }
86}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
configuration​OverridesConfiguration Override InputParameters to override the pricing configuration.Optional60.0
context​Definition​IdStringID of the context definition that defines the structure of the input data.Required60.0
context​Mapping​IdStringID of the context mapping that maps the input data to the context instance.Required60.0
json​Data​StringStringData to hydrate the context, which must be in JSON format and passed as String. Pass the JSON data as String by using the stringify() method to convert the object to string. The keys in the jsonDataString property must be in accordance to the contextMappingId property sent in the request. Make sure that the businessObjectType value within this property node is set to the sObject used in the context mappings.Required60.0
pricing​Procedure​IdStringID or API name of the pricing procedure used for calculating the prices. A pricing procedure is represented as an Expression Set Definition in the system. If you’re an Experience Cloud user, specify the name of the pricing procedure.Optional60.0

Response Body for POST 

Pricing Output