Pricing policies

Current version: 9.0

The Commerce Engine encompasses extensible services that enable you to customize commerce functionality.

Note

Do not extend or inherit from out-of-the-box policies; instead, create your own. You can change the values in a policy by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined and then re-running Bootstrap.

The following policies can be configured through the Pricing plug-in.

Policy

Description

Properties / Default Values

GlobalPricingPolicy

Provides the ability to specify standard price policies. It applies in the Commerce Shops service. The following sample shows the GlobalPricingPolicy returned on an environment policies collection. You can overwrite the policy for a particular shop by adding it to the policies collection for that shop.

ShouldRoundPriceCalc / true

RoundDigits / 2

MidPointRoundUp / true

MaxPriceCardNameLength / 30

MaxPriceBookNameLength / 30

MinimumPrice / 0

MinimumPricingQuantity / 0

KnownPricingActionsPolicy

Defines the names of the pricing entity view actions.

AddPriceBook / "AddPriceBook"

EditPriceBook / "EditPriceBook"

AssociateCatalog / "AssociateCatalog"

DisassociateCatalog / "DisassociateCatalog"

AddPriceCard / "AddPriceCard"

EditPriceCard / "EditPriceCard"

DeletePriceCard / "DeletePriceCard"

DuplicatePriceCard / "DuplicatePriceCard"

AddPriceSnapshot / "AddPriceSnapshot"

EditPriceSnapshot / "EditPriceSnapshot"

RemovePriceSnapshot / "RemovePriceSnapshot"

RequestSnapshotApproval / "RequestSnapshotApproval"

RejectSnapshot / "RejectSnapshot"

ApproveSnapshot / "ApproveSnapshot"

RetractSnapshot / "RetractSnapshot"

AddCurrency / "AddCurrency"

EditCurrency / "EditCurrency"

RemoveCurrency / "RemoveCurrency"

SelectCurrency / "SelectCurrency"

KnownPricingListsPolicy

Defines the names of the pricing transient and entity indexes lists.

List Name               Default value

PriceBookCards            PriceBooks-{0}-PriceCards

PriceBookCards / "PriceBooks-{0}-PriceCards"

KnownPricingViewsPolicy

Defines the names of the pricing entity views

PricingDashboard / "PricingDashboard"

Master / "Master"

Summary / "Summary"

Details / "Details"

PriceBookCards / "PriceBookCards"

PriceBooks / "PriceBooks"

PriceBookCatalogs / "PriceBookCatalogs"

PriceCardSnapshots / "PriceCardSnapshots"

PriceSnapshotDetails / "PriceSnapshotDetails"

SetSnapshotApprovalStatus / "SetSnapshotApprovalStatus"

PriceSnapshotTiers / "PriceSnapshotTiers"

PriceTierDetails / "PriceTierDetails"

Pricing / "Pricing"

PriceRow / "PriceRow"

PriceCell / "PriceCell"

ListPricingPolicy

The ListPricingPolicy provides the ability to specify a List Price in multiple currencies.The following sample shows the ListPricingPolicy returned on a SellableItem policies collection or one of its variants:

RequestResponse
{
      "@odata.type": "#Sitecore.Commerce.Plugin.Pricing.ListPricingPolicy",
      "PolicyId": "db13def722dc488f86a0673b83eb85e8",
      "Models": [],
      "RuleSet": null,
      "Prices": [
        {
          "CurrencyCode": "USD",
          "Amount": 44.75
        },
        {
          "CurrencyCode": "CAD",
          "Amount": 45.75
        }
      ]
}

OnSalePolicy

The OnSalePolicy provides the ability to specify that a SellableItem is on sale.The following sample shows the OnSalePolicy returned on a SellableItem policies collection or in the policies collection of one of its variants:

RequestResponse
{
      "@odata.type": "#Sitecore.Commerce.Plugin.Pricing.OnSalePolicy",
      "PolicyId": "b70814f6f15b4a0aaeea74e83af63c20",
      "Models": [],
      "RuleSet": null,
      "OnSale": true,
      "ShowInCart": false,
      "CartDisplay": "text"
 }

PriceCardPolicy

The PriceCardPolicy provides the ability to specify a Price Card for the SellableItem. This allows the SellableItem to share a pricing definition with multiple other SellableItems. The same logical PriceCard name can be represented in multiple Price Books, providing a flexible method for specifying pricing.The following sample shows the PriceCardPolicy returned on a SellableItem policies collection or in the policies collection of one of its variants. It indicates that a common price definition is being referenced:

RequestResponse
{
      "@odata.type": "#Sitecore.Commerce.Plugin.Pricing.PriceCardPolicy",
      "PolicyId": "2f770e056b9149088c8f57a84d9343ed",
      "Models": [],
      "RuleSet": null,
      "PriceCardName": "HabitatPriceCard"
  }

PurchaseOptionMoneyPolicy

The PurchaseOptionMoneyPolicy policy provides the ability to specify a calculated Sell Price in multiple currencies. The following sample shows the PurchaseOptionMoneyPolicy returned on a SellableItem policies collection or in the policies collection of one of its variants. It represents what you would actually sell an item for based on the context of the call. This could be a dynamically calculated price based on environment factors, for example, the Date/Time or the quantity the customer intends to purchase based on what they have in the cart.

RequestResponse
{
      "@odata.type": "#Sitecore.Commerce.Plugin.Pricing.PurchaseOptionMoneyPolicy",
      "PolicyId": "b70814f6f15b4a0aaeea74e83af63c20",
      "Models": [],
      "RuleSet": null,
      "SellPrice": {
        "CurrencyCode": "USD",
        "Amount": 10
      }
 }

Do you have some feedback for us?

If you have suggestions for improving this article,