The Live chat is an additional module for BILLmanager. It is basically a dialog chat with the provider's staff (operators). The Live chat can be placed on the provider's website or inside the control panel interface.
On the provider's side, a live chat is the special work place allowing to get in touch with clients.
The Live chat is integrated with BILLmanager. The synchronization process between the live chat and BILLmanager starts with the start of the live chat and repeats every 15 minutes after it.
- The chat history is available from the billing system interface.
- A provider can use the same BILLmanager account to work in the live chat.
- An operator can get detailed client information directly from the chat interface.
- An operator is able to create a ticket and redirect it to any department directly from the chat interface.
Installation
Configure the database management system
If you install the module on the server with a disabled database management system, create the configuration file: 'usr/local/mgr5/etc/billmgr.conf.d/chat.conf'.
Add the following strings to the file:
ChatDbHost localhost
ChatDbUser billchat
ChatDbPassword dbpassword
ChatDbName billchat
ChatDbConnectionLimit 100
Install the Live chat module
Navigate to Integration → Modules → Live chat → Install. For correct operation of the Live open port 3002 on the server where BILLmanager is installed.
Configuration
The initial configuration page will be opened after the live chat installation.
Chat code
In this section, the javascript code for integration between chat and website is displayed. The Domain chat value will be automatically added to this code.
If the initial configuration has been performed, you can add the live chat to your website. This code is located on the provider's edit page — Provider → Providers → Edit button → Chat settings section, or on the module configuration page Integration → Modules → Settings button opposite to "Live chat" module → Chat code section.
Access details
- Available departments — the list of all departments for which the chat is available. In the chat edit interface, you can assign the live chat to any specific department.
- Staff members — it specifies staff from the selected departments.
- Approved sites — the list of domain names (separated by spaces) allowed to access your live chat server.
Chat domain
A domain is used for connection with the chat and should lead to the BILLmanager server. Select "Another domain" to enter the domain name manually.
SSL certificates
Since the online chat is running over HTTPS, you need to add SSL certificates.
We use self-signed certificates for tests, that's why the chat can be used only on the shop-window. For the correct operation on the selected domain, you need to have a commercial SSL certificate. For example, you can install a free Let’s Encrypt.
Saving a certificate chain on CentOS servers may cause issues with authenticating staff members in the live chat.
To resolve the issue, delete the certificate chain or update (install) nodejs from the official web-site or from the repository. You don't need to upgrade the nodejs version.
Add live chat to your website
Add two scripts to the page code (<body> </body>).
To find the code navigate to:
- Provider → Providers → Edit → Chat settings;
- Integration → Modules → Live chat → Settings → Chat code.
<script type="text/javascript" src="https://BILLURL:3002/js/index.js"></script>
<script type="text/javascript">
if (window.billChat) {
billChat.init({
project: PROJECT_ID,
lang: 'ru',
backgroundColor: '#99c21c',
borderColor: '#CCC',
baseUrl: 'https://BILLURL:3002/'
});
}
</script>
The live chat can be integrated directly in BILLmanager. To do so, go to the brand configuration page and add the chat code to the field "Body" in the "HTML" section.
Additional information
Chat configuration file
The configuration file is located in '/usr/local/mgr5/etc/billmgr.conf.d/chat.conf'. It contains the following strings:
ChatDbHost localhost
ChatDbUser billchat
ChatDbPassword dbpassword
ChatDbName billchat
ChatDbConnectionLimit 100
path ChatSslKey ../sslcert/chat.key
path ChatSslCert ../sslcert/chat.crt
ChatSecret aqSL2VNvZM
ChatPort 3002
ChatUrl https://domain.com:3002
ChatEmployeeName chatemployee
ChatEmployeePassword k9lxkHeMs2
Displaying the current status of employees in the chat
To display the current status of employees in the chat, add the statusMode parameter with the value 2 to the project section of the /opt/billchat/bill.config.js configuration file for the required providers.
"project" : {
"1" : {
"billUrl" : "https://www.example.com/billmgr",
"country" : "182",
"defaultDepartments" : [ 2, 3 ],
"departments" : [ 2, 3 ],
"name" : "Provider1",
"siteUrl" : [ "" ],
"state" : "",
"statusMode" : 2
},
"2" : {
"billUrl" : "https://www.example2.com/billmgr",
"country" : "182",
"defaultDepartments" : [ 2, 3 ],
"departments" : [ 2, 3 ],
"name" : "Provider2",
"siteUrl" : [ "" ],
"state" : "",
"statusMode" : 2
}
Restart BILLmanager to apply the changes:
/usr/local/mgr5/sbin/mgrctl -m billmgr exit
Restart the chat server:
systemctl restart billchat.service
To view real-time logs, use the -f flag:
journalctl -u billchat
journalctl -u billchat -f