How to configure License Expiration

Created on 24 August 2023, over 1 year ago
Updated 25 August 2023, over 1 year ago

Is there any documentation on how to configure the License Expiration field?

The Readme.md simply states:

6. Create one or more products at `admin/commerce/products`
- Its product type must be the one configured in step (5).
- In the product variation, configure:
- License Type
- License Expiration

How do the three License Expiration options work?

"Interval based on reference date"

This provides a Reference date and Interval field. What does the reference date represent? Is it the start date or renewal of the license, or is it just setting the reference date for the interval time field to determine the expiration date?

Rolling Interval

This only provides an interval time field. I assume the interval time sets the expiration date based on the time of purchase.

Unlimited

Unlimited means it never expires.

If I publish a product on 3/1 and set the reference date to 4/1 with an interval of 3 months, I would assume someone purchasing a product after 3/1 would be granted a license that wouldn't expire until 7/1, but it actually expired on 3/31, the day before the reference date. Anything purchased after the reference date of 4/1 did expire three months later on 7/1. Does this mean the reference date should be set to the date it's published?

It's unclear how to configure the License Expiration field and it's an important function for this module. Any help understanding this would be appreciated.

πŸ’¬ Support request
Status

Fixed

Version

3.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States amh5514

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @amh5514
  • Assigned to TomTech
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    Hi @amh5514!

    Great question, and I'm sorry we haven't provided a clearer explanation for this.

    Let's walk through the 3 expiration scenarios that come OOTB.

    Unlimited

    Never expires. Perpetual. Hopefully, this one is straightforward to all! :)

    Rolling Interval

    This means the interval will begin at time of license activation, which is normally at time of purchase.

    It is also possible to configure it so that activation requires approval, in which case the expiration would be based on the date/time that the license was activated.

    Examples:

    1. A license activated on 1/1 with a 3 month rolling interval would expire on 4/1.
    2. A license activated on 1/5 with a 3 month rolling interval would expire on 4/5.
    3. A license activated on 1/20 with a 3 month rolling interval would expire on 4/20.
    4. A license activated on 1/31 with a 3 month rolling interval would expire on 4/30.

    Note: End of month purchases are tricky and there are varying perspectives as to what should be the last day.

    Interval based on reference date

    Given your example of a 3 month interval with a reference date of 4/1, this creates 4 periods over a year. Specifically:
    4/1-6/30
    7/1-9/30
    10/1-12/31
    1/1-3/31

    Examples:

    1. A license purchased on 1/1 with a 3 month interval with a reference date of 4/1 would expire on 3/31.
    2. A license purchased on 2/3 with a 3 month interval with a reference date of 4/1 would expire on 3/31.
    3. A license purchased on 3/1 with a 3 month interval with a reference date of 4/1 would expire on 3/31.
    4. A license purchased on 3/29 with a 3 month interval with a reference date of 4/1 would expire on 3/31.

    A common example of this would be a monthly transit pass. It doesn't matter if you purchase it on the 1st, 10th, 18th, or 30th of the month...it is good for the month only. It could be defined as a 1 month interval with a reference date of 4/1.

    Other scenarios that follow this model include a theatre season pass, a sports season pass, or an amusement park season pass. For each of these there is a seasonal start date and a specific interval that the pass is valid for.

    Additional scenarios

    License Expiration is plugin-based. If these 3 plugins do not meet your use case, it is possible to create a custom plugin that implements the particular rules you specifically require.

  • πŸ‡ΊπŸ‡ΈUnited States amh5514

    No, this was GREAT! Thank you for clearing some of this up.

    You're correct; the Unlimited is straightforward.
    The Rolling Interval is defined and less confusing now, thank you.
    The Interval based on the reference date is still a little confusing. The example you gave works if you need to set a date for some sort of interaction, like the 1st of the month. However, I wouldn't have imagined using it in such a way. Wouldn't a fixed reference date be used for an event?

    For example, a site has an annual membership begins on 7/1 each year. The company wants to allow people to purchase the license up to 3 months before or anytime after the 7/1 start date and have it expire on 6/30 the following year. I would have thought that regardless of when it was published, the granted licenses wouldn't expire until one year after the reference date.

    So the best method would be to set the reference date to the date it is published and the Interval to 15 months (3 months early + 12 months membership) for the above scenario?

  • πŸ‡ΊπŸ‡ΈUnited States amh5514

    To summarize,

    Rolling Interval

    • Rolling Interval starts when the license is activated and expires at the end of the interval period.

    Interval based on reference date

    • Interval based on reference date begins when the license is activated and expires at the reference date unless activated after the reference date; then, it expires at the end of the interval period.
    • The reference date, which only needs to be set once, starts the interval period.
    • When the current interval period ends, it will start a new period directly after.
    • A license granted within the original or any subsequent interval periods will expire at the end of the current period it is in.
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024