Try our conversational search powered by Generative AI!

Is it possible to add Item Dicount?



I am using the commerce version 10.2.1. I want to create a discount for every product. Like "Buy More than 10 Item Get10% OFF"  

The requirement is like below (these products are in the same category),

product 1 = 11qty (offer applied)

product 2 = 5qty (offer will not be applied)

product 3= 7qty (offer will not be applied)

But for the discount calculation I am using  var discounts = promotionEngine.Run(orderGroup, new PromotionEngineSettings { ApplyReward = false }).ToList();

How to calculate the discount for each line item. Please answer it asap.

Advance thanks.

May 24, 2018 18:46


Are you using the new promotion system or the older, legacy one?

May 24, 2018 18:52

Sorry Bob i am new to epi.How can i differentiate the new and old.I think i am using new one.

<add feature="WorkflowsVNext" state="Enabled" type="Mediachase.Commerce.Core.Features.WorkflowsVNext, Mediachase.Commerce" />

Edited, May 24, 2018 18:59

I can see from your first post that you're using the new promotion system. 

May 24, 2018 21:23

Pls answer or guide me bob. 

May 24, 2018 21:29

I don't know the answer -I'm hoping that someone else more knowledgeable will respond.

May 24, 2018 21:37

Hi Karthikeyan,

By running promotion engine, we calculate and distribute discount info to entire order and line items.

Not sure why you set ApplyReward = false? It should be True to apply/distribute discount info to line items.

Besides, your Commerce version is 10.2.1 (released Dec 30th, 2016), we recommend that you upgrade to latest version of Commerce to get new features, better platform and performances.

/Viet Anh

May 25, 2018 11:31

Thank you Viet Anh for your reply.

Then how to achieve my requirement (Example in my question).

If I add the one category to discount selection.The condition is single item count greater than 10 then 10% discount applied to that items only. But in epi any items in the category equal to 10 then promotion can I restrict that thing.

Else I want to create the promotion for every single product? (but not great idea)

May 25, 2018 12:34

I'm not sure I understand your requirement.

We have a built-in discount: Buy Products for Discount on All Selections.
that you can select the condition (single product/entry or category).

May 28, 2018 7:58

Thank you Viet,

In "Buy Products for Discount on All Selections" if I select the category with a count greater than 10 only will get 10% discount means, The user can select product1(3count),product2(2count),

product3(count5) also will get the discount 10%.But I want it to be like the product(count10),product2(count10)...etc this only eligible to get the discounts as per my requirement.

But not possible to create promotions for 1k(my category contains 1k products) single products.

May 28, 2018 8:58

I got your point.

Creating promotion for each single product is never a good idea. 

I think you can create a custom promotion, that base on a sample one but modify condition block: You select the category but apply discount when single product/entry belongs to selected category fulfill condition (quantity >= 10). 

You can refer this guideline and tell me in case you need more info.

/Viet Anh

May 29, 2018 9:37

Thank you Viet for your answers,

Edited, May 29, 2018 10:53

Viet is it possible set maximum discount amount in epi episerver.

For an example, 2laxh is a total amount the discount is 10% means the user will get the 20k discount amount. How can limit the amount to 10k only?

May 29, 2018 19:14

I understand the case. It's quite common in real offers, that discount X percent but not exceed a fixed amount.

Technically we can do it, customize the reward info. I'm trying with some customizations, but since the promotion system is complex, it may takes time. I'll keep you posted :)

/Viet Anh

May 29, 2018 19:32

Thank you Viet.

May 29, 2018 19:34

Hi Viet,

In our site orders are maintained 3rd party ERP site. So I want to send the total percentage applied to the single can I get that thing.


2discounts are applied to the product(10% and 20%) so the total is not a 30% exactly it is a 28%. So how can i get that in epi or else?

Jun 01, 2018 13:33
* 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.