Points expiration


  • Default avatar
    peter10    
     2 years ago
    0

    Hi!


    I guess we can consider this a "pre-sale" question, I've been subscribing on AwoCoupon and AwoRewards for a few years but I have not renewed yet.


    Out of curiosity, I checked the changelog, and mentioned in AwoRewards 3.6.0.0 is the expiry of points, and it made me think.


    My most used rule is the "order rule", I give 5% cashback for all purchases.


    I've always just let it run until forever (no expiry points), but it would actually be great if the points expired after let's say a year. I don't know if this feature is already there? There is a config option, "Default expiration of points in days" but I'm not sure what it does (and it's not mentioned in the documentation). For each rule I can set "Rule expiration" but that's probably something else.


    What I would like to achieve is :

    * All current points collected by customers remain but will expire 365 days from now.

    * Points earned on new orders will expire in 365 days from the date of purchase.


    This way I can put "stress" on the customers later when their individual points are about to expire ;).


    Truly grateful for your advice here Seyi :).


    Cheers

    Peter

  • Your avatar
    seyi    
     2 years ago
    0

    Hi Peter,

    Here are the answers to your questions:


    I've always just let it run until forever (no expiry points), but it would actually be great if the points expired after let's say a year. I don't know if this feature is already there?

    This is the points feature yes.


    There is a config option, "Default expiration of points in days" but I'm not sure what it does (and it's not mentioned in the documentation).

    This is the points feature.  So in your case you would set it to 365.  Any time new points are earned, it would set the expiration of the points to 365 days.  There is also the other option 'Update all unused points to latest expiration when new points are earned' which keeps all points expiring at the same time.  So instead of some points expiring in 25 days and some in 27...etc, any time new points is earned, all your points are reset to 365 days.


    For each rule I can set "Rule expiration" but that's probably something else.

    Yes, this is different, this is the expiration of the rule, not expiration of points created within the rule.


    What I would like to achieve is :

    * All current points collected by customers remain but will expire 365 days from now.

    So on upgrade the system would not do this.  Might have to run a one time sql statement to achieve this


    * Points earned on new orders will expire in 365 days from the date of purchase.

    Yes, set the default expiration of points to 365.





  • Default avatar
    peter10    
     2 years ago
    0

    Hi again seyi, I finally bought new licenses for AwoCoupon and AwoRewards.

    I think I understand now how this new "point expiration" feature works, but please help me make sure I got this right :

    Many of my customers already have points earned. Some old customers from years ago, many of them inactive.

    Here is what I want to achieve :

    * I want ALL points earned to this date to expire 365 from now. You wrote a one time SQL statement might be needed to achieve this. Can you help me build this query? :). It's something I can run in phpmyadmin, I assume?

    * From now on, I want each point earned to be valid for 365 days. And with the "Update all unused points to latest expiration when new points are earned" feature, each customer, every time they make a new purchase, ALL their collected points are extended to last another 365 days, correct? So this should be a good way to encourage customers to stay active :).

    Thank you for all your hard work, keep it up!

    Best regards

    Peter

  • Your avatar
    seyi    
     2 years ago
    0

    Hello,

    Code to force all points to expire 1 year from now:
    update #__aworewards SET expiration=(NOW() + INTERVAL 1 YEAR) WHERE credit_type="points" AND expiration IS NULL AND points IS NOT NULL AND  points > 0 AND ( points_paid IS NULL OR points > points_paid )

    Where #__ is your database prefix.  Should be able to run that in phpmyadmin.  Warning, do backup the table first before running, just in case you need to go back.

    And yes, for the option the option 'update all unused points', when an order is made all points will be updated to the current expiration.
  • Default avatar
    peter10    
     2 years ago
    0

    Thanks Seyi! Will give this a try and report back :). All my best Peter
  • Default avatar
    peter10    
     a year ago
    0

    Hey, took a year but I finally managed to test the SQL query :).


    Unfortunately, I'm not sure it did anything. In my #__aworewards table, all earned rules with a timestamp before 2022-11-27 (shortly after I installed the new version supporting points expiration), the "expiration" column remains as "NULL". I would suppose these entries would have today's date + a year from now on?

    Not sure it'll work for my setup, as I noticed the last part of the query : "points_paid IS NULL OR points > points_paid", my "points_paid" column is always the same as "points" - I can't remember how I set this up but I believe my order points are immediately converted into awocoupon balance (Automatic payment - Awocoupon Balance setting), without the need for the customer to "claim" the points. The points just sit in their account, ready to be applied towards their next checkout. So in my case, I suppose it's the awocoupon balance that needs to expire after a year, for my setup? Which would be a totally different feature than the one we're discussing here? Did I get this right? :D

  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    You care correct.  Since you have it automatically being converted to another system, the points are being marked as used, so they can never expire.  Awocoupon balance does not support expiring.  So if you want to have points expires, you cannot automatically move the points to awocoupon balance.  Instead let them sit in the user account and add a module that automatically allows users to convert their points to a coupon to be used directly in checkout when they are ready.  Not as smooth as balance but does get the function in.