cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3590
Views
1
Helpful
4
Replies

Social Miner Chat

danish.jalil
Level 1
Level 1

Hi,

I want to create a different interface from where the agent can reply to the social miner chat. Social miner exposes the client side API through which I can pretty UI for chatting. Is there any way I can make an agent reply to the chat in a different interface? I am assuming that by using the Social Miner XMPP notifications, I will get the all the messages sent by the client, which I will open in a different interface. Using this interface the agent will reply to the chat, and I will use the agent API if available to send the message back to the client.

The image below indicates the flow that I want to achieve

CiscoQuestionSM.PNG

Regards,

Danish

4 Replies 4

namahesh
Cisco Employee
Cisco Employee

Hi Danish,

Thanks for explaining your question very well, the diagram is very useful.

Just to understand your deployment - Is this a standalone SocialMiner, or is this SocialMiner deployed as part of the Unified CCX solution?

The current agent interface for chat in SocialMiner is built as an OpenSocial gadget that can be embedded into any OpenSocial gadget container (such as Apache Shindig) outside of SocialMiner UI itself.

The agent chat gadget connects to the XMPP server inside SocialMiner server (using a protocol called BOSH) and sends/receives chat messages via this channel using standard XMPP messages. Along with this, it also handles several actions related to contact state changes, failure scenarios, etc.


Coming to XMPP notifications - these notifications are just to indicate the event that a new chat request has been submitted by a customer into a chat feed (as part of a campaign). It indicates details and metadata about the incoming chat request, and a link to go back to SocialMiner UI to accept the chat request and connect to the customer. The chat media flow (messages) does not follow this path.


In theory, it might be possible to program an XMPP client to behave as the agent-side chat interface. However, in addition to this, things like contact state management etc. also have to be handled by that (and considerations such as authentication etc. need to be taken care of).


Unfortunately, we have not explored the possibility of exposing and documenting agent-side chat interfaces for 3rd-party developers so far, keeping all the above considerations and complexities in mind. Only the customer-side chat interfaces are made available as a clean set of REST APIs that can be used to integrate 3rd-party apps/services with SocialMiner.

Hi Nagendra,

Thank you for your comprehensive answer. The social miner is deployed as part of the Unified CCX solution. Is there any document available through which I can embed the social miners chat gadget to any other container like shindig? I tried doing this with finesse non voice gadget but that is not supported and did not work out for me as mentioned here

Cisco Non-Voice gadget in apache shindig open-social container?

Regards,

Danish

Andreas Stuber
Level 4
Level 4

Hello Danish,

We have developed http://www.expertflow.com/uccx-media-routing/ for this exact scenario. You can develop your own chat platform, your own Finesse gadget or use chat in a different environment altogether (such as Cisco Spark).

We also built a chat framework http://www.expertflow.com/chat/ that you could use on top of it, which allows you to combine any customer-facing chat with any agent-facing chat, and interconnect both to a bot of your choice (until now, we worked with Microsoft LUIS, IBM Watson and rasa.ai).

Hi Team, I was trying to create a chat Room. I have successfully generated a feedID and feedRefURL. Also assigned the feed to campaign. Now when I am making a POST request to http://hq-socialminer.abc.inc:8080/ccp/chat for creating a Chat request, I am getting 500 internal server error.

Error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiErrors>
<apiError>
<errorMessage>the connection to the XMPP server failed
localhost:5222 Exception: XMPPError connecting to localhost:5222.; : remote-server-error(502)
-- caused by: XMPPError connecting to localhost:5222.: remote-server-error(502) XMPPError connecting to localhost:5222.
-- caused by: java.net.ConnectException: Connection refused (Connection refused)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:592)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.connectAndLogin(ChatConnector.java:240)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.init(ChatConnector.java:84)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.getInstance(ChatConnector.java:74)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatService.createChatSocialContact(ChatService.java:770)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatService.create(ChatService.java:747)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:186)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.cisco.ccbu.servlet.IEFriendlyErrorOverrideFilter.doFilter(IEFriendlyErrorOverrideFilter.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:436)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:177)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at com.cisco.ccbu.tomcat.URLParamSingleSignOn.invoke(URLParamSingleSignOn.java:162)
at com.cisco.ccbu.tomcat.ReverseProxyValve.invoke(ReverseProxyValve.java:67)
at com.cisco.ccbu.tomcat.EncodingValve.invoke(EncodingValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Nested Exception:
XMPPError connecting to localhost:5222.: remote-server-error(502) XMPPError connecting to localhost:5222.
-- caused by: java.net.ConnectException: Connection refused (Connection refused)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:565)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.connectAndLogin(ChatConnector.java:240)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.init(ChatConnector.java:84)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.getInstance(ChatConnector.java:74)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatService.createChatSocialContact(ChatService.java:770)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatService.create(ChatService.java:747)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:186)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.cisco.ccbu.servlet.IEFriendlyErrorOverrideFilter.doFilter(IEFriendlyErrorOverrideFilter.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:436)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:177)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at com.cisco.ccbu.tomcat.URLParamSingleSignOn.invoke(URLParamSingleSignOn.java:162)
at com.cisco.ccbu.tomcat.ReverseProxyValve.invoke(ReverseProxyValve.java:67)
at com.cisco.ccbu.tomcat.EncodingValve.invoke(EncodingValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Nested Exception:
java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:344)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at org.jivesoftware.smack.proxy.DirectSocketFactory.createSocket(DirectSocketFactory.java:45)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:557)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.connectAndLogin(ChatConnector.java:240)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.init(ChatConnector.java:84)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatConnector.getInstance(ChatConnector.java:74)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatService.createChatSocialContact(ChatService.java:770)
at com.cisco.ccbu.ccp.publicapps.api.chat.ChatService.create(ChatService.java:747)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:186)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.cisco.ccbu.servlet.IEFriendlyErrorOverrideFilter.doFilter(IEFriendlyErrorOverrideFilter.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:436)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:177)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at com.cisco.ccbu.tomcat.URLParamSingleSignOn.invoke(URLParamSingleSignOn.java:162)
at com.cisco.ccbu.tomcat.ReverseProxyValve.invoke(ReverseProxyValve.java:67)
at com.cisco.ccbu.tomcat.EncodingValve.invoke(EncodingValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
</errorMessage>
<errorType>connect_failed</errorType>
</apiError>
</apiErrors>