generate a coupon automatically after checkout I have a gift store, customers buy a gift cards. I want to generate a gift code after checkout based on the giftcard they bought (I have gift cards from £25 to £200). they can also buy a gift (product) directly. so the cart might be a mixture of giftcard and products. how can I create a coupon after checkout? I will email them this code after successful checkout

there is no action for creating coupon automatically in rules.
Here is a little help.

Actions


Add Action - Entites - Create a new entity - select Commercce Coupon - Continue - Save
Add Action - Data - Set a data value - select the field you want (ex. entity-ecreated:commerce-coupon-number-of-uses) - enter the value you want - Save
Do the 2. for the fields you want


--

At the end I decided to do my custom Rule action for creating a coupon, because is more flexible.