Product Auto Upgrade For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search

Contents

About Product Auto Upgrade For WHMCS

Product Auto Upgrade For WHMCS permits to automatically shift products on the basis of the server resource usage tracked with Advanced Billing For WHMCS module.
It will allow you to set rules related to the server resource usage according to which the module will upgrade/downgrade products and their configurable options at the right time.
You will be also able to let your clients decide if they want their products to be modified as well as enable them to set the rules on their own.
  • Admin Area Features:
✔ Define Product Auto Upgrade Groups
✔ Enable/Disable Product Auto Upgrade Groups
✔ Create Product Auto Upgrade Options
✔ Assign Product To An Option - Configurable Option Support
✔ Define Options Upgrade/Downgrade Rules
✔ Set Up Minimal Upgrade/Downgrade Interval
✔ Enable/Disable Any Product Auto Upgrade Option
✔ Drag & Drop To Reorder Options
✔ Define Client Area Features
✔ View List Of All Hostings Affected By Product Auto Upgrade
✔ Access Product Auto Upgrade History Of Any Hosting
  • Client Area Features:
✔ Enable/Disable Product Auto Upgrade And Product Auto Upgrade Options
✔ Manage Rules Of Product Auto Upgrade Options
✔ Set Up Minimal Upgrade/Downgrade Interval
✔ View Products' Product Auto Upgrade History
✔ Set Up Rules Of Notifications
✔ Define Minimal Notification Interval
  • General Info:
✔ Requires Advanced Billing For WHMCS - Server Resource Usage Billing (read more)
✔ Multi-Language Support
✔ Supports PHP 5.3 Up To PHP 7
✔ Supports WHMCS Templates Five and Six
✔ Supports WHMCS V6 and V7

Installation and Configuration

In this tutorial we will show you how to successfully install and manage Product Auto Upgrade For WHMCS.

We will guide you step by step through the whole installation and configuration process.

1. Log in to your client area and download the module.
AB2 AS 1.png
2. In the downloaded file you will find two packages that support different PHP versions.
As presented on the screen below, the first one is dedicated to PHP 7, while the second one is aimed at PHP 5.3 up to PHP 5.6.
It does not apply to open source versions.

Note: You can check current PHP version in your WHMCS. To do so proceed to 'Utilities' → 'System' → 'PHP Info'.

AB2 AS 2.png
3. Extract the downloaded file and choose the one with the right PHP version. Upload and extract the PHP file into the main WHMCS directory.

Files in your WHMCS directory should look like this.

Drte4.png

Module Configuration

4. Now you have to activate the module in your WHMCS system.

Move to 'Setup' → 'Addon Modules', find 'Advanced Billing' and press 'Activate' button.
Note: Skip this subsection, if you have Advanced Billing For WHMCS already installed.

PAU 5.png
5. In the next step you need to permit access to the module.

To do so, press 'Configure', choose desired admin roles and press 'Save Changes'.

PAU 6.png
6. Now, set up a cron job, you can find it in your WHMCS → 'Addons' → 'Advanced Billing' as shown on the following screen.
PAU 7.png

Extension Configuration

7. Now, you have to activate the extension in your Advanced Billing For WHMCS.

Log in to your WHMCS admin area and proceed to 'Addons' 'Advanced Billing' 'Settings' 'Extensions'.
Afterwards, find 'Product Auto Upgrade' and enable the extension.

PAU 8.png
8. Next, you have to provide your license key.

Press 'Configure' next to the extension.

PAU 8 1.png
9. Paste your license here and then confirm the changes.
PAU 9.png
Your Product Auto Upgrade For WHMCS is ready to use!

Management

To combine any product with Product Auto Upgrade For WHMCS, you need to firstly enable and then configure it in Advanced Billing For WHMCS.

Advanced Billing For WHMCS is used to collect information about hosting's resource usage.
Important: Product Auto Upgrade For WHMCS uses 'Change Package' functionality to switch the products.
Therefore it is required that the products also support this feature.

Admin Area

Before you can do anything you must enable the products you want to work with for Advanced Billing.
PAU 10.png
Only then you have to enable the extension Product Auto Upgrade For WHMCS for each of the products.
Move to 'Settings', find appropriate section and enable the extension.
PAU 10 1.png

Groups of Rules

As you might have already noticed, a new tab dedicated to the extension appeared on your Advanced Billing For WHMCS module main menu.
Under this section there is located the whole management of the extension.

Let's move to 'Configuration' firstly.

PAU 11.png
What you will find there is a full list of autoscaling groups displayed.

Here you can find information such as status of a group, its name and used submodule.
What is more, you can manage groups through using buttons in 'Actions' column to prepare rules for scaling services.

PAU 11 1.png
Let's see now how to create a new group.

Press 'Create New Group' button and a short formula will appear.

PAU 12.png
You can add products and define rules inside of the group which will result in upgrading/downgrading client's hosting.

Name your new group - this name is only for your information and convenience. Then select the product that can be automatically upgraded or downgraded according to resource usage count.
Optionally, you can enable and choose configurable option group that will be used to define products options.
Save the group when it is ready.

PAU 13.png
Your newly created group appeared on the list. Now you can configure it according to your specific needs.
PAU 13 1.png

Group Configuration

There are two main sections where a group can be configured.
  1. 'Settings' - a place where general and client area configuration is set up.
  2. 'Options' - detailed configuration of rules to scale services automatically.
PAU 14.png
Group Settings
General Configuration
  • Group Name - name of a group, can be changed at any time and is visible only to the admin.
  • Server Type - module type of the product allowed in the group.
  • Time Interval - minimum time period between the two products changes that can be made on a single hosting.
  • Notifications Time Interval - defines time between notifications sent to a client.
PAU 14 1.png
Client Area Configuration
  • Display Client Rules Configuration - shows rules of this group for clients with products configured in the group.
  • Modify Rules Configuration - client can modify group rules, changes will affect their product only.
  • Modify Time Interval - client can modify the minimum time between two switches on a single hosting.
  • Allowed Time Interval Values - specifies what time interval a client can use (they will be displayed in the form of a dropdown menu or a textbox with a limited range).
  • Enable Notifications - allows the client to enable/disable notifications.
  • Modify Notifications Time Interval - allows the client to modify minimum time between two notifications.
  • Allowed Notifications Time Interval Values - defines values which can be used by client.

Do not forget to save the configuration when it is ready.

PAU 14 2.png
Group Options
The second place where the group rules are configured is Options section.

These rules will be used by the extension to determine which service should be changed.
Service will be changed according to the parameters set in rules options if the condition of either downgrade rules or upgrade rules has been met.

PAU 15.png
Every group has already some predefined basic options - disabled at the start.
You can base your rules configuration on them or add your own ones in case they are not sufficient.
Let us show how to set the autoscaling rules on the basis of these options.

Before you can do anything, you must configure the upgrade and downgarade rules.

PAU 16.png
'Upgrade Rules'/'Downgrade Rules' can have multiple rules defined.

To add a new rule, select it from a dropdown menu marked on the following screen and press 'Add'.

PAU 17.png
You can define comparison type and threshold of any added rule.

To add a rule which will be fulfilled when the product has more or equal than 3 FTP accounts, choose '≥' from 'Comparison Type' and type '3' into 'Threshold' field.
This example can be seen on the following screen.

PAU 18.png
You also have to define a product for each package that will be used when upgrading/downgrading.
Press button marked on the screen to go on.
PAU 18 1.png
Select the product you need from the available in the dropdown menu.

Then select option you wish to be used by clients and add it. Save the changes.
Important! Options selection is available only if a supported configurable options group has been enabled for the group of rules on its creation.

PAU 18 2.png
Every selected option appears in the box above. Here you can specify available selection under 'Setting' or delete it.
PAU 18 3.png
Repeat that for all packages that you want to enable.

Note that only packages with selected products can be enabled!

PAU 19.png
Additionally, you can change the order the rules are displayed, simply drag and drop a rule and make a previously downgrade rule an upgrade.
PAU 20.png
Add new option, just type in its name, press 'Add New Option' and then configure it like the previous ones.
PAU 21.png
Finally, you can describe shortly each option. Press ' Description' and a text area will appear.
Type in your description there. As you can see you can prepare a few language versions of the description.
PAU 22.png

Accounts

To access the list of hostings affected by the autoscaling groups proceed to 'Product Auto Upgrade' 'Accounts'.

Information about each hosting can be found here along with access to the hosting history.
Press 'View History' near desired hosting to view its history of changes.

PAU 23.png
Hosting history contains the list of changes ever made for the hosting.
PAU 24.png

Client Area

In the following section we will show you client area with all autoscaling features enabled.

As you can see, autoscaling is displayed on the main page of a product right below the Advanced Billing For WHMCS usage records.
Press 'Show' to view details.

PAU 25.png
You can easily enable/disable autoscaling (red) or a selected option (blue) through pressing 'Enabled'/'Disabled' button and saving the changes.

To browse other options, use their names marked on the following screen.

PAU 26.png
Through pressing 'Show Rules' you can manage switching rules of currently displayed option.

Additionally, you can change the minimum interval between the changes through using marked field.

PAU 27.png
Rules are displayed in a table, press pencil icon next to the rule you wish to change.

Do not forget to save changes when you finish.

PAU 28.png
Besides the management of autoscaling, you can view the history of switches made on a hosting through pressing 'History'.
PAU 29.png

Notifications

Client can also set up notifications, they will be sent when requirements defined by a client are met.

For the settings shown on the following screen, notification will be sent once in ten minutes if the following rules are met.
The product number of Installed applications is equal or higher than 10.

PAU 30.png

Sample Usage

In this section we will show you a sample situation when Product Auto Upgrade For WHMCS is used simultaneously with another built-in extension to Advanced Billing - Recurring Billing.
Let's say you have configured 3 cPanel Extended products enabled for Advanced Billing.
PAU 31.png
Each of the products has different limits set:
  • Product A: Max 4 FTP accounts and 500 MB storage.
  • Product B: Max 10 FTP accounts and 1 GB storage.
  • Product C: Max 20 FTP accounts and 5 GB storage.

Afterwards, you have created an autoscaling group, added products listed above to it and defined them with following rules.

PAU 32.png
  • Product A - Lowest
    • Upgrade Rule: ≥ 3 FTP accounts & ≥ 400 MB storage
  • Product B - Middle
    • Upgrade Rule: ≥ 9 FTP accounts & ≥ 8 GB storage
    • Downgrade Rule: ≤ 3 FTP accounts & ≤ 300 MB storage
  • Product C - Highest
    • Downgrade Rule: ≤ 8 FTP accounts & ≤ 7 GB storage
PAU 33.png
Now, this is which is going to happen:

1. A client, John orders product C and creates 3 FTP accounts in it.
2. Advanced Billing cron job changes product C to product B with the first run, and further to product A in the second run (if provided minimum time interval has passed).
3. John uploads 450 MB of files, so now his product meets product A top rule requirement.
4. Cron runs again, and changes his product to product B.
5. John creates additional 7 FTP accounts and uploads files with total size of 550 MB.
6. Now, his product meets product B upgrade rules only partially, therefore cron run does nothing.
7. Some time passes and total amount of storage used by John reaches 8 GB.
8. This time his product meets product B upgrade rules completely and is updated to product C.
9. John removes 4 of his FTP accounts and 1 GB of files.
10. Therefore his product meets product C bottom rules requirements and is downgraded to product B.

That was all about upgrading/downgrading the products, but let us now see how the payments look like.
If your client orders product C and their product gets downgraded to product B, they will be billed with product C price.
However, if the prices and free limits are set per resources, you will help your clients to avoid additional payments if their resource usage is low.
If you do it this way, clients will pay fixed price each month, but additional payment will depend on the resource they use.
In case you own only limited amount of resources, Product Auto Upgrade For WHMCS extension will allow you to use them more efficiently.
Whereas the core Advanced Billing For WHMCS features will let you bill your clients adequately.

Tips

1. If you want to allow access to a certain product only through automatic upgrade/downgrade of another product, you may set such product as hidden.
Product Auto Upgrade For WHMCS allows configuration of hidden products.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. In case you encounter any issues when enabling the extension, please make sure you are using Advanced Billing For WHMCS 3.1.3 or later.
Product Auto Upgrade For WHMCS 2.0.0 is not supported by the previous versions of Advanced Billing.
Personal tools
Namespaces

Variants
Actions
Navigation
WHMCS Modules
cPanel Modules
Magento Extensions
Magento Themes
PrestaShop Modules
Blesta Extensions
General
Social
Product Auto Upgrade For WHMCS