Contents

Introduction

Logs Required

Bubble Chat Flow

Logs Analysis

Step 1. Client Console logs: Click to Chat.

Step 2. SM ccppublicapps: DB dip to mmca_webhook

Step 3. UCCX MADM: Receives Request for the Widget Config.

Step 4. SM Publicapps:200 OK on the Widget Config.

Step 5. Client console logs: Response to Client Browser that shows Details in JSON.

Step 6. SM Publicapps: Incoming Chat Request.

Step 7. SM Runtime: Social Contact is Created.

Step 8. SM Publicapps: Updates the created SocialContact to the public API.

Step 9. SM Runtime: Sends the Notification to CCX Webservice API on MADM.

Step 10. UCCX MADM: Webservices shows Incoming Chat Request.

Step 11. UCCX MADM: Send JMS message to CCX Engine.

Step 12. UCCX MIVR:

Step 13. SM Publicapps: Agent Joins and Chats Session has Started.

Step 14. Client Console Logs: Agent Joins Chat Room.

Step 15. SM Publicapps: User Leaves the Chat Room.

Step 16. Client console logs: User Browser shows Chat Rating Success.

Step 17. SM Publicapps: ccppublicapps Receives the Post Chat Rating from the Browser.

Step 18. UCCX MIVR: XMPP Update Received from SM.

Step 19. UCCX MIVR: Write Chat Rating to Database.

Introduction

This document describes the Bubble chat flow along with the end-to-end log analysis for a working bubble chat, which can be used as a working reference to troubleshoot the issues.

The Unified Contact Center Express (UCCX) solution with the release of UCCX and SocialMiner (SM) 11.6(2) have added the new bubble chat feature.

The Bubble Chat (or Chat Bubble) feature allows you to reach a business using a minimally intrusive, floating chat webform that moves with the web page (with scrolling), is totally customizable and also instantly updates any customization without the need to re-deploy the webform on the site.

Contributed by Jayant Suneja, Arunabh Bhattacharjee, Cisco Engineering.

Logs Required

In order to trace the whole flow, logs cover the chat initiator (customer) to the UCCX.

- Client Console Logs: These are the browser console logs where the end usmer initiates the chat.

- SM Logs: ccppublicapps logs, runtime logs, tomcat logs.

- UCCX logs: MIVR logs ( Engine logs with SS_CHAT and SS_ROUTEANDQUEUE debugging), MADM logs (CCX Admin logs With UCCX_WEBSERVICES).

The rest of the analysis (after the chat room is joined) is identical to the classic chat flow (i.e simple XMPP eventing between the SocialMiner Agent gadget on Finesse and the end customer - who are connected over an XMPP tunnel)

Bubble Chat Flow

The flow can be summarized by the 19 steps shown in this image.

Each step is outlined in the logs.

Logs Analysis

When a customer clicks on the Click to chat button, the Bubble chat form is presented using the JavaScript code in the chat widget.

The Bubble chat form does server-side rendering - where it fetches the chat configuration to load the UI for the end user to start a chat.

If you open the chat widget, you will see the URL configured in this format:

https://<SOCIALMINER>/ccp/ui/BubbleChat.html?host=<SOCIALMINER>&wid=<WIDGET_ID>&secure=true

The <SOCIALMINER> and <WIDGET_ID> are the SocialMiner FQDN and the widget ID respectively.

The configuration received here is in the JSON form.

Step 1. Client Console logs: Click to Chat.

1. Once end customer presses Click to chat on the webpage it does a GET to SM through these three URLs.

2. Note the Widget ID is sent in the third request.

3. All these should return with a successful 200 OK in order to load bubble chat window.

1) GET https://sm-fqdn/ccp/ui/BubbleChat.html?host=sm-fqdn&wid=1&secure=true

[HTTP/1.1 200 OK 0ms]

2) GET https://sm-fqdn/ccp/ui/js/ccp/bubblechat/ccp-chat-components.js

[HTTP/1.1 200 OK 0ms]

3) GET https://sm-fqdn/ccp/bubblechat?wid=1

[HTTP/1.1 200 OK 289ms]

Step 2. SM ccppublicapps: DB dip to mmca_webhook

1. SM does a db dip to the mmca_webhook table on the SM Informix database and fetches the Webhook URL for this incoming chat request with the help of Widget ID. In our case, it is widegetid=1.

2. SM then uses this webhook URL to fetch the widget configuration from UCCX.

0000000323: 10.78.91.166: Aug 06 2018 09:24:09.538 +0530: %CCBU_________CCPAPI-6-REST_API_INFO:

Fetching bubble chat config from hook url:

https://uccx-fqdn/uccx-webservices/chat/config/1

0000000324: 10.78.91.166: Aug 06 2018 09:24:09.538 +0530: %CCBU_________CCPAPI-6-REST_API_INFO:

Fetching bubble chat config from hook url:

https://uccx-fqdn/uccx-webservices/chat/config/1

Step 3. UCCX MADM: Receives Request for the Widget Config.

1. The UCCX Webservices as a part of MADM receives this request to get the widget configuration.

2. The Widget configuration contains the font typefaces, colours, the styling of the chat widget, form info, etc.

3. UCCX then does a DB dip and fetches widget configuration from the chatbubble table on UCCX Informix (db_cra).

4. This configuration is returned back to the user's browser via the ccppublicapps API as a JSON response.

7199526: Aug 06 09:31:21.235 IST %MADM-UCCX_WEBSERVICES-7-UNK:[http-bio-443-exec-14] ServiceLogger:

Request Url: https://uccx-fqdn/uccx-webservices/chat/config/1

7199527: Aug 06 09:31:21.235 IST %MADM-UCCX_WEBSERVICES-7-UNK:[http-bio-443-exec-14] ServiceLogger:

Match Found for https://uccx-fqdn/uccx-webservices/chat/config/1

7199528: Aug 06 09:31:21.235 IST %MADM-UCCX_WEBSERVICES-7-UNK:[http-bio-443-exec-14] ServiceLogger:

ChatResource: Received a chat config GET request for chat widget id : 1

Step 4. SM Publicapps:200 OK on the Widget Config.

SM receives the 200 OK for the GET request it sent to CCX to fetch chat widget config.

10.78.91.166: Aug 06 2018 09:31:21.297 +0530: %CCBU_________CCPAPI-6-REST_API_INFO:

Received success response within 100 milliseconds

10.78.91.166: Aug 06 2018 09:32:38.684 +0530: %CCBU__CCPPUBLICAPPS-6-PUBLICAPPS_SESSION_CREATED:

%[session.id=3F8B8C08D7E8144C7B1AD7AF144A4C1E][session_timeout=300]: ccppublicapps: new publicapps

session

Step 5. Client console logs: Response to Client Browser that shows Details in JSON.

1. Here is a sample of JSON response received on the client side as part of all the above operations.

2. This JSON is used to load the bubble chat window through the configured font, problem statement, color etc as received.

Note: All the above operations are done in order to load bubble chat window so the customer can now fill up his details to start to chat with the contact center. Further flow once customer submits chat details is the same as it was in the classic/ legacy chat flow.

GET https://sm-fqdn/ccp/bubblechat?wid=1[HTTP/1.1 200 OK 289ms]

Response:

{"feedId":"100000","postChatRatingEnabled":true,"messages":{"agentJoinTimeoutMsg":"All our customer care representatives are busy. You may wait or try again later.","transcriptPopupPositiveMsg":"Yes","transcriptPopupMsg":"Chat has ended. Do you want to download the chat transcript?","transcriptPopupNegativeMsg":"No","connectivityErrorMsg":"Chat disconnected due to inactivity timeout or connection failure.","agentLeftMsg":" ${agent_alias} has left the chat","ratingButtonText":"Submit","offHourMessage":"Sorry, we are not available at the moment.","textForTypingMsg":"Type your message and press Enter","agentJoinedMsg":" ${agent_alias} has joined","closeChatPopupMsg":"Do you want to close the chat?","closeChatPopupNegativeMsg":"No","ratingLabel":"Rate your chat experience","chatErrorMsg":"Chat service is currently unavailable. Try later.","closeChatPopupPositiveMsg":"Yes","welcomeMessage":"Thank you for contacting us. A customer care representative would assist you soon."},"contextServiceFieldSets":"","chatForm":{"bubbleStyle":{"titleText":"CCBU Care Startup","titleTextColor":"#0AB7D7","buttonText":"Start Chat","buttonTextColor":"#FFFFFF","buttonBackgroundColor":"#0AB7D7","problemStmtCaption":"Choose a problem statement","afterResumeNewChatMsg":"New Message","agentMessageTextColor":"#FFFFFF","agentMessageBackgroundColor":"#0AC391","fontFace":"Helvetica"},"formFields":["Title","Name","Details","Email","PhoneNumber","AddressLine1","AddressLine2","Anything important to note","Teléfono","Cédula"],"problemStatements":{"caption":"Choose a problem statement","statements":[{"statement":"Insuarance","csqTag":"Chat_Csq1"},{"statement":"Debit","csqTag":"Chat_Csq1"},{"statement":"Credit","csqTag":"Chat_Csq1"},{"statement":"Account","csqTag":"Chat_Csq1"}]}},"proactiveChat":false,"name":"Bubble1162","id":1}

Step 6. SM Publicapps: Incoming Chat Request.

The incoming chat request is received by SM and social contact is created:

0000001136: 10.78.91.166: Aug 06 2018 09:32:38.692 +0530: %CCBU__CCPPUBLICAPPS-6-CHAT_ROOM_DETAILS: %[Nickname=Jayant Suneja][RoomJid=socialminer_chat.16@conference.127.0.0.1][RoomSubject=Chat with Jayant Suneja][social_contact_id=null]: Create chat room with the following details

Step 7. SM Runtime: Social Contact is Created.

Social contact is created by the SocialMiner engine (Runtime service).

0000399687: 10.78.91.166: Aug 06 2018 09:32:38.764 +0530: %CCBU__________FEEDS-6-SOCIAL_CONTACT_CREATED: %[SOCIAL_CONTACT_ID=0D66B2241000016500235A740A4E5BA6][SOCIAL_CONTACT_LINK=https://sm-fqdn/ccp/socialcontact/0D66B2241000016500235A740A4E5BA6]: A new social contact was created

Step 8. SM Publicapps: Updates the created SocialContact to the public API.

Social contact is created update is seen in ccppublicapps logs.

0000000337: 10.78.91.166: Aug 06 2018 09:32:38.767 +0530: %CCBU_________CCPAPI-6-CREATE_SOCIAL_CONTACT: SocialContact successfully created with requestId: y3xQxE

0000001142: 10.78.91.166: Aug 06 2018 09:32:38.768 +0530: %CCBU__CCPPUBLICAPPS-6-CHAT_CREATED: %[Contact=https://sm-fqdn/ccp-webapp/ccp/socialcontact/0D66B2241000016500235A740A4E5BA6][Room=socialminer_chat.16@conference.127.0.0.1][Session=3F8B8C08D7E8144C7B1AD7AF144A4C1E][social_contact_id=null]: Chat created

Step 9. SM Runtime: Sends the Notification to CCX Webservice API on MADM.

Notification is sent from SM to CCX web services apprising CCX that there is new incoming chat.

0008541000: 10.78.91.166: Aug 06 2018 09:32:38.940 +0530: %CCBU___NOTIFICATION-6-NOTIFICATION_SUCCEEDED: %[Notification=com.cisco.ccbu.ccp.notification.Notification@1beea47[enqueueTime=1533528158834,rule=com.cisco.ccbu.oamp.omgr.transfer.HttpNotificationRule@15a2eb1[httpUrl=https://uccx-fqdn/uccx-webservices/contact,httpUsername=<null>,httpPassword=<null>,sslVerifyCertificates=false,campaignId=100001,tags=[ccx_chat_req],id=100006,name=CCX Chat Notification for HA - Backup,description=Created by CCX application as part of CCX chat configuration.,changeStamp=1,lastUpdated=1527579740301,ouId=4],screenPopUrl=http://sm-fqdn/results.jsp?scID=0D66B2241000016500235A740A4E5BA6&campaignID=CCX_Chat_Campaign,body=<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<SocialContact>

<author>Jayant Suneja</author>

<description></description>

<extensionFields>

<extensionField>

<name>AddressLine1</name>

<value>1900</value>

</extensionField>

<extensionField>

<name>AddressLine2</name>

<value>9th street</value>

Step 10. UCCX MADM: Webservices shows Incoming Chat Request.

Incoming chat contact is received by CCX on MADM with UCCX_WEBSERVICES enabled to debug.

7199571: Aug 06 09:32:39.079 IST %MADM-UCCX_WEBSERVICES-7-UNK:[http-bio-443-exec-7] ServiceLogger: New incoming contact : <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<contactXML>

<author>Jayant Suneja</author>

<id>0D66B2241000016500235A740A4E5BA6</id>

<integrationAuthTokenGUID>d64fe6ac-9687-4ecd-9f00-0e6ec02c6945</integrationAuthTokenGUID>

<notificationTag>ccx_chat_req</notificationTag>

<publishedDate>1533528158684</publishedDate>

<refURL>http://sm-fqdn/ccp-webapp/ccp/socialcontact/0D66B2241000016500235A740A4E5BA6</refURL>

<replyTemplateURL>http://sm-fqdn/multisession/ui/templates/reply/cisco_agent_ms_chat.jsp</replyTemplateURL>

<sourceType>chat</sourceType>

<status>unread</status>

<statusReason>unknown</statusReason>

<statusTimestamp>1533528158756</statusTimestamp>

<tags>

Step 11. UCCX MADM: Send JMS message to CCX Engine.

The engine is now informed of the new contact via JMS message bus, i.e UCCX MADM (Administration Webservice API) informs the MIVR (Engine) to queue this contact.

7199573: Aug 06 09:32:39.080 IST %MADM-UCCX_WEBSERVICES-7-UNK:[http-bio-443-exec-7] ServiceLogger: Sending JMS message to Contact Topic: ContactEvent [operation=ADD, contactXML=ContactXML [author=Jayant Suneja, id=0D66B2241000016500235A740A4E5BA6, replyType=chat, notificationTag=ccx_chat_req, refURL=http://sm-fqdn/ccp-webapp/ccp/socialcontact/0D66B2241000016500235A740A4E5BA6, replyTemplateURL=http://sm-fqdn/multisession/ui/templates/reply/cisco_agent_ms_chat.jsp, integrationAuthTokenGUID=d64fe6ac-9687-4ecd-9f00-0e6ec02c6945, userExtensionFields=[UserExtensionField [name=AddressLine1, value=1900], UserExtensionField [name=AddressLine2, value=9th street], UserExtensionField [name=Anything important to note, value=Bill Issue], UserExtensionField [name=Cédula, value=Bill Issue], UserExtensionField [name=Details, value=Test Bubble Chat], UserExtensionField [name=Email, value=xxxx@gmail.com], UserExtensionField [name=Name, value=Jayant Suneja], UserExtensionField [name=PhoneNumber, value=97xxxxxxxx], UserExtensionField [name=Teléfono, value=Bill Issue], UserExtensionField [name=Title, value=Mr.], UserExtensionField [name=ccxqueuetag, value=Chat_Csq1], UserExtensionField [name=h_chatOrigin, value=CISCO_BUBBLE], UserExtensionField [name=h_chatRoom, value=socialminer_chat.16@conference.127.0.0.1], UserExtensionField [name=h_widgetName, value=Bubble1162]], tags=[ccx_chat_req], sourceType=chat, status=unread, statusReason=unknown, publishedDate=1533528158684, title=CCX_Chat, campaignPublicId=null, statusTimestamp=1533528158756]]

Step 12. UCCX MIVR:

The Chat Subsystem (SS_CHAT) queues the chat contact and the Route and Queue Subsystem (SS_ROUTEANDQUEUE) allocates the chat to the agent. This is seen in the UCCX Engine logs (MIVR) with SS_CHAT and SS_ROUTEANDQUEUE enabled to debug.

3722751: Aug 06 09:32:39.144 IST %MIVR-SS_CHAT-7-UNK:[pool-8-thread-15] ChatSubsystemLogger: com.cisco.wf.subsystems.chat.observer.ContactNotificationObserver : Contact Notification received - ContactNotification [requestId=, contactId=0D66B2241000016500235A740A4E5BA6, contactState=QUEUED, handlerQueue=-1, startTime=1533528159105, endTime=-1, queueWaitDuration=0, handlingDuration=-1, terminalStateContact=ChatContact(Contact[id=0D66B2241000016500235A740A4E5BA6,state=QUEUED,dispReason=UNKNOWN]), dispositionReason=UNKNOWN, mediaType=CHAT, sequenceNumber=0, statusTimeStamp=1533528158756]. Notification Type UPDATE

3722752: Aug 06 09:32:39.144 IST %MIVR-SS_ROUTEANDQUEUE-7-UNK:[pool-8-thread-15] RouteAndQueueSubsystemLogger: ALLOCATED Contact [0D66B2241000016500235A740A4E5BA6] to Agent [Jabber@ge.nt1]

The agent is sent a notification to accept chat and room is created between user and agent.

The flow of all this same as legacy chat so not covering much from logs for this flow.

Step 13. SM Publicapps: Agent Joins and Chats Session has Started.

The chat session has been established once the XMPP tunnel is created. The user's chat widget and the SocialMiner chat gadget (hosted on Finesse) are now connected via XMPP and you can see the presence events being sent and received.

0000001149: 10.78.91.166: Aug 06 2018 09:32:46.842 +0530: %CCBU__CCPPUBLICAPPS-6-PRESENCE_EVENT_RECEIVED: %[CustomerNickname=Jayant Suneja][Nickname=Jabber@ge.nt1][SocialContactID=0D66B2241000016500235A740A4E5BA6][Status=joined][Username=socialminer_chat.16@conference.127.0.0.1/Jabber@ge.nt1]: Received presence event

0000001152: 10.78.91.166: Aug 06 2018 09:32:51.168 +0530: %CCBU__CCPPUBLICAPPS-6-TYPING_STATUS_RECEIVED: %[From=socialminer_chat.16@conference.127.0.0.1/Jabber@ge.nt1][Nickname=Jabber@ge.nt1][SocialContactID=0D66B2241000016500235A740A4E5BA6][Text=composing]: Typing Status received

Step 14. Client Console Logs: Agent Joins Chat Room.

The client-side logs show that the agent joins the chat room. The same is displayed in the chat widget.

Mon Aug 06 2018 09:32:48 GMT+0530 (India Standard Time):CISCO_BUBBLE_CHAT:Received chat room

status event of type chatroom_agent_joined

Note: Customer now ends the chat. Here the flow is a bit different as compared to legacy chat as there is a new feature of post chat rating added with bubble chat.

Step 15. SM Publicapps: User Leaves the Chat Room.

A user leaves the chat and now the agent is alone in the chat room. This also shows that the user leaves the room.

0000001185: 10.78.91.166: Aug 06 2018 09:33:26.738 +0530: %CCBU__CCPPUBLICAPPS-6-LEAVE_CHAT_ROOM:

%[ChatRoomName=socialminer_chat.16@conference.127.0.0.1][Nickname=Jayant Suneja]

[User=ccp_chatclient][social_contact_id=0D66B2241000016500235A740A4E5BA6]: Leave chat room

Note: If a post chat rating is enabled the SM receives this chat rating once the user submits the post chat rating.

Step 16. Client console logs: User Browser shows Chat Rating Success.

Successful submission of chat rating using a 200 OK received on the user browser.

Mon Aug 06 2018 09:33:34 GMT+0530 (India Standard Time):CISCO_BUBBLE_CHAT:Feedback submitted

successfully. Response code: 200

Mon Aug 06 2018 09:33:34 GMT+0530 (India Standard Time):CISCO_BUBBLE_CHAT:Successfully ended

the chat session. Response code: 200 ccp-chat-components.js:1:14634

Mon Aug 06 2018 09:33:34 GMT+0530 (India Standard Time):CISCO_BUBBLE_CHAT:Successfully cleaned up

Step 17. SM Publicapps: ccppublicapps Receives the Post Chat Rating from the Browser.

Rating feedback received at SM.

10.78.91.166: Aug 06 2018 09:33:34.277 +0530: %CCBU__CCPPUBLICAPPS-6-CHAT_FEEDBACK_RECEIVED :

%[ChatFeedback=com.cisco.ccbu.ccp.publicapps.api.chat.ChatFeedback@d82623[rating=4]][Session=

3F8B8C08D7E8144C7B1AD7AF144A4C1E][social_contact_id=0D66B2241000016500235A740A4E5BA6]:

Received chat feedback

Note: When chat feedback is received at SM with rating info that information is first saved in socialcontact on SM datastore before it notifies CCX. In case SM datastore is down, submission of chat rating fails with a snippet of "CCPPUBLICAPPS-3-UPDATE_CHAT_SOCIALCONTACT_EXTENSION_FIELD_FAILED"

Step 18. UCCX MIVR: XMPP Update Received from SM.

SM sends XMPP update to CCX apprising it of the rating received from the end user.

3723269: Aug 06 09:33:34.290 IST %MIVR-SS_CHAT-7-UNK:[Smack Packet Reader (1)] ChatSubsystemLogger: createXMPPSession: PacketExtensionProvider.parseExtension:<SocialContact><campaignPublicId>CCX_Chat_Campaign</campaignPublicId><extensionFields><extensionField><name>h_chatRoom</name><value>socialminer_chat.16@conference.127.0.0.1</value></extensionField><extensionField><name>h_chatOrigin</name><value>CISCO_BUBBLE</value></extensionField><extensionField><name>C&#233;dula</name><value>Bill Issue</value></extensionField><extensionField><name>Details</name><value>Test Bubble Chat</value></extensionField><extensionField><name>PhoneNumber</name><value>97xxxxxxxx</value></extensionField><extensionField><name>h_agentName</name><value>Jabber@ge.nt1</value></extensionField><extensionField><name>h_rating</name><value>4</value>

Step 19. UCCX MIVR: Write Chat Rating to Database.

The submitted chat rating is written to the CCX database and saved in the textratingdetail table, which is a newly added table on UCCX 11.6(2).

The main purpose of this table is to store Chat Ratings for reporting purposes.

3723276: Aug 06 09:33:34.299 IST %MIVR-SS_ROUTEANDQUEUE-7-UNK:[Smack Listener Processor (1)]

RouteAndQueueSubsystemLogger: com.cisco.wf.subsystems.routeandqueue.aggregator.historical.

HistoricalManager : Writing Historical Record: TRDR: ContactID=0D66B2241000016500235A740A4E5BA6,

rating=4, ratingTime=java.util.GregorianCalendar[time=1533528214299,areFieldsSet=true,

areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,

useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,

YEAR=2018,MONTH=7,WEEK_OF_YEAR=32,WEEK_OF_MONTH=2,DAY_OF_MONTH=6,DAY_OF_YEAR=218,DAY_OF_WEEK=2,

DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=4,HOUR_OF_DAY=4,MINUTE=3,SECOND=34,MILLISECOND=299,

ZONE_OFFSET=0,DST_OFFSET=0]