I'm trying to create a coupon code for a customer that gets a fixed value from PHP (essentially it can be a different amount for each customer/instance of generation).
For the coupon code generation, I created a rule and used the code available here: https://mage2-blog.com/magento-1-programmatically-create-promotion-coupon-codes/
The only issue is that it seems the value must be set in the rule.
Is there a way to create coupon codes according to a rule but with different values, or do I need to create a rule as well each time I want to run this?