cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify qualifying order entry in promotion

former_member686625
Participant
0 Kudos

Hi All,

Would like to know if there is any way we can identity the qualifying order entry in the applied promotion. Example, buy product X get discount on product Y.
We can see discountValues information on consumed order entry but nothing on qualified product. We need it for reporting purpose.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member506
Participant
0 Kudos

"buy Product X, get discount on Product Y".

You can know all qualifying order entries, for which promotion triggered in calculation using Promotion Results in Order.

AbstractOrder.getAllPromotionResults() which has list of List of PromotionAction, and these have the qualifying product and quantity for which any promotion triggered. 
former_member686625
Participant
0 Kudos

Hi Pavan,
Thanks for replying but I don't see any information related to the qualifying products in AbstractPromotionAction.
Even the PromotionResultModel from AbstractOrder.getAllPromotionResults() has information about consumed order entry but nothing for qualifying.

Please let me know if I am missing anything.

Thanks

former_member506
Participant
0 Kudos

Hi Manish,

I didn't get what you mean by qualifying order entry, you want to know before applying promotion ? Could you brief the function you are looking at ?

Earlier, I also mentioned about consumed order entry/ Product which is already qualified one and hence promotion triggered.

Thanks!

former_member686625
Participant
0 Kudos

Sure, let me explain.
Consider the promotion Buy X[3] and Get Y[1]. So if customer has 3 quantities of X product then he will get some discount on 1 quantity of Y product.
Here, if I look in backoffice, I can see discount value attached with product Y order entry as action is applied on it but there is nothing on the product X.

We have a reporting requirement where we want to know that product X caused the promotion to trigger.

Thanks again.

former_member506
Participant
0 Kudos

Got it.

I think, we don't have any info on conditional qualifying products because we use Actions in the promotion results which has only affected product and quantity

Some projects get the qualifying products by parsing the source rule conditions of particular promotion type. You can try it.