cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2120
Views
0
Helpful
7
Replies

Finesse Gadget Get Call Variables for an ECE Chat Interaction

Faisal Zaidi
Level 1
Level 1

I have built a Finesse Gadget in UCCE which performs a pop when a new Chat arrives. The type of pop needs to change depending on the value of callVariable4. I am able to access the callVariables in other voice specific gadgets but not when an ECE Chat arrives at the agent in this gadget using the "dialog.getMediaProperties()" method.

 

Are there any examples or documents that i could look at for tips?

 

7 Replies 7

dekwan
Cisco Employee
Cisco Employee

Hi,

 

I haven't used the JavaScript library for non-voice dialogs, so I don't have a direct answer.

 

When the ECE chat arrives, do you see the callVariable4 in the dialog notification via the logs (or browser console)? I am trying to see if the variable itself exists to determine if it is a notification issue or a JavaScript.

 

Thanx,

Denise

Sorry Denise, im not sure why the portal did that, I attached a txt file with the console content to the email reply to your post and the site seems to have displayed the contents of the file as the response.

 

The email body was "..

Thanks for responding Denise.
I do see the callVariable4 in the console when the Chat is offered and all subsequent actions also, I have attached the console output for your reference."

Faisal Zaidi
Level 1
Level 1
2020-01-09T08:55:05.474 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 08:56:32.811 +0000: CallControl : [ClientServices] MediaPropertiesLayouts: requestId='undefined', Returned with status=200, content='/finesse/api/MediaPropertiesLayout/1Default LayoutLayout used when no other layout matches the user layout Custom/ECC VariableDEFAULTCall Variable 1callVariable1falseBA AccountNumberBAAccountNumberfalseBA CampaignBACampaignfalseCall Variable 1callVariable1falseCall Variable 2callVariable2falseCall Variable 3callVariable3falseCall Variable 4callVariable4falseCall Variable 5callVariable5falseBA StatusBAStatusfalseBA ResponseBAResponsefalseCall Variable 6callVariable6falseCall Variable 7callVariable7falseCall Variable 8callVariable8falseCall Variable 9callVariable9falseCall Variable 10callVariable10false', isUnsent = false finesse.js:3626:36
2020-01-09T08:58:38.521 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:05.871 +0000: CallControl : EventTunnel.eventHandlerImpl() - Event received::153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatACCEPT50012020-01-09T09:00:05.784ZOFFERED2020-01-09T09:00:05.784ZOFFERED/finesse/api/Dialog/153044_306_1POST/finesse/api/User/5001/Media/5000/Dialogs finesse.js:3626:36
2020-01-09T08:58:38.523 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:05.873 +0000: CallControl : [ClientServices] MasterPublisher._parseAndPublishXMLEvent() - Received XML event on node '/finesse/api/User/5001/Dialogs/Media': 153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatACCEPT50012020-01-09T09:00:05.784ZOFFERED2020-01-09T09:00:05.784ZOFFERED/finesse/api/Dialog/153044_306_1POST/finesse/api/User/5001/Media/5000/Dialogs finesse.js:3626:36
2020-01-09T08:58:38.528 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:05.878 +0000: CallControl : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/153044_306_1 Event: {"Dialog":{"associatedDialogUri":null,"id":"153044_306_1","mediaProperties":{"mediaId":"5000","dialedNumber":"Test_Chat","callvariables":{"CallVariable":[{"name":"callVariable1","value":"2"},{"name":"callVariable2","value":"1432641"},{"name":"callVariable3","value":"8MtaBDfacybtpCpwke3b3g"},{"name":"callVariable4","value":"C7EkJ4a87lXnXTKwiQkNBg"},{"name":"user.ece.activity.id","value":"2202"},{"name":"user.ece.customer.name","value":"faisal "}]},"queueNumber":"5000","queueName":"SG_ECE_Chat","callKeyCallId":"306","callKeyPrefix":"153044","callKeySequenceNum":"1"},"mediaType":"ECE_Chat","participants":{"Participant":{"actions":{"action":"ACCEPT"},"mediaAddress":"5001","startTime":"2020-01-09T09:00:05.784Z","state":"OFFERED","stateChangeTime":"2020-01-09T09:00:05.784Z"}},"state":"OFFERED","uri":"/finesse/api/Dialog/153044_306_1"}} finesse.js:3626:36
2020-01-09T08:58:38.540 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:05.890 +0000: BridgestoneToaster :
_dataRequestHandler(): {"content":"/finesse/api/User/5001/Dialogs/Media153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatACCEPT50012020-01-09T09:00:05.784ZOFFERED2020-01-09T09:00:05.784ZOFFERED/finesse/api/Dialog/153044_306_1POST/finesse/api/User/5001/Media/5000/Dialogs","object":{"Update":{"data":{"dialogs":{"Dialog":{"associatedDialogUri":null,"id":"153044_306_1","mediaProperties":{"mediaId":"5000","dialedNumber":"Test_Chat","callvariables":{"CallVariable":[{"name":"callVariable1","value":"2"},{"name":"callVariable2","value":"1432641"},{"name":"callVariable3","value":"8MtaBDfacybtpCpwke3b3g"},{"name":"callVariable4","value":"C7EkJ4a87lXnXTKwiQkNBg"},{"name":"user.ece.activity.id","value":"2202"},{"name":"user.ece.customer.name","value":"faisal "}]},"queueNumber":"5000","queueName":"SG_ECE_Chat","callKeyCallId":"306","callKeyPrefix":"153044","callKeySequenceNum":"1"},"mediaType":"ECE_Chat","participants":{"Participant":{"actions":{"action":"ACCEPT"},"mediaAddress":"5001","startTime":"2020-01-09T09:00:05.784Z","state":"OFFERED","stateChangeTime":"2020-01-09T09:00:05.784Z"}},"state":"OFFERED","uri":"/finesse/api/Dialog/153044_306_1"}}},"event":"POST","requestId":null,"source":"/finesse/api/User/5001/Media/5000/Dialogs"}}} concat:3633:36
2020-01-09T08:58:38.553 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:05.903 +0000: CallControl : EventTunnel.eventHandlerImpl() - Event received::153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatSTARTUPDATE_CALL_DATACLOSETRANSFER50012020-01-09T09:00:05.784ZACCEPTED2020-01-09T09:00:05.836ZACCEPTED/finesse/api/Dialog/153044_306_1PUT/finesse/api/Dialog/153044_306_1 finesse.js:3626:36
2020-01-09T08:58:38.557 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:05.907 +0000: CallControl : [ClientServices] MasterPublisher._parseAndPublishXMLEvent() - Received XML event on node '/finesse/api/User/5001/Dialogs/Media': 153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatSTARTUPDATE_CALL_DATACLOSETRANSFER50012020-01-09T09:00:05.784ZACCEPTED2020-01-09T09:00:05.836ZACCEPTED/finesse/api/Dialog/153044_306_1PUT/finesse/api/Dialog/153044_306_1 finesse.js:3626:36
2020-01-09T08:58:38.560 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:05.910 +0000: CallControl : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/153044_306_1 Event: {"Dialog":{"associatedDialogUri":null,"id":"153044_306_1","mediaProperties":{"mediaId":"5000","dialedNumber":"Test_Chat","callvariables":{"CallVariable":[{"name":"callVariable1","value":"2"},{"name":"callVariable2","value":"1432641"},{"name":"callVariable3","value":"8MtaBDfacybtpCpwke3b3g"},{"name":"callVariable4","value":"C7EkJ4a87lXnXTKwiQkNBg"},{"name":"user.ece.activity.id","value":"2202"},{"name":"user.ece.customer.name","value":"faisal "}]},"queueNumber":"5000","queueName":"SG_ECE_Chat","callKeyCallId":"306","callKeyPrefix":"153044","callKeySequenceNum":"1"},"mediaType":"ECE_Chat","participants":{"Participant":{"actions":{"action":["START","UPDATE_CALL_DATA","CLOSE","TRANSFER"]},"mediaAddress":"5001","startTime":"2020-01-09T09:00:05.784Z","state":"ACCEPTED","stateChangeTime":"2020-01-09T09:00:05.836Z"}},"state":"ACCEPTED","uri":"/finesse/api/Dialog/153044_306_1"}} finesse.js:3626:36
2020-01-09T08:58:38.823 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:06.173 +0000: BridgestoneToaster :
_dataRequestHandler(): {"content":"/finesse/api/User/5001/Dialogs/Media153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatSTARTUPDATE_CALL_DATACLOSETRANSFER50012020-01-09T09:00:05.784ZACCEPTED2020-01-09T09:00:05.836ZACCEPTED/finesse/api/Dialog/153044_306_1PUT/finesse/api/Dialog/153044_306_1","object":{"Update":{"data":{"dialog":{"associatedDialogUri":null,"id":"153044_306_1","mediaProperties":{"mediaId":"5000","dialedNumber":"Test_Chat","callvariables":{"CallVariable":[{"name":"callVariable1","value":"2"},{"name":"callVariable2","value":"1432641"},{"name":"callVariable3","value":"8MtaBDfacybtpCpwke3b3g"},{"name":"callVariable4","value":"C7EkJ4a87lXnXTKwiQkNBg"},{"name":"user.ece.activity.id","value":"2202"},{"name":"user.ece.customer.name","value":"faisal "}]},"queueNumber":"5000","queueName":"SG_ECE_Chat","callKeyCallId":"306","callKeyPrefix":"153044","callKeySequenceNum":"1"},"mediaType":"ECE_Chat","participants":{"Participant":{"actions":{"action":["START","UPDATE_CALL_DATA","CLOSE","TRANSFER"]},"mediaAddress":"5001","startTime":"2020-01-09T09:00:05.784Z","state":"ACCEPTED","stateChangeTime":"2020-01-09T09:00:05.836Z"}},"state":"ACCEPTED","uri":"/finesse/api/Dialog/153044_306_1"}},"event":"PUT","requestId":null,"source":"/finesse/api/Dialog/153044_306_1"}}} concat:3633:36
2020-01-09T08:58:53.842 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:21.192 +0000: CallControl : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/153044_306_1 Event: {"Dialog":{"associatedDialogUri":null,"id":"153044_306_1","mediaProperties":{"mediaId":"5000","dialedNumber":"Test_Chat","callvariables":{"CallVariable":[{"name":"callVariable1","value":"2"},{"name":"callVariable2","value":"1432641"},{"name":"callVariable3","value":"8MtaBDfacybtpCpwke3b3g"},{"name":"callVariable4","value":"C7EkJ4a87lXnXTKwiQkNBg"},{"name":"user.ece.activity.id","value":"2202"},{"name":"user.ece.customer.name","value":"faisal "}]},"queueNumber":"5000","queueName":"SG_ECE_Chat","callKeyCallId":"306","callKeyPrefix":"153044","callKeySequenceNum":"1"},"mediaType":"ECE_Chat","participants":{"Participant":{"actions":{"action":["START","UPDATE_CALL_DATA","CLOSE","TRANSFER"]},"mediaAddress":"5001","startTime":"2020-01-09T09:00:05.784Z","state":"ACCEPTED","stateChangeTime":"2020-01-09T09:00:05.836Z"}},"state":"ACCEPTED","uri":"/finesse/api/Dialog/153044_306_1"}} finesse.js:3626:36
2020-01-09T08:58:53.848 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:21.198 +0000: CallControl : EventTunnel.eventHandlerImpl() - Event received::153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatUPDATE_CALL_DATAWRAP_UPCLOSEPAUSETRANSFER50012020-01-09T09:00:05.784ZACTIVE2020-01-09T09:00:20.826ZACTIVE/finesse/api/Dialog/153044_306_1PUT/finesse/api/Dialog/153044_306_1 finesse.js:3626:36
2020-01-09T08:58:53.854 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:21.204 +0000: CallControl : [ClientServices] MasterPublisher._parseAndPublishXMLEvent() - Received XML event on node '/finesse/api/User/5001/Dialogs/Media': 153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatUPDATE_CALL_DATAWRAP_UPCLOSEPAUSETRANSFER50012020-01-09T09:00:05.784ZACTIVE2020-01-09T09:00:20.826ZACTIVE/finesse/api/Dialog/153044_306_1PUT/finesse/api/Dialog/153044_306_1 finesse.js:3626:36
2020-01-09T08:58:53.857 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:21.207 +0000: CallControl : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/153044_306_1 Event: {"Dialog":{"associatedDialogUri":null,"id":"153044_306_1","mediaProperties":{"mediaId":"5000","dialedNumber":"Test_Chat","callvariables":{"CallVariable":[{"name":"callVariable1","value":"2"},{"name":"callVariable2","value":"1432641"},{"name":"callVariable3","value":"8MtaBDfacybtpCpwke3b3g"},{"name":"callVariable4","value":"C7EkJ4a87lXnXTKwiQkNBg"},{"name":"user.ece.activity.id","value":"2202"},{"name":"user.ece.customer.name","value":"faisal "}]},"queueNumber":"5000","queueName":"SG_ECE_Chat","callKeyCallId":"306","callKeyPrefix":"153044","callKeySequenceNum":"1"},"mediaType":"ECE_Chat","participants":{"Participant":{"actions":{"action":["UPDATE_CALL_DATA","WRAP_UP","CLOSE","PAUSE","TRANSFER"]},"mediaAddress":"5001","startTime":"2020-01-09T09:00:05.784Z","state":"ACTIVE","stateChangeTime":"2020-01-09T09:00:20.826Z"}},"state":"ACTIVE","uri":"/finesse/api/Dialog/153044_306_1"}} finesse.js:3626:36
2020-01-09T08:58:53.962 +00:00: : devlabfin.devlab.ccc.bt.com: Jan 09 2020 09:00:21.312 +0000: BridgestoneToaster :
_dataRequestHandler(): {"content":"/finesse/api/User/5001/Dialogs/Media153044_306_15000Test_ChatcallVariable12callVariable21432641callVariable3123456789callVariable4C7EkJ4a87lXnXTKwiQkNBguser.ece.activity.id2202user.ece.customer.namefaisal 5000SG_ECE_Chat3061530441ECE_ChatUPDATE_CALL_DATAWRAP_UPCLOSEPAUSETRANSFER50012020-01-09T09:00:05.784ZACTIVE2020-01-09T09:00:20.826ZACTIVE/finesse/api/Dialog/153044_306_1PUT/finesse/api/Dialog/153044_306_1","object":{"Update":{"data":{"dialog":{"associatedDialogUri":null,"id":"153044_306_1","mediaProperties":{"mediaId":"5000","dialedNumber":"Test_Chat","callvariables":{"CallVariable":[{"name":"callVariable1","value":"2"},{"name":"callVariable2","value":"1432641"},{"name":"callVariable3","value":"8MtaBDfacybtpCpwke3b3g"},{"name":"callVariable4","value":"C7EkJ4a87lXnXTKwiQkNBg"},{"name":"user.ece.activity.id","value":"2202"},{"name":"user.ece.customer.name","value":"faisal "}]},"queueNumber":"5000","queueName":"SG_ECE_Chat","callKeyCallId":"306","callKeyPrefix":"153044","callKeySequenceNum":"1"},"mediaType":"ECE_Chat","participants":{"Participant":{"actions":{"action":["UPDATE_CALL_DATA","WRAP_UP","CLOSE","PAUSE","TRANSFER"]},"mediaAddress":"5001","startTime":"2020-01-09T09:00:05.784Z","state":"ACTIVE","stateChangeTime":"2020-01-09T09:00:20.826Z"}},"state":"ACTIVE","uri":"/finesse/api/Dialog/153044_306_1"}},"event":"PUT","requestId":null,"source":"/finesse/api/Dialog/153044_306_1"}}} concat:3633:36

Hi,

 

Well that is a a good sign that the callvariable4 is available.

 

What I would do is use the browser's developer tools - breakpoint (or log it) to see the data in the dialog object.

* Is the dialog object you are using the one for chat? Verify with the dialogId

* Does the rest of the data in the dialog object match the notification?

* Could it be that at the time you are using the getMediaProperties, that the callVariables aren't there yet? A lot of times the variables gets updated later?

 

All of the above can be debugged by using the breakpoint of the developer tools.

 

Thanx,

Denise

 

Hi Denise

 

Thanks for that, I think the issue is the dialog I'm using.. if anyone has any examples of how to initiate/access the dialogs for ECE chat that would really help... ?

 

Thanks Again

Hi,

 

Sorry, I don't have any examples for dialogs for ECE. Maybe folks in this community has something for you.

 

If you haven't already used the breakpoints in the browser's developer tools, you can easily reverse engineer the objects and data that is available for the gadget.

 

Thanx,

Denise

Hi
Are you getting the customer information that the customer entered during pre-chat request form in callVariables on finesse ?
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: