---
title: PriceType examples
slug: commerce-connect-15/docs/pricetype-examples
docTags: 
createdAt: 2026-07-30T20:34:43.000Z
---

## Add custom price types

To add a `PriceType`, add a new line within the `SalePriceTypes` of `CatalogOptions` in the `appsettings.json` file.

```json
"EPiServer": {
  "Commerce": {
    "CatalogOptions": {
      "SalePriceTypes": [
        {
          "Key": "NewCustomPriceType",
          "Value": "3",
          "Description": "New Custom Price Type"
        },
        {
          "Key": "JurisdictionGroup",
          "Value": "4",
          "Description": "Jurisdiction Group"
        }
      ]
    }
  }
}
```

:::hint{type="info"}
**Note**
The value must be unique and three or greater.
:::

## Get all price types enum and configuration

`PriceTypeConfiguration.PriceTypeDefinitions` returns all price types, including predefined price types and price types defined in the configuration.

```csharp
namespace CodeSamples.Mediachase.Commerce.Pricing {
  public class PriceTypeConfigurationSample {
    #region GetPriceTypeFromEnumAndConfiguration
    public IDictionary < CustomerPricing.PriceType, PriceTypeDefinition > GetAllPriceTypeDefinitions() {
      // Get all price types - included predefined and price types from configuration file.
      var priceTypeDefinitions = PriceTypeConfiguration.Instance.PriceTypeDefinitions;
      return priceTypeDefinitions;
    }
    #endregion
  }
}
```

## Add customer price group

**Customer Price Group** is a predefined price type that should be matched with a specific sale code. Options available to marketers are predefined as: **Customer**, **Partner**, and **Distributor**.

1. Go to **Commerce** > **Catalogs** in the top navigation
2. Browse the catalog tree to find your product (for example, **Fashion** > **Mens** > **Mens Shoes**)
3. Click on the variant/SKU you want to edit prices for (not the product — it must be a variant)
4. Select the **All Properties** view.
5. Open the **Pricing** tab.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/xi9yO53AhQANppVbTyPGb_ee4f58fb7e9b394a20afc786754b53e644b6dd67ddd85256cb5f11bcb39cd757-image.png)

6. Click **Edit prices**. The **Edit Prices** window displays.
7. You can modify numerous fields on the **Edit Prices** window. Or click **New Price** to create your own customer price.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/mzG6EGgJJ3E3nEDaM8X2q_7e13e68f1af6e3cf2e61f8dc09601445a7167e7efb3af9f059f40d93561cb8c6-image.png)

Populate the list by adding the code in the following example, then call it from your [initialization system](docId\:WaLtn4F57XWvfvmxKCdY7).

```csharp
private void AddVIPCustomerPriceGroup() {
  var metaFieldType = DataContext.Current.MetaModel.RegisteredTypes["ContactGroup"];
  var metaEnumItems = MetaEnum.GetItems(metaFieldType);
  var hasVIPGroup = metaEnumItems.Any(item => string.Equals(item.Name, "VIP", StringComparison.InvariantCultureIgnoreCase));
  if (!hasVIPGroup) {
    var lastIndex = metaEnumItems.Count();
    MetaEnum.AddItem(metaFieldType, "VIP", ++lastIndex);
  }
}
```
