

Scenarios in point of sale (POS) and Commerce e-commerce can also benefit from this use case. The main use case for the CalculateSalesDocument API is the pricing calculation in scenarios where full cart context doesn't persist (such as sales quotations). The pricing calculation behind the CalculateSalesDocument API considers both single-line discounts and multi-lines discounts. This API calculates prices and discounts for products at given quantities if they are bought together in an order.

The CalculateSalesDocument API was introduced in the Commerce version 10.0.25 release. "includeSimpleDiscountsInContextualPrice": true, Set this parameter to true to get attainable prices and discounts. Set this parameter to true to get the minimum and maximum prices among all variants for a master product. Set this parameter to true to include simple discounts in the pricing calculation. The list of products to calculate prices for. The following table shows the input parameters for the GetActivePrices API. The main use case for the GetActivePrices API is the product details page (PDP), where retailers want to showcase the best price for a product, including any effective discounts. The GetActivePrices API supports the Employee, Customer, Anonymous, and Application Commerce roles. This API can also take a list of products as input and query the price of individual products in bulk. It doesn't calculate multiline discounts, and it assumes that each product in an API request has a quantity of 1. This API gets a product's calculated price, including simple discounts. The GetActivePrices API was introduced in the Commerce version 10.0.4 release.

RemoveCoupons – This API removes coupons from a cart.įor more information about how to consume Retail Server APIs in external applications, see Consume Retail Server APIs in external applications.AddCoupons – This API adds coupons to a cart.GetAvailablePromotions – This API gets applicable discounts for products in the cart.CalculateSalesDocument – This API calculates prices and discounts for products at given quantities if they are bought together.GetActivePrices – This API gets a product's calculated price, including simple discounts.The Dynamics 365 Commerce pricing engine provides the following Retail Server APIs that can be consumed by external applications to support various pricing scenarios:

This article describes various pricing APIs that are provided by the Microsoft Dynamics 365 Commerce pricing engine.
