Live chat
Category path: | BILLmanager -> Integration |
BILLmanager Corporate -> Integration | |
Online Chat |
Contents
Installation
In order to install a chat, navigate to "Integrations" --> "Modules"
After you have installed the chat, you will need to add SSL certificates. The chat is running via https. You can also configure departments at this step, see the information below.
Make sure that port 3002 is open in the Firewall on the server, where BILLmanager is installed.
Attention! Saving a certificate chain on CentOS servers may cause issues with authenticating staff members in Live chat. To resolve the issue, delete the certificate chain, or update (install) nodejs from the official web-site
Database management system on a remote serverе
If database is disabled on the server, where you install chat module. You should create file etc/billmgr.conf.d/chat.conf with settings before plugin installation:
ChatDbHost localhost ChatDbUser billchat ChatDbPassword dbpassword ChatDbName billchat ChatDbConnectionLimit 100 path ChatSslKey ../sslcert/chat.key path ChatSslCert ../sslcert/chat.crt ChatSecret {Произвольная строка} ChatPort 3000 ChatUrl https://chat.ispsystem.net:3000 ChatEmployeeName chatemployee ChatEmployeePassword chatemployee_password
In this way module won't try to conncet to database during the installation, so it will be installed without errors.
Chat configuration
To start using the chat, you will need to configure a list of departments who will be able to work in chat, as well as list of staff members from those departments.
Chat domain
Note! A client area can run only on the domain name specified in Provider configuration form -- "Site URL". If the chat's domain is specified in /etc/hosts, where it is assigned to IP 127.0.0.1, make sure ihttpd listens to 127.0.0.1.
Departments
In order to configure departments, navigate to the Providers module --> Edit
1. Available departments - a list of all departments, for which the chat is available. It also includes incoming departments.
2. Incoming departments - a list of departments that receive chats from clients. Then, a staff member can forward the chat to one of the available departments.
Staff members
You should grant access to chat to every staff member from department.
The icon in the "Parameters" column indicates that a staff member can answer in Live chat.
Adding live chat to your web-site
In order to add a live chat to your web-site, add two js-script into the page 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>
- BILLURL - URL of the billing panel or server where chat is located.
- PROJECT_ID - project id in the billing panel (for BILLmanager Standard and Advanced it is always 1)
- lang - client's interface language, e.g. en
- backgroundColor - background color of client's interface.
- borderColor - border color of client's interface.
A certain code for your billing panel can be found in provider's settings.
Working place
To start a Live chat with your customers, you need to navigate to your "working place"
Go to the Dashboard -- "Open chat" or click "Open chat" in the main menu. For correct authorization, log in from the domain name that is specified in "Provider - Billing URL". For example, if https://bill.example.com:1500/billmgr is specified in the configuration form, you won't be able to log in to your working place from IP:1500/billmgr
Configuration file
The configuration file is located in /usr/local/mgr5/etc/billmgr.conf.d/chat.conf
ChatDbHost localhost
ChatDbUser chat
ChatDbPassword NfutsDB9Qq
ChatDbName chat
ChatDbConnectionLimit 100
path ChatSslKey ../sslcert/chat.key
path ChatSslCert ../sslcert/chat.crt
ChatSecret aqSL2VNvZM
ChatPort 3002
ChatUrl https://cent7:3002
ChatEmployeeName chatemployee
ChatEmployeePassword k9lxkHeMs2
Parameters:
- ChatDb* - chat database configuration
- path ChatSsl* - relative paths to files of SSL certificates
- ChatPort - port number
- ChatUrl - chat server URL
- ChatEmployee* - staff member, which synchronizes chat history with the billing panel, and creates incoming messages from client.
Restart the billing panel to apply the changes:
killall core
Restarting chat server
Execute the following command in order to restart the chat server:
systemctl restart billchat.service
Logs
Use the command to view logs:
journalctl -u billchat
To view real-time logs, specify -f:
journalctl -u billchat -f
Synchronizing chat history with the billing system
The synchronization process starts along with the chat, every 15 minutes.