Order Rule trigger on Add to Cart

What is the problem you are trying to solve?

Order Rules are superior to Order Validators in almost every single aspect (enabled through the UI, configurable through the UI, support eligibility framework, etc.), except the Order Rule is only triggered when starting the checkout process while Order Validators are triggered whenever there is an item added to the cart. I have a use case where I want the configurability of order rules and I want to use the eligibility framework to target the rules to specific order types or accounts but I need the validation to occur when items are added to the cart.

What is your project about? (e. g. Intranet, Partner Portal, Enterprise Website, etc)

Customer Portal with Commerce Capabilities.

What is your proposed solution? (optional)

Create a new method in the Order Rule interface that would be called when items are added to the cart, similar to what we have in the CommerceOrderValidator.

1 Answer

1

Hi Jeffrey,

Thanks for the detailed write-up. You’ve identified a real gap, and the direction you’re proposing is aligned with where we want to take Order Rules over time. Extending the trigger model to cover add-to-cart (and potentially other cart events) is on our longer-term roadmap.

I can’t share a firm date yet, but a few inputs would help us scope it well: whether the same rule should fire at both add-to-cart and checkout or be configurable per trigger, the expected rule volume at add-to-cart (performance matters when every cart mutation re-evaluates), and how you’d want failures surfaced in the cart UI.

Happy to continue the conversation as we firm things up.

Please find here the related user story.

Thanks,
Antonio