Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
In Rules under Actions I selected Entities -> Create a New Entity -> Commerce Coupon (in the next step no other field shows up).
When I use this action on an Event -> User has logged in, the coupon is not added. If I try to select any other entity, then is normally added at log in.
Do I need to make a custom Rule for making a New Commerce Coupon or am I doing something wrong?
1. Add Action - Entites - Create a new entity
- select Commercce Coupon - Continue - Save
2. 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
3. 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.
Comments
Comment #1
joco_sp commentedIn Rules under Actions I selected Entities -> Create a New Entity -> Commerce Coupon (in the next step no other field shows up).
When I use this action on an Event -> User has logged in, the coupon is not added. If I try to select any other entity, then is normally added at log in.
Do I need to make a custom Rule for making a New Commerce Coupon or am I doing something wrong?
Comment #2
joco_sp commentedHere is a little help.
Actions
1. Add Action - Entites - Create a new entity
- select Commercce Coupon - Continue - Save
2. 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
3. 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.