---
title: "Calculating a sellable item sell price"
slug: "calculating-a-sellable-item-sell-price"
abstract: ""
---
# Calculating a sellable item sell price

The sellable item sell price is calculated in the `ICalculateSellableItemSellPricePipeline` plugin.

To calculate the sell price:

1. Find the `PriceCardPolicy` (new Policy) in the SellableItem policies list.

    The `PriceCardPolicy` must contain the logical name of a PriceCard (note that the same logically named price card can exist in multiple price books).

2. If there is no `PriceCardPolicy`, search for a PriceCard using the tagging.
3. Resolve the PriceBook to use by loading the associated catalog. The identifier for the catalog is passed in to the call (new Pipeline - GetCatalog).
4. Check that there is a new attribute on the catalog (PriceBook - string with Id fragment to PriceBook).
5. Load the PriceCard instance using the PriceBook and the logical PriceCard name.
6. Resolve the proper PriceSnapshot to use by filtering out those with dates that are superseded by other PriceSnapshots to find the single PriceSnapshot that should apply.
7. In the PriceSnapshot, resolve the available PriceTiers by filtering on the currency passed into the call.
8. Calculate the SellPrice (`purchaseOptionMoneyPolicy.SellPrice`) using an assumed quantity of 1.
9. Copy the filtered PriceSnapshot and PriceTiers into the SellableItem so it can be used in later calculations.

The following messages are generated when calculating the sell price:

| Message | Circumstance |
| --- | --- |
| `SellPrice<=PriceCard.Snapshot: Price={sellPrice.AsCurrency()}\|Qty={tier.Quantity}\|PriceCard={priceCardPolicy.PriceCardName}` | The SellableItem has a `PriceCardPolicy` and a valid PriceSnapshot and PriceTier can be determined.<br><br>Sample Item AW051-14 (no variation)<br><br>Sample Item AW055-01,33 (with variation)<br><br>> [!note]<br>> For a PriceSnapshot to be valid, it must have a valid date. Price tier must consist of the desired currency and a tier quantity of 1. |
| `SellPrice<=Tags.Snapshot: Price={sellPrice.AsCurrency()}\|Qty={tier.Quantity}\|Tags='{string.Join(", ", snapshot.Tags.Select(c=>c.Name))}'` | The SellableItem does not have a `PriceCardPolicy` but it has tags.<br><br>> [!note]<br>> This message relates to the Price card snapshot from the tags, with a valid date and currency as well as a Tier quantity of 1. A snapshot is resolved if it matches at least one of the item tags, has a quantity of 1, and it has a valid date and currency. |
| `SellPrice<=ListPrice: Price={ListPrice}` | The SellableItem has no SellPrice but has a valid ListPrice, so the ListPrice is copied to the SellPrice. |