Reselling the Elastic Cloud with WHMCS

269ac00f765508cb74b25d006dbf5bb2

Written by Dennis Nind

Last published at: February 8th, 2019

Currently, we have no automated way of you provisioning the Elastic Cloud to your clients via WHMCS, however this will be introduced in the near future. For now, the following is a great workaround, allowing you to resell the Elastic Cloud / High Availability cPanel product to your clients via WHMCS...


I believe the best way to handle this would be to create a custom product within WHMCS (Setup -> Products and Services) with the following... 

Product Type: Hosting Account 

Welcome Email: Customised** 

Module: None 

In most cases, the Elastic Cloud product is provisioned from a single machine (phantom.cloudns.io), so the simplest thing would be to customise your welcome email, providing the URLs to the phantom server directly. 

In the event, we were to introduce additional Elastic Cloud servers (which is definitely possible given its popularity) you may need to cater for this. 

The following may be a good solution (although, feel free to work this however you wish)... 

1.) Create a new Configurable Option via Setup -> Products / Services -> Configurable Options -> Create a New Group (name this "Elastic Cloud" or whatever you wish, and assign to your Elastic Cloud products) - by using Configurable Options over the Custom Fields in WHMCS, you are able to 'add new servers' in the future / when required from a central location, as opposed to editing each product. 

2.) Once the Group has been created, hit 'Add New Configurable Option' to add a new option in with the following... 

Option Name: Server 

Option Type: Dropdown 

Add Option: phantom.cloudns.io (which is the existing Elastic Cloud server) 

Important: You don't want clients to be able to select this, or configure this from your end. As such, you will need to also select the 'Hidden' checkbox and hit Save Now, I would recommend creating the Welcome Email, using the Configuration Group you have created to provide the URL / link to your clients... 

Setup -> Email Templates -> Create New Email Template selecting 'Email Type' as Product/Service 

The following is a complete guess, as we don't need to do this with root access, however, the template will need to reference the {$service_config_options} field - this though from memory contains an Array() instead of straight output, so you may need to do something like... 

------------------------------- ------------------------------- ------------------------------- 

{$service_config_options.CONFIGOPTIONNAME .value } 

That should output the selected value of the config option you created (in this example, just 'phantom.cloudns.io' - this now makes providing your clients access fairly simple, as you can provide the following in your email template (glorified a little hopefully!)... 

Congrats, your {$service_product_name} has now been activated! 

Username: {$service_username} 

Password:  {$service_password} 

You can access your new high availability plan using the following link... 

https://{$service_config_options.CONFIGOPTIONNAME .value} :2083 

If you want to access webmail for the account, then use the following... 

https://{$service_config_options.CONFIGOPTIONNAME .value} :2083 

etc. etc. etc. 

------------------------------- ------------------------------- -------------------------------  

From here onwards, when you take an order, all you need to do is populate the username and password fields in WHMCS (which are available automatically due to the fact you selected 'Hosting Account' in the earlier steps) then select the relevant server from the list (currently, we have only one server, so its going to be pre-populated anyway!)