SaaS CMS has officially launched! Learn more now.

Customer Group Prices Retrieval


Hello All,

Using EPiServer.Commerce 9.19, assume we have the following prices for a variant:

Market     Customer Group       Min Quantity           Price
Retailer             A                          1                    15.00
Retailer             A                          8                    12.00
Retailer             B                          1                    14.00
Retailer                                        16                   10.00

- What would be all qualified prices for customer group A and B supported out-of-the-box within EPiServer framework?
- If I need to show quantity based prices values in product details page, is the only option I have is to use IPriceDetailValue?
- Can anyone share code snippet for retrieving prices for Customer Group A in market Retailer?

Much Appreciated!

Oct 21, 2016 18:34


IPriceService would work just fine for this case:

It has an overload to load price of certain entry for a specific market with specific PriceFilter - including the CustomerPricing. 

Oct 21, 2016 21:58

Thanks Quan for your comment.

Just want to clarify how the prices framework works, in above prices table, is Customer Group A qualified for 15, 12 and 10 prices or only 15 and 12? (last price tier does not have a customer group)

Edited, Oct 21, 2016 22:03


Customer Group A should qualify for all three - no customer group means that price applies for all customers. As that has Min Quantity 16 so it does not override the other prices. 

Oct 22, 2016 8:46

Hi Quan,

I have used the following EPiServer APIs to get prices for Customer Group A:

  • variationContent.GetPrices(currentMarket.MarketId, new CustomerPricing(CustomerPricing.PriceType.PriceGroup, "A"))
  • variationContent.GetCustomerPrices()

Both of them returned only 2 prices (The prices with customer group A assigned as per above prices table) and not 3 prices as expected (The price with no customer group assigned, in above prices table, was not returned).

I cannot find a way to return prices without a group to customers with a group.

Any idea?

Oct 28, 2016 21:56


If you go directly against the IPriceService you will get more options to load the prices.

You can always select exactly the prices you are after but you need to use an overload that takes an IEnumerable of CustomerPricing and include:

new CustomerPricing(CustomerPricing.PriceType.AllCustomers, string.Empty)

In my experience once you start supplying CustomerPricing you are dictating exactly what you want to load.

The built-in support are based on that the customer is logged in and that you have set up that he should have price group "A" then for example GetCatalogEntryPrices should return the 3 prices you are after as is without any extra PriceFilter.

Kind Regards


Oct 31, 2016 10:17

Thanks Erik for your comment.

I understand that I can get all prices then apply my custom filter but I was looking for using the default behavior by EPiServer.

Unfortunately, using GetCatalogEntryPrices returns all prices including Customer Group B although the customer is assigned Customer Group A.

Oct 31, 2016 16:00

Yes you are right GetCatalogEntryPrices will get you all prices.

Then i am stomped, don't know which functions would filter out the customergroup automaticly.

Unless someone else can give you another solution i would recommend you to define the CustomerPricing yourself:

IPriceService.GetPrices(marketId, dateTimeNow, catalogKey, new PriceFilter{
CustomerPricing = new CustomerPricing[]{


new CustomerPricing(CustomerPricing.PriceType.PriceGroup, "A")


You might need to add some more to the PriceFilter to make it correct, like currency, but that is the basics.


Nov 01, 2016 11:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.