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. 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
Static Threshold
To enable and configure the automatic notification provisioning based on the static threshold, perform the following steps:
1. Log in as cluster admin into your admin 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.
2. 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.
3. 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.
Consumption Analysis
The consumption-based notifications about balance shortage are done by the qjob.predict_deactivation_accs.cron_schedule job based on the following System Settings in the admon panel:
1. 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.
2. 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.
3. 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.
4. 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.
5. 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.