If you want to assign a role with the purchase of a specific product, you can select your product or the product variation in the section “Choose a product”.
Right underneath, you will get to select a date range, selecting both the start date and the end date.
N.B. If you set up the expiration date, purchasing said product will no longer assign roles after that day and all of the obtained roles will be removed.
For instance, you might create an allocation rule for a role that’s only available during December (to create a Christmas discount, using YITH Role Based Prices) which expires on the last day of the month.
After this day, the role will be removed from all of the customers who obtained it and that will be no longer possible to obtain using this rule.
Ultimately, you can state if a customer already has a specific role, so that the role won’t be assigned in their case. To do so, choose the role a customer already has from “Do not apply this rule to users with the following role(s)”: