Personal tools
Namespaces

Variants
Actions

SMS Center For WHMCS

From ModulesGarden Wiki
Revision as of 09:39, 23 March 2016 by Karolina (Talk | contribs)

Jump to: navigation, search

Article update is ongoing on this page, watch out for broken links and unclear descriptions!
We are sorry for the inconvenience caused.

Contents

About SMS Center For WHMCS

SMS Center For WHMCS is a module created to send text messages to your clients and administrators each time an email notification is sent through WHMCS.

You will be able to choose from seven different SMS gateways, define SMS templates in various languages and manage text messages in queues.
The module will allow you to verify new clients and orders as well as enable SMS codes as a part of two-factor authentication while logging in to your system.
You will also get the access to SMS messages logs in order to verify the status of each sent text message.

  • Admin Area Features:
✔ Notify Both Your Clients And Administrators via SMS Message
✔ Use SMS Queue To Send SMS Within Defined Time Period
✔ Manage List Of Queued SMS
✔ Define SMS Template Counterpart For Each Email Template
✔ Define Default SMS Template Version For Each Language
✔ Define Notifications To Receive Per Administrator
✔ Enable/Disable Administrator Notifications Per Admin
✔ Enable/Disable SMS Gateways
✔ Check Connection With SMS Gateways
✔ Enable/Disable SMS Templates
✔ Send SMS From Client Summary Page
✔ Merge Fields Support
✔ Characters Counter - Trace Length Of Your Messages
✔ Adjust Format Number To International Automatically
✔ View Logs
  • Client Area Features:
✔ Define SMS Notifications To Receive
  • Security And Verification:
✔ Two-Factor Authentication Submodule - Use Second Layer Of Security
✔ Verify New Client Accounts With SMS Token
✔ Verify New Orders With SMS Token
  • Supported Gateways:
✔ BearSMS
✔ BoxisSMS
✔ Clickatell
✔ InfoBip
✔ MessageBird
✔ SMSEagle
✔ SMSGlobal
  • General Info:
✔ Module API - Integrate Other SMS Gateways
✔ Integrated With Clients Profiler For WHMCS - Send SMS From Any WHMCS Place (read more)
✔ Multi-Language Support
✔ Supports WHMCS Templates Five and Six
✔ Supports WHMCS V5 and V6

Installation

This tutorial will show you how to successfully install and configure SMS Center For WHMCS.

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

Installation

1. Log in to your client area and download SMS Center For WHMCS.
SMSC 1.png
2. Upload and extract the module into the main WHMCS directory.

Files in your WHMCS directory should look like on the following screen.

SMSC 2.png
3. When you install SMS Center For WHMCS for the first time you have to rename 'license_RENAME.php' file.

File is located in 'modules/addons/sms_center/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

SMSC 3.png
4. In order to configure your license key, you have to edit the previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen. You can find your license key in your client area → 'My Products'.

SMSC 4.png

Activate The Addon

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

Log in to your WHMCS admin area and proceed to 'Setup' 'Addon Modules'.
Afterwards, find 'SMS Center' and press 'Activate' button.

SMSC 5.png
6. In the next step you need to permit access to this module.

To do so, click on 'Configure' button, tick checkboxes to assign desired admin roles.
Choose a country code prefix that will be automatically added to the client's SMS number if it has not been specified. Press 'Save Changes'.

SMSC 6.png
7. Now, proceed to the addon → 'Integration Code' and follow integration instructions.

Remember that integration depends on the WHMCS version and template that you are using. If your system used is WHMCS V6.x.x and template: 'Six', there is no need for you to do any integration.
However, if you are working with WHMCS V6.x.x template 'Five' or WHMCS V5 then you must insert the code snippets as it is explained on the screen below.

SMSC 8.png
8. The last thing you need to still do is setting up a cron job. It is advised to set the cron job with a 1 or 2 minutes interval.
/your_whmcs_dir/modules/addons/sms_center/crons/cron.php

Remember to replace your_whmcs_dir with a correct directory of your system.

9. You have just successfully installed SMS Center For WHMCS!

Configuration and Management

SMS Center For WHMCS is a module which allows you to send predefined text messages to your clients the same way emails are sent.

Configuration

Under 'Configuration' tab you will find 'Submodules', 'Administrators' and 'General Settings' sections. Configure each of them to allow full usage of SMS Center For WHMCS module.
Press the first one 'Submodules' to configure and check connection with SMS gateways.

Submodules Configuration

Find here all possible gateways that can be used in our module.

You can use a recommended 'FastSMS' gateway:

SMSC 9 1.png
Or choose form other acceptable gateways:
SMSC 9 2.png
Press 'Configuration' next to a gateway you wish to use.
SMSC 9.png
Configuration of each gateway may vary depending on its requirements.

As an example we will configure SMSEagle gateway.

SMSC 10.png
You can check whether configuration is correct through pressing 'Check Connection'.
SMSC 11.png
If connection is successful, we can proceed.

Activate the gateway, press 'Enable' next to it.

SMSC 12.png

Administrators Configuration

This section contains a list of all staff administrators. You have the possibility here to decide who of them will receive SMS notifications and which notifications exactly.
Follow the steps described below to configure staff notifications properly.
Press 'Administrators' under 'Configuration' tab.
SMSC 22.png
In order to enable SMS notifications for administrators individually, firstly set configuration for them.

1. Fill in the administrator's phone number, where text messages with notifications will be sent.
2. Choose which of the available admin messages shall be sent to that administrator.
Save changes.

SMSC 23.png
Press 'Enable Notifications.'

Repeat these steps for every administrator you wish to receive admin notifications.

SMSC 24.png

General Settings

In 'General' section there are specific SMS configuration possibilities. Configure those you wish to activate and 'Save' the changes once ready!

By default, 'SMS Center' for client area is enabled, you may disable it here.

SMSC 24 1.png

Order SMS Activation

Enable 'Order SMS Activation' to allow activating orders once placed. Once an order is placed a client will receive a text message with a token,
which must be then used to finish the order.

Note, this option does not support orders upgrades!

SMSC 24 2.png
If the above option is enabled, a client when placing an order before being able to complete it must enter a valid token that was sent via SMS.
Only then the order can be completed.
SMSC 37.png
If provided token is correct, the order's verification status is changed to 'Confirmed'.
SMSC 37 1.png

Client SMS Activation

Enable 'Client SMS Activation' and every newly activated client will receive a token, which must be used to end up the activation process.

Declare time intervals for sending tokens here.

SMSC 24 4.png
With the above option enabled, the process of a new client's activation is a little bit different. Start with filling out the client's details.
SMSC 36.png
When added, the client's verification status will be 'Unconfirmed'.
SMSC 36 1.png
To verify activation the new client needs to log in to their client area page and type in the token received via SMS.
SMSC 36 2.png
Client's status has now changed to 'Confirmed'.
SMSC 36 3.png

SMS Queuing

Enable this option to allow text messages queues. Declare time intervals between attempts to send text messages and the number of messages
that can be sent in one attempt. Finally, choose time period when text messages can be sent to clients.

Detailed information on this function is described here.
SMSC 24 3.png

Management

Templates

'Templates' tab contains the list of message templates. Each email template in your system has its text message counterpart.

Any of these messages can be enabled/disabled through marking/unmarking checkbox next to them and pressing 'Save'.

SMSC 13.png
Module comes with default message templates, but you can edit each of them.

Press 'Edit' to do so.

SMSC 13 1.png
The first field is a default message of the template. Our module allows you to define messages for selected languages.

In order to prepare a message in an additional language, select desired language from a dropdown menu and press 'Add' as shown on the following screen.

SMSC 14.png
As you can see on the screen below, a new field for chosen language appeared.

You can remove any additional language through pressing 'x' icon next to it.
Note: Language of a message sent is based on client's language, if message for client's language is not defined, default message will be sent.

SMSC 15.png
Module template supports merge fields which can be easily injected into messages.

Simply, click on the wanted merge field, it will be injected into currently edited version of the message.

SMSC 16.png

SMS Queue

In this section you will find a list of all text messages waiting for a cron run to be sent. Specific details on messages that can be sent in one attempt are specified in 'General Settings' section.
If SMS Queues are enabled every single message before being sent is placed on this list. With every cron run a previously set up number of messages is sent.
If message sending fails (because the number is incorrect, there are problems with gate, no funds etc.) such SMS stays on the list for the next attempt.
After three failed attempts its status is changed to 'Aborted'.
Actions:

1. Send - send message manually.
2. Reload - use when status has changed to 'Aborted' to bring it back to the queue.
3. Delete - remove message form the list.

SMSC 16 1.png

Logs

Messages sent to your clients are logged under 'Logs' tab.

As you can see on the following screen, here you can find detailed information about each message sent automatically to a client after certain actions.

SMSC 17.png

Client's Summary Page

From the clients' summary page you can send text messages to clients using only a simple box.

Type in the message text into the text field like on the screen below and press 'Send'.

SMSC 25.png

Client Area

After placing integration code, a new position appears in the client area navigation menu.

Through pressing it your client will be moved to configuration of SMS notification.

SMSC 18.png
In this place your client can choose which notifications to receive.

Note! Provide SMS Number in the client's profile. Otherwise SMS Notifications will be unavailable for that client.

SMSC 19.png

SMS Center Two-Factor Authentication

SMS center For WHMCS consists of two parts, the actual SMS Center addon and the authentication addon.
Two-Factor Authentication adds an extra layer of protection while logging in. Once enabled and configured by a client or an admin,
each time they sign in they will be asked to enter both username and password as well as a second factor such as a security code.

In order to activate it proceed to 'Setup' 'Staff Management' 'Two-Factor Authentication'.
Afterwards, find 'SMS Center Two-Factor Authentication,' and press 'Activate' button.

SMSC 20.png
In the next step you need to configure the addon settings.

To do so, fill out the data:

  • Enable for Clients - choose this option if you wish all clients to authenticate while logging in their account.
  • Enable for Staff - choose this option if you wish all administrators to authenticate while logging in their account.
  • Activation Code Valid For - decide how long a received code shall be valid, in minutes. Used once before the first log in.
  • SMS Code Valid For - decide how long a received via SMS code shall be valid, in minutes. Used every time to log in after the first authentication.
SMSC 21.png

Security Settings

Clients

If you have activated 'SMS Two-Factor Authentication' addon, your clients will be allowed now to decide if they wish to use such security opportunity.

Here is how to enable such functionality:
1. Log in to your client area, proceed to 'Account Details' 'Security Settings'. There is a button, which once pressed enables two factors authentication configuration for the client.

SMSC 26.png
2. Press 'Get Started' button to proceed with the process.
SMSC 27.png
3. Provide phone number to proceed with SMS Two-Factors Authentication. Press 'Activate'.

This step will be skipped if the client entered a valid SMS number in the profile before!

SMSC 28.png
4. A client should receive now an authentication code via SMS.
Type in the code in the field and press 'Activate.'
Remember that the code is valid only temporarily, according to the addon settings!
SMSC 29.png
5. Two-Factor Authentication is now complete.
SMSC 30.png
6. The second factor is now required to log in. Wait for the SMS with verification code and enter it in the field. Press 'Login.'
If you have any problems with receiving/entering the verification code, you can use your backup code.
Remember to note and keep your new backup code in a secure place!
SMSC 31.png

Administrators

If 'SMS Two-Factor Authentication' addon has been activated and enabled for staff, as an administrator you can decide if you wish to use such security opportunity.

Here is how to enable such functionality:
1. Proceed to 'My Account.' Find a button 'Click here to enable' and press it to start the Two-Factor Authentication process.

SMSC 32.png
2. Press 'Get Started' button to proceed with the process.
SMSC 33.png
3. You will receive now an authentication code via SMS.
Type in the code in the field and press 'Activate.'
Remember that the code is valid only temporarily, according to the addon settings!
SMSC 34.png
SMSC 35.png
4. The second factor is now required to log in. Wait for the SMS with verification code and enter it in the field. Press 'Login.'
If you have any problems with receiving/entering the verification code, you can use your backup code.
Remember to note and keep your new backup code in a secure place!
SMSC 35 1.png

SMS Center And WHMCS API Integration

Underneath you can find short instruction on how to integrate your SMS Center with WHMCS API.
1. Function name: 'sendsms'

2. Required parameters:

  • (phonenumber) OR (userid) OR (adminid)
    AND
  • (messagename) with (relid) - ID of relation, for example invoice or service OR (message) - text of the message


3. Where:
(Relid) for (userid) is an 'integer'
(Relid) for (adminid) it is an 'array'

4. Standard usage example of sending an sms with specified message to a user with given ID:

localAPI('sendsms', array('userid' => $_POST['userid'], 'message' => $_POST['message']), 'admin');

5. Example of usage for admin 'array' with parameters:

array('admin' => 1,'phonenumber' => $number, 'messagename' => 'Service Unsuspension Successful',
'relid' => array('client' => $params['params']['userid'], 'service' => $params['params']['serviceid']))


In case you add phonenumber in the message, you must specify if it is admin's number by entering: 'admin' => 1, like in the example above.
If this is user's number, then you no not need to add that.

Additional Information

  1. SMS Center For WHMCS has been integrated with our Clients Profiler For WHMCS module.
    Find more information about the integration on Clients Profiler For WHMCS Wiki.
  2. SMS Center For WHMCS messages are divided into four categories:
    • messages sent automatically to clients after actions (activity is logged in the addon 'Logs' tab)
    • messages sent automatically to administrators after actions (activity is logged in WHMCS 'Activity Log' )
    • messages sent manually from client's profile (activity is logged in WHMCS 'Activity Log' )
    • messages sent manually from with Clients Profiler For WHMCS widget (activity is logged in WHMCS 'Activity Log' ).

Tips

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. The module is not compatible with Multibrand For WHMCS: there are no contradictions to use the two products together,
however, they are not integrated which means that a client may for example choose from (SMS) templates for every brand (text messages are not branded).
3. The module is not compatible with Resellers Center For WHMCS functionality.
Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
SMS Center For WHMCS