Support Multiple Prices per Product
Dynamic pricing occurs in commerce catalogs with multiple dimensions, where an availability will determine who has access to an item, and at what price. Products and variants can be present in multiple availability items (stores or buyer groups). This can happen in B2C, and more commonly B2B scenarios.
In the following scenario, we will consider a 2-dimensional pricing structure that contains products and availabilities.
Your business sells office supplies to 500 retailers. Each retailer will have a specific price for each product. When a client performs a query, they should only be able to see a specific price for the product at a given location.
In a commerce environment, you would commonly see a 3-dimensional relationship between a product, its variants, and their availabilities. To simplify, we will ignore the product-variant relationship, and consider both object types as a product that will vary depending on the catalog level.
Solution 1: Average Price
You have a list of products and each have an average price. The average price will be used for sorting and facets, while the exact price will be shown to the user. You fetch the correct price from the Commerce platform when the page renders.
Solution 2: Dictionary Field on the Product
Adding a dictionary field on the
Product object that contains the key (
availabilityid) with value (