Apply Adjustment
Apply an adjustment (such as a discount, markup, or override) to a price for a cart and line item, which are specified by the cartId and id parameters.
The PricingElementServiceImplementation supports this API.
The caller can add the new skipCartRefresh parameter to the applyAdjustments API call. If skipCartRefresh is set to True, the getCartsItems API will not be triggered. If it is omitted or set to False, getCartsItems will be triggered.
The getCartsItems API runs pricing on the cart after adjustments are applied. Skipping this call significantly improves API performance.
To execute pricing after applyAdjustments, you can either call getCartLineItemPrices (available under the actions node in the response) or invoke getCartsItems separately.
Communication (vlocity_cmt)
For API parameter names and descriptions, see Cart-Based API Swagger Reference.
| Response Format | JSON |
|---|---|
| Resource URL | /services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/items/{ID}/pricing |
An entire result can be thousands of lines long. This example has been truncated.
Use the table in this topic to diagnose problems that occur when executing the the API.
| Error Message | Description |
|---|---|
| A virtual price cannot be adjusted. | This error message is displayed if you try to adjust a base price of a virtual product. |
| Cannot apply adjustment without base charge. | This error message is displayed: |
Calculated prices are derived from other base prices. For example, the UnitPrice of a product is calculated based on the base price of the product and the quantity of the product.If you want to adjust base prices that haven't been initialized, you can set the CheckVariableBasePrice CPQ Custom Setting to False. This setting allows you to make adjustments to the base prices, but it can lead to unexpected results.
Adjustments can be made without a PriceListEntryID.