If you want to associate assigning a role with the purchase of a specific product, you can select your product in the section “Choose a product”
Right underneath, you will get to select a data range, selecting both the start date and the end date.
N.B. If you set up an expiration date, purchasing said product will no longer assign roles after that day and all od 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 and it will be no longer possible to obtain it 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)”: