Module Parameters

The module parameters are the data/values passed into each function when called. Every provisioning module function receives the same parameters. These parameters provide information about the specific product/service the module command runs for. The parameters also contains the settings from the product itself.

Variable Name Description
serviceid The unique ID of the service.
Database Field: tblhosting.id
pid The product ID for the service.
Database Field: tblproducts.id
serverid The assigned server ID for the service.
Database Field: tblservers.id
domain The domain entered by the customer when ordering.
Database Field: tblhosting.domain
username Username generated for the service. (defaults to first 8 letters of the domain)
Database Field: tblhosting.username
password Password generated for the service. (10 char generated on first creation consisting of letters & numbers, both upper & lowercase).
Database Field: tblhosting.password
producttype The product type which can be one of hostingaccount, reselleraccount, server or other.
moduletype The module name (will match filename of module).
configoptionX with X being from 1 to 24.
These fields contain the module settings for the product defined in the ConfigOptions function.
clientsdetails Contains an array of all client details service owner. This contains things like firstname, lastname, email, address1, country, etc…
customfields Contains an array of all custom fields defined on the product.
The key is the custom field name - $params[‘customfields’][‘Field Name’].
configoptions Contains an array of all the configurable options defined on the product.
Again the key being the option name in this case - $params[‘configoptions’][‘Option Name Here’].
server true/false - Is the product assigned to a server.
serverip The IP Address of the selected server.
serverhostname The Hostname of the selected server.
serverusername The Username of the selected server.
serverpassword The Password of the selected server.
serveraccesshash The Access Hash of the selected server.
serversecure true/false - Is an SSL connection enabled in the Server Configuration.
serverport The server port if module supports override with custom port

Config Options

Config Options (do not confuse with Configurable Options) are the module’s settings. These are defined in the ConfigOptions function of the module. Config Options are set on a per product basis. Supplied as a numbered list: $params[‘configoption1’], $params[‘configoption2’], etc. Defined by the order specified in the ConfigOptions function of the module.

Note: Every module function except the _ConfigOptions function receives the $params array. The _ConfigOptions function is unique because it is the only function that is not called in relation to a specific client instance of a product or service.

Custom Fields & Configurable Options

Values from any custom fields & configurable options are passed into modules as parameters. Passed as an array with the key being the name of the field or option.

For example for a custom field called “Username”, would become $params[‘customfields’][‘Username’]. Likewise, a configurable option named “Disk Space”, would become $params[‘configoptions’][‘Disk Space’].