Low Balance Notifications
The platform can automatically notify end-users about account balance running low and the necessity of refill to avoid hosted projects disruption. Herewith, depending on your preferences, emails can be sent based on:
- static threshold - when a specific funds value is reached
- consumption analysis - considering the current balance and the average consumption during the most recent period
To enable and configure the automatic notification provisioning based on the static threshold, perform the following steps:
- Log in as cluster admin into your JCA panel and provide the account.personal.min.threshold quota for your user groups (if needed, can be adjusted per customer). The specified value sets the funds threshold to start sending notifications about low balance.
- Next, you can set the frequency of the notifications by adjusting the cron expression for the qjob.threshold_notification.cron_schedule job in System Settings (Expert Mode).
This job compares if the account balance is lower than the account.personal.min.threshold quota and notifies the billing user (no more than once a day). The default “0 15 * * * ?” value runs the job on the 15th minute of every hour.
- If needed, customize the appropriate billing_account_needs_refill email template.
That’s it! The notifications about low balance based on the static threshold are configured.
A period (i.e. a number of the most recent days) to calculate the average consumption for, which is provided in the account.avg.usage.period setting.
Next, the obtained average consumption is compared with the current account balance considering the account.minbalance quota to get the expected value for the number of remaining active days.
For example, if the current balance is 100, the average consumption 12 per day and the account.minbalance is zero, the expectation is 8 days.
- Now, the expectation is compared with a list of the notification periods provided via the account.notification.periods setting.
If the value matches with any of the listed periods, the notification is sent to the appropriate user account.
- You can customize the frequency of the job execution with the appropriate qjob.predict_deactivation_accs.cron_schedule setting.
It is run on the 15th minute of every hour by default. Herewith, the notification is sent no more than once a day.
- If needed, customize the appropriate billing_account_needs_refill_in_days email template.
Now, your customers will be notified on the low balance based on their personal consumption level.