Jump to content
Chris74

Data retention cron - deleting new customers

Recommended Posts

It seems that since 7.5 the cron designed to delete inactive customers is also deleting new customers that have had no activity.

We asked a client to create an account so she could take on a service from someone else. We couldn't find her account but she showed us a screenshot of her welcome Email showing she did indeed create one.

I checked the logs...

25/09/2018 08:06
Client Deleted - ID: 10278
System  
24/09/2018 09:47
Created Client redacted - User ID: 10278
System

Our daily cron runs at 8am, so I can only assume that the account was deleted due to inactivity. We have the automation option " After no invoice or transaction activity has occurred for the following number of months: " set to 72 months - but I think there may be a problem with the way this is calculated and it might also include accounts that have never logged in. Its possible she created the account, received the Welcome Email and never logged into it. Perhaps if she had, the account wouldn't have been deleted.

I wonder if anyone would mind seeing if they can reproduce this.

 

 

Edited by Chris74

Share this post


Link to post
Share on other sites

I think what occurred might make sense with regards to what's detailed in the documentation...

https://docs.whmcs.com/Data_Retention_Policy_Automation

Quote

When enabled, the Data Retention Pruning task is performed daily and will remove clients that meet the following conditions:

  • Are in a status of Inactive or Closed
  • Have no invoices that have been marked paid within the given number of months you specify
  • Have no transactions that have been entered or applied within the given number of months you specify
Important Note: It is the presence of paid invoices or transactions within the given timeframe that defines client records which are kept. Enabling this feature with clients in an Inactive or Closed status, that have no invoice or transaction history, will result in those clients being deleted immediately.

from what you describe, it sounds as though she wouldn't have met those last two conditions (invoices/transactions), so it might come down to account status.

https://docs.whmcs.com/Automation_Settings#Client_Status_Update

Quote

WHMCS automatically sets clients with no active products/services to Inactive status, this helps you to distinguish and filter clients effectively. However you can stop WHMCS from doing this by changing this setting. More information on this feature is available in Client Management.

Disabled - The status of a client will not be changed automatically

Change client status based on active/inactive products - If a client has no active or suspended products/services then their account will automatically be set to Inactive status when the cron job next runs.

Change client status based on active/inactive products and not logged in for longer than 3 months - In addition to the above option, a client's account will only be set to inactive when their last login date was over 3 months ago.

so maybe the cron first changed the client status to "Inactive" (AutoClientStatusSync) and then later the Data Retention (DataRetentionPruning) process that deleted the account (based on the updated status)??

what's the value in Automation Settings for Client Status Update - i'm assuming it's the 2nd option that is enabled? if so, then disabling it should prevent the account from being deleted, or choosing the 3 months option should at least buy you three months before the account is deleted.

Share this post


Link to post
Share on other sites

Ahh yes, in the Miscellaneous section there are two options that will set a client to inactive - Change client status based on active/inactive products  and Change client status based on active/inactive products and not logged in for longer than 3 months

I think it might be a good idea for WHMCS to highlight this in their documentation since they introduced the new customer retention option. Prior to this, it makes sense to set the status of any account to inactive if it has no active products or domains - but since they introduced it, any new client that hasn't yet purchased anything will get deleted within 24 hours of signing up!

Hope this is useful for anyone else who finds themselves in this situation. Just switch to the option - Change client status based on active/inactive products and not logged in for longer than 3 months and that will prevent it happening.

Edited by Chris74

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines