Bot or agent responses are not updating real time on chat widget
If you are not receiving replies from the bot or the agent in the chat widget, then it might be due to one of the following reasons:
- HTML file is opened on the browser from the file system directly. Real time updates require websocket, due to cross origin security policy, websocket doesn't work when html file is opened directly from the file system.
This error can be verified by looking into the browser's console. Check if there are any errors similar to the following:
Access to XMLHttpRequest at 'https://socket.applozic.com/stomp/info?t=1547050628459' from origin 'null' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
To resolve it, serve the html page through the web server such as Apache, Jekyll, Tomcat, Python, Node etc.
Example : How to serve the html file via web server ? Solution : Step-1 Open Terminal. Step-2 Change the current working directory to the directory where HTML file is prsent. Step-3 If you are using Python 2 type command python -m SimpleHTTPServer 8000 for Python 3 python -m http.server 8000. Open your web browser and enter http://localhost:8000 to run the demo.
- Verify if you are running it within a firewall network. Kommunicate uses port 443 for establing a websocket connection. If your network have blocked websocket protocol or port 443, then Kommunicate web plugin will not be able to establish websocket connection with Kommunicate's MQTT based real time update service.
This error can be verified by looking into the browser's consle. Check if there are any errors similar to the following:
https://socket.applozic.com/stomp/info?t=1547037843186 net::ERR_CONNECTION_REFUSED Error in channel notification. Whoops! Lost connection to https://socket.applozic.com/stomp
To resolve it, check with your network team for allowing websocket protocol and port 443.
- If bot configured through dialogflow is not responding, then verify if the service account private key file uploaded to Kommunicate is correct.
Conversations are getting assigned to human agent instead of bot
- Verify if you have configured 'Bot Routing Rules' from Settings -> Conversation Rules
- Select the respective bot to answer queries under "Routing rules for bots".
- If you have recently modified the 'Bot Routing Rules' then test the new behaviour initiating new conversations. Please note that new changes will not be reflected on already created conversations.
If none of the above helps, drop us a mail at firstname.lastname@example.org