Price transparency ensures that the mechanism for calculating pricing is testable, auditable, and reproducible. Price transparency is for internal use, and is not presented to shoppers. Transparency is achieved during price calculation, by adding pricing messages into the artifacts receiving the pricing. Messages convey information on pricing strategy in a succinct and traceable way, for example, detailing how a particular price was calculated.
Pricing messages can be added to a
MessagesComponent during price calculation. A
MessageModel uses the
Name property to specify the type of message. These messages are named
Pricing, which allows subsequent processing to filter on them. The MessagesComponent has an
AddMessage method that allows a message to easily be added by passing in the message type and text for the message. In some cases, multiple messages written successively as pricing rules cause an overwrite of a previous calculated price.
During calculation, pricing messages are added to a:
SellableItem – messaging is inserted into to a
SellableItem. This is first calculated at the item level and then calculated at each variant level for price overrides.
Cart Price – messaging inserted into a
CartLineComponentas part of calculating the cart price.
At the end of calculating the SellableItem pricing, which is performed in isolation and prior to calculating prices against the cart, a reconciliation step occurs. This ensures that there is both a ListPrice and a SellPrice for each item and its variation.