05-08-2019 06:45 AM
Hi all,
I'm looking to implement the new bubblechat functionality, however, would like to replicate the existing functionality we have where we can jump straight in to the chat rather than asking for customer details and problem statements.
Has anyone had any lucky with getting this working by passing variables straight in to the bubble chat window to skip the first step? If so pointing me in the right direction or sharing a basic example would be much appreciated.
Thanks in advance,
Ryan
05-08-2019 11:09 AM
Hi Ryan,
In the code that CCX provides for the bubble chat, there is a comment that says the following:
Use the function 'ciscoBubbleChat.showChatWindow() as the event handler for initiating chat. eg: <button onclick="ciscoBubbleChat.showChatWindow()">Start Chat</button> Optionally, invisible form data can be submitted, which will be submitted along with the fields customer fills in. Upto 10 fields can be passed. If more than 10 fields are passed, the invisible form data will not be used and the provided error callback will be invoked. For injecting form data, an object should be passed to ciscoBubbleChat.showChatWindow() as an argument. The object should be of the form: { formData: { InjectedField1: 'InjectedValue1', InjectedField2: 'InjectedValue2' ... }, validationErrorCallback: function(){console.log('business specific logic goes here');} } The form data can have any string as field name and value. The submitted invisible form data values will be shown in the agent desktop, as well as will be updated in ContextService if the specified fieldset(s) in the widget contains these field names just like the regular visible chat form fields data. eg: <button onclick="ciscoBubbleChat.showChatWindow({ formData: { AnyFieldName1: 'AnyFieldValue1', AnyFieldName2: 'AnyFieldValue2', AnyFieldName3: 'AnyFieldValue3', AnyFieldName4: 'AnyFieldValue4', AnyFieldName5: 'AnyFieldValue5', AnyFieldName6: 'AnyFieldValue6', AnyFieldName7: 'AnyFieldValue7', AnyFieldName8: 'AnyFieldValue8', AnyFieldName9: 'AnyFieldValue9', AnyFieldName10: 'AnyFieldValue10' }, validationErrorCallback: function(){console.log('error in validating injected data');} })">Click to chat</button>
I am wondering if you can use the injecting form data to solve your problem?
Thanx,
Denise
07-06-2021 05:10 AM - edited 07-06-2021 05:11 AM
Hey Denise,
I was stuck in same problem, followed your advice and found out that:
1- We can use this to pass any data with any title to the Agent unto 10 fields
2- We cannot still skip the part where we have to select a CSQ or the initial form which still persists
I have attached the ScreenShot of the function.
07-12-2021 01:19 PM
Hi,
I tried to look into the html a bit today and it doesn't seem like you can avoid the selecting the csq. I tried to see if there was a way to use javascript to fill in the values of the fields, but doesn't seem like the form uses ids or anything unique to be able to do that.
The only thing I can suggest (without actually trying it) is for you to reverse engineer the form and submission and see if there is a way for you to automate that. See what APIs it calls and how it is submitted.
Sorry, I wish I had a better answer. If you do manage to figure it out, it would be awesome if you can post the solution for others.
Thanx,
Denise
07-13-2021 12:47 AM
If you are having problems doing what you want - you could achieve what you need via the Cisco CCP (aka Socialminer) APIs.
See below:
https://developer.cisco.com/docs/contact-center-express/#!customer-collaboration-platform-dev-guide
https://github.com/CiscoDevNet/socialminer-sample-code/tree/master/customer-chat
Gerry
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide