Skip to content

How to add a Price Rule programmatically in Magento2 backend?

I want to create a price rule, but instead of creating it from within the admin, I want to do it in either Setup/Patch/Data or do another way in backend. How can I accomplish this?