Skip to main content
Skip table of contents

Chat Server Configurations

Following is the procedure to configure Chat Server:

  1. Stop EF_ChatServer  service in Windows Services pane
  2. Navigate to <installation-dir>\hybrid-chat\core\chat_server\config  directory
  3. Open config.json file with any text editor
  4. Save the file after configuration changes and start EF_ChatServer  service
  5. Chat Server logs can be found at /EFLogs/chat-solution/chat-server 

Configuration

Follow JSON Schema rules for changes in config.json  file. Following is a sample of this file:

config.json

JS
{
  "ActiveMQ": {
    "GeneralQueue": "General",
    "host1": "localhost",
    "host2": "localhost",
    "priority": 100,
    "port": "61615",
    "url": "https://localhost:8162",
    "username": "admin",
    "password": "admin",
    "tls": true,
    "certificatePath": "https/client.pem",
    "certificateKeyPath": "https/client.key",
    "certificateAuthorityPath": "https/broker.pem",
    "passphrase": "password",
    "heartbeat": "9000,3000",
    "timeout": 3000
  },
  "TranscriptService": {
    "enabled" : true,
    "PdfOptions": {
      "Author": "EF Chat Service",
      "Title": "Chat Transcript",
      "Creator": "EF Chat Server",
      "Producer": "EF Chat Server",
      "TranscriptsDirectory": "./resources/transcripts",
      "FontsDirectory": "./resources/fonts",
      "Font": "calibri_light.ttf",
      "HeadingFont": "Calibri.ttf",
      "FooterText": "Powered by ExpertFlow Chat Server",
      "ActivityMessageBackgroundColor": "#bad3fc",
      "ActivityMessageTextColor": "#1b3766",
      "ChatMessageTextColor": "#000",
      "TranscriptPageSize": "Letter",
      "MainLogo": "./resources/logos/transcript-logo.png",
      "HeaderText": "Chat Transcript"
    },
    "EmailOptions": {
      "EmailAddress": "chatserver.expertflow@gmail.com",
      "Password": "Expertflow464",
      "Host": "smtp.gmail.com",
      "Port": 587,
      "Secure": false,
      "Body": "PFA",
      "Subject": "Chat Transcript"
    }
  },
  "conversation": {
    "wrapUp": {
      "enabled": false,
      "wrapUpTime": 0
    }
  },
    "agent": {
    "reconnectTime": 30,
    "alias": "ExpertFlow"
  },
  "server": {
    "port": 8444,
    "ssl": {
      "enabled": true,
      "socket_connection_limit": 1000,
      "privateKey": "https/localhost.key",
      "certificate": "https/localhost.cert",
      "passphrase": ""
    },
    "transport": {
      "pingInterval": 3000,
      "pingTimeout": 6000,
      "debug_transport": "false"
    },
    "certificateBundlePath":"https/chat-server.ca-bundle"
  },
  "bot": {
    "enabled": false,
    "directHandOff": true,
    "primaryBotId": "bot",
    "handOffThreshHold": 1.1,
    "handOffIntent": "human",
    "handOffText": "Please wait, We are finding an agent for you"
  },
    "connector": {
    "smsLanguage": "en"
  },
  "db":{
     "url": "https://localhost:8450",
     "type": "mongo",
     "lastAgentAPI":"https://localhost:8450/getLastAgent?type=outbound&refId={refId}"
  },
  "reporting": {
    "enabled": true
  },
   "mre_microservice": {
     "url" :"https://localhost:8447"
  },
  "mre_url": "https://127.0.0.1:8095/",
  "cim" : {
    "isIntegrated" : false,
    "labelsUrl": "http://192.168.2.50:8081/cim/label",
    "queryUrl": "http://192.168.2.50:8081/cim/customer?query=phone:{refId}"
  },
  "FILE_SERVER_URL": "https://127.0.0.1:8495/",
  "pcs":{
      "intent":""
    },
  "history_port": "",
  "history_username": "",
  "history_password": "",
  "enable_announcements": true,
  "scale": false,
  "instance_id": "chat_server_1",
  "subscribe_external": true,
  "customerReconnectTime": "30",
  "RESPONSE_TO_NULL_INTENT": ""
}


Following table explains configuration parameters


Configuration VariableDefault ValueExpected valueLimitationsDescription
1ActiveMQ.GeneralQueueGeneralString
Name of the ActiveMQ queue where Communication Server listens. Chat Server is the only producer of this queue. Do not change.
2ActiveMQ.host1localhostStringThis is TCP connection, HTTP & HTTPS are not supportedHost of ActiveMQ server
3ActiveMQ.host2localhostStringThis is TCP connection, HTTP & HTTPS are not supportedHost of ActiveMQ server
4ActiveMQ.priority1000


5ActiveMQ.port61615Number61615 if ActiveMQ.tls is true , false  otherwisePort where ActiveMQ Stomp listener is exposed. 
6ActiveMQ.urlhttps://localhost:8162Stringhttps://<fqdn>:8162 if ActiveMQ.tls is true , http://<fqdn>:8161 otherwiseActive MQ HTTP endpoint url. Provide core host machine fqdn here not reverse proxy
7ActiveMQ.usernameadminString
ActiveMQ HTTP endpoint username
8ActiveMQ.passwordadminString
ActiveMQ HTTP endpoint password
9ActiveMQ.tlstrueString true / false 
Specifies to connect ActiveMQ over TLS. true  for TLS traffic, false  otherwise
10ActiveMQ.certificatePathhttps/client.pemStringApplicable only when ActiveMQ.tls is true ActiveMQ client certificate path for TLS traffic
11ActiveMQ.certificateKeyPathhttps/client.keyStringApplicable only when ActiveMQ.tls is true ActiveMQ client certificate key path for TLS traffic
12ActiveMQ.certificateAuthorityPathhttps/broker.pemStringApplicable only when ActiveMQ.tls is true ActiveMQ certificate authority path
13ActiveMQ.passphrasepasswordStringApplicable only when ActiveMQ.tls is true ActiveMQ certificate authority passphrase
14ActiveMQ.heartbeat9000,3000String

15TranscriptService

This configuration is not being used anymore (whole Transcript JSON block)


16conversation.wrapUp.enabledfalseBoolean

17conversation.wrapUp.wrapUpTime0Number

18agent.reconnectTime30Number
Time in seconds when an agent can reconnect in case of disconnection, agent is logged out after this time expires and his / her chats are re-routed.
19agent.aliasExpertflowString
Agent name to show to customer
20server.port8444Number
Server port where Chat Server is hosted
21server.ssl.enabledtrueBoolean
Specifies Chat Server is hosted on HTTP or HTTPS. true  for HTTPS, false  otherwise
22server.ssl.socket_connection_limit1000Number

23server.ssl.privateKeyhttps/localhost.keyStringApplicable only when server.ssl.enabled is true Server certificate key file
24server.ssl.certificatehttps/localhost.certStringApplicable only when server.ssl.enabled is true Server certificate which is offered to clients when hosted
25server.ssl.passphrase
StringApplicable only when server.ssl.enabled is true Server certificate passphrase
26server.transport.pingInterval3000Number
Socket.io pint interval
27server.transport.pingTimeout6000Number
Socket.io ping timeout before declaring the connection as disconnected. 
28server.transport.debug_transportfalseString true / false 
Debug socket.io transport for potential issues
29server.certificateBundlePathhttps/chat-server.ca-bundleString
Certificate bundle is keystore for Chat Server, it consists of all client certificates of components which Chat Server accesses via REST endpoints over HTTPS
30bot.enabledfalseBoolean
Specifies if a bot is integrated with Chat Server
31bot.directHandOfftrueBoolean
if true  all customer requests are directed to human agent without passing them to conversation with bot
32bot.primaryBotIdbotString
Bot id presented by Bot Connector
33bot.handOffThreshHold0.1Floating point NumberApplicable only when bot.directHandOff is false Threshold for chat handoff to human agent
34bot.handOffIntenthumanStringApplicable only when bot.directHandOff is false Customer chat is sent to human agent if specified keyword / intent is received in chat from customer
35bot.handOffText...StringApplicable only when bot.directHandOff is falseMessage shown to customer when bot hand offs a request to human agent
36bot.connector.smsLanguageenString

37db.urlhttps://localhost:8450String
Database Connector URL
38db.typemongoString
This is an obsolete variable, do not change.
39db.lastAgentAPIhttps://localhost:8450/getLastAgent?type=outbound&refId={refId}String

40reporting.enabledtrueBoolean

41kafka.enabledfalseBooleanKafka is not supported anymore, keep this configuration false
42mre_microservice.urlhttps://localhost:8447String
MEW Microservice URL
43mre_urlhttps://127.0.0.1:8095/String
MRE URL
44cim.isIntegratedtrue/falseBoolean

45cim.labelsUrlhttp://192.168.2.50:8081/cim/labelString

46cim.queryUrlhttp://192.168.2.50:8081/cim/customer?query=phone:{refId}String

47FILE_SERVER_URLhttps://127.0.0.1:8495/String

48history_port
port
The history page is accessible through this port. If set to empty, the history page will be hosted on the default chat-server port.
49history_username
String
username to authenticate the user for history page access
50history_password
String
the password to authenticate the user for history page access, if the value is empty then the user can access the history page without authentication.
51enable_announcementsTrue/Falseboolean
When true, announcements will be available. Default is true.
52scalefalseBoolean
This variable defines if Chat Servers are deployed in scale mode on the same host. Please note that agents will only be able to connect and take Chats landed on a single Chat Server in scale mode. The other Chat Server will serve only Bot conversations.
Do not change the default value.
53instance_idchat_server_1String
Chat Server instance id in case SCALE=true, do not change the default value if Chat Server is deployed in singleton mode.
54subscribe_externaltrue/falseBoolean
Only used when SCALE=true, the Chat Server with SUBSCRIBE_EXTERNAL=true can only take chats from the channels other than web.
55customerReconnectTime30Number
This is time in seconds for which Chat Server waits for a web customer to reconnect after a network outage between Customer Gadget and Chat Server. After this time expires, Chat Server ends the chat.
56RESPONSE_TO_NULL_INTENT



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.