cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1753
Views
0
Helpful
2
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Harishankar Venkatesan on 14-03-2013 07:00:46 AM
Hi,
We are trying to do a screenpop in Finesse using BAAccountNumber but unfortunately dialog.getMediaProperties() returns an empty array.
Finesse version used is 9.1. Are we missing something? Please let us know.
Note : we could see the value of BAAccountNumber, BABuddyName, Campaign etc in the callcontrol jsp page
 
Thanks
Hari
 

Subject: RE: Screenpop using BAAcountNumber
Replied by: David Lender on 14-03-2013 11:36:03 AM
Are you able to use the Screenpop sample gadget and display Callvariable1 in the search? 
Dialog.getMediaProperties should return an array of the Callvariables and ECC variables. Are you saying  your mediaproperties array is totally empty, there are no standard Callvariables either?  Are you using the 9.1(1) version of the Finesse javascript library?

Subject: RE: Screenpop using BAAcountNumber
Replied by: Harishankar Venkatesan on 15-03-2013 01:16:43 AM
Hi David, Thanks for the response. I am able to use the Screenpop gadget but the value of the CallVariable1 is displayed as NULL on the search screen  . Instead of CallVarible1 if i use BAAccountNumber it says "undefined". i have attached the screenshots for your reference. In addition to this, i am also attaching the Finesse javascript js file for your reference. Please let me know if i am doing anything wrong.   Thanks Hari

Subject: RE: Screenpop using BAAcountNumber
Replied by: Harishankar Venkatesan on 20-03-2013 09:21:56 AM
Hi David,
 
Any updates??
 
Thanks
Hari

Subject: RE: Screenpop using BAAcountNumber
Replied by: Arul Selvan on 20-03-2013 09:35:32 AM
Hi,
I am also facing similar issue unable to take outbound variable BAStatus, BABuddyName, BAAccountNumber  using dialog.getData().mediaProperties inside NewDialog but other call variables(variable 1-10) able to get.
handleNewDialog = function (dialog) {        
mpData = dialog.getData().mediaProperties;        
console.log("Call Variables:" + JSON.stringify(mpData));
}  
 
Thanks,
--Arul

Subject: RE: Screenpop using BAAcountNumber
Replied by: David Lender on 20-03-2013 09:50:18 AM
Looks like my original reply didnt get posted. I looked at your screen shots, you don't have anything defined in CallVariable1 which is why your screenpop has null.
As for why BAAccountNumber says undefined, I would need to look at your gadget javascript.  I think You should be specifying callvars["BAAccountNumber"]   To determine how the BAAccountNumber callvar is defined, you can use poster to get the MediaPropertiesLayout.  
[url=http://<host>/finesse/api/User/<User>/MediaPropertiesLayout]http://<host>/finesse/api/User/<User>/MediaPropertiesLayout
for example
 
http://10.201.64.83/finesse/api/User/41005/MediaPropertiesLayout
 
from that I got the layout which shows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><MediaPropertiesLayout><header><entry><displayName>Call Variable 1</displayName><mediaProperty>callVariable1</mediaProperty></entry></header><column><entry><displayName>BA AccountNumber</displayName><mediaProperty>BAAccountNumber</mediaProperty></entry><entry><displayName>BA Campaign</displayName><mediaProperty>BACampaign</mediaProperty></entry><entry><displayName>Call Variable 1</displayName><mediaProperty>callVariable1</mediaProperty></entry><entry><displayName>Call Variable 2</displayName><mediaProperty>callVariable2</mediaProperty></entry><entry><displayName>Call Variable 3</displayName><mediaProperty>callVariable3</mediaProperty></entry><entry><displayName>Call Variable 4</displayName><mediaProperty>callVariable4</mediaProperty></entry><entry><displayName>Call Variable 5</displayName><mediaProperty>callVariable5</mediaProperty></entry></column><column><entry><displayName>BA Status</displayName><mediaProperty>BAStatus</mediaProperty></entry><entry><displayName>BA Response</displayName><mediaProperty>BAResponse</mediaProperty></entry><entry><displayName>Call Variable 6</displayName><mediaProperty>callVariable6</mediaProperty></entry><entry><displayName>Call Variable 7</displayName><mediaProperty>callVariable7</mediaProperty></entry><entry><displayName>Call Variable 8</displayName><mediaProperty>callVariable8</mediaProperty></entry><entry><displayName>Call Variable 9</displayName><mediaProperty>callVariable9</mediaProperty></entry><entry><displayName>Call Variable 10</displayName><mediaProperty>callVariable10</mediaProperty></entry></column></MediaPropertiesLayout>
 
So that verifies that the name of the mediaproperty is BAAccountNumber at least on my system.
I dont have Outbound option installed in my lab so I can't test it for you, but I am pretty sure you should be specifying callvars["BAAccountNumber"] in your gadget javascript.
Can you post your gadget javascript?
 
 
 
 

Subject: RE: Screenpop using BAAcountNumber
Replied by: David Lender on 20-03-2013 09:59:20 AM
Arul Selvan:
Hi, I am also facing similar issue unable to take outbound variable BAStatus, BABuddyName, BAAccountNumber  using dialog.getData().mediaProperties inside NewDialog but other call variables(variable 1-10) able to get. handleNewDialog = function (dialog) {         mpData = dialog.getData().mediaProperties;         console.log("Call Variables:" + JSON.stringify(mpData)); }     Thanks, --Arul
  Arul, are you seeing the BA variables in the CallControl gadget?  If you are, you can look at the console in the debugger and see the contents of the Dialog object.  Can you copy and paste that here?

Subject: RE: Screenpop using BAAcountNumber
Replied by: Arul Selvan on 20-03-2013 11:18:50 AM
David Lender:
Arul Selvan: Hi, I am also facing similar issue unable to take outbound variable BAStatus, BABuddyName, BAAccountNumber  using dialog.getData().mediaProperties inside NewDialog but other call variables(variable 1-10) able to get. handleNewDialog = function (dialog) {         mpData = dialog.getData().mediaProperties;         console.log("Call Variables:" + JSON.stringify(mpData)); }     Thanks, --Arul   Arul, are you seeing the BA variables in the CallControl gadget?  If you are, you can look at the console in the debugger and see the contents of the Dialog object.  Can you copy and paste that here?
  Thanks for your quick response. Yes i am able to see in callcontrol gadget. but unable to get in the getmediaPropery method inside NewHandleDialog but from xml response i am able to see the values: Console Logs: -------------------   dialog.getData().mediaProperties Response: Call Variables:{"associatedDialogUri":null,"fromAddress":null,"id":"2130706443","mediaProperties":{"DNIS":"4107","callType":"OUTBOUND_PREVIEW","callvariables":{"CallVariable":[{"name":"callVariable1","value":null},{"name":"callVariable2","value":null},{"name":"callVariable3","value":null},{"name":"callVariable4","value":null},{"name":"callVariable5","value":null},{"name":"callVariable6","value":null},{"name":"callVariable7","value":null},{"name":"callVariable8","value":null},{"name":"callVariable9","value":null},{"name":"callVariable10","value":null}]},"dialedNumber":"3015"},"mediaType":"Voice","participants":{"Participant":{"actions":null,"mediaAddress":"4107","mediaAddressType":"AGENT_DEVICE","state":"ALERTING","stateCause":null}},"state":"ALERTING","toAddress":"4107","uri":"/finesse/api/Dialog/2130706443"}   XML Response:                   961084588       2130706436               4107         OUTBOUND_PREVIEW                               callVariable1                                             callVariable2                                             callVariable3                                             callVariable4                                             callVariable5                                             callVariable6                                             callVariable7                                             callVariable8                                             callVariable9                                             callVariable10                                             BACampaign             fareportal_preview                                 BAStatus             PREVIEW_OUTBOUND_RESERVATION                                 BAAccountNumber                                             BAResponse                                             BADialedListID             66                                 BATimeZone             +00330                                 BABuddyName             ,santhosh                           3015             Voice                                     UPDATE_CALL_DATA             CLOSE             ACCEPT             REJECT                     4107           AGENT_DEVICE           ACTIVE                               ACTIVE       4107       /finesse/api/Dialog/2130706436         PUT     /finesse/api/Dialog/2130706436   Thanks, --Arul Selvan  

Subject: RE: Screenpop using BAAcountNumber
Replied by: David Lender on 20-03-2013 11:57:28 AM
I am baffled.  I looked at the javascript for CallControl.js  (you can look at this too in the debugger) and it has this code for displaying the BA variables:

 

var callvars, columns, headerMPName, headerMPValue = "", partRows, callType = dialog.getCallType(), count, callCheckValue, BANames, BAStatus;

if (_layoutMap) {

BANames = ["AccountNumber", "BuddyName", "Campaign", "DialedListID", "Response", "Status", "TimeZone"];

callvars = dialog.getMediaProperties();

columns = _layoutMap.columns;

headerMPName = _layoutMap.header.mediaProperty;

if (headerMPName) {

headerMPValue = callvars;

}

BAStatus = "BAStatus";

if(callvars.BAStatus) {

_showBA = true;

}

else {

_showBA = false;

}

 So the callcontrol gadget is using callvars.BAStatus to determine whether or not to display the BA variables.
Since in your environment the call control gadget IS displaying the BA variables, the gadget must be checking the BAStatus variable, but I don’t see the BAStatus variable in your console output.
Also, your participant actions are null and with the dialog state of “Alerting” there should be an “ANSWER” action available
Can you try answering the call first and then showing me the Dialog display from the CallControl gadget from the console? 
It should look like: 
 
12:49:20: CallControl :  {"content":"/finesse/api/User/41005/Dialogs<Update>\n  <data>\n    <dialogs>\n      <Dialog>\n        <associatedDialogUri></associatedDialogUri>\n        <fromAddress>41006</fromAddress>\n        <id>16785433</id>\n        <mediaProperties>\n          <DNIS>41005</DNIS>\n          <callType>AGENT_INSIDE</callType>\n          <callvariables>\n            <CallVariable>\n              <name>callVariable1</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable2</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable3</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable4</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable5</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable6</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable7</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable8</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable9</name>\n              <value></value>\n            </CallVariable>\n            <CallVariable>\n              <name>callVariable10</name>\n              <value></value>\n            </CallVariable>\n          </callvariables>\n          <dialedNumber>41005</dialedNumber>\n        </mediaProperties>\n        <mediaType>Voice</mediaType>\n        <participants>\n          <Participant>\n            <actions>\n              <action>ANSWER</action>\n            </actions>\n            <mediaAddress>41005</mediaAddress>\n            <mediaAddressType>AGENT_DEVICE</mediaAddressType>\n            <state>ALERTING</state>\n            <stateCause></stateCause>\n          </Participant>\n          <Participant>\n            <actions>\n              <action>UPDATE_CALL_DATA</action>\n              <action>DROP</action>\n            </actions>\n            <mediaAddress>41006</mediaAddress>\n            <mediaAddressType>AGENT_DEVICE</mediaAddressType>\n            <state>INITIATED</state>\n            <stateCause></stateCause>\n          </Participant>\n        </participants>\n        <state>ALERTING</state>\n        <toAddress>41005</toAddress>\n        <uri>/finesse/api/Dialog/16785433</uri>\n      </Dialog>\n    </dialogs>\n  </data>\n  <event>POST</event>\n  <requestId></requestId>\n  <source>/finesse/api/User/41005/Dialogs</source>\n</Update>"

Subject: RE: Screenpop using BAAcountNumber
Replied by: David Lender on 20-03-2013 04:48:44 PM
The only other thing I can think of is that maybe the initial dialog object does not have the BA Variables in it and the BA variables come in a subsequent Dialog update.

You can check this out by reviewing all the Dialog updates in the console that are logged by the CallControl gadget.
Try doing the screenpop on a subsequent dialog update after the initial handleNewDialog by adding a dialog change handler like this:

dialog.addHandler('change', _processCall);
 
then add a  _processCall function to display the callvars.
 
 

Subject: RE: Screenpop using BAAcountNumber
Replied by: Arul Selvan on 21-03-2013 04:09:36 AM
David Lender:
The only other thing I can think of is that maybe the initial dialog object does not have the BA Variables in it and the BA variables come in a subsequent Dialog update. You can check this out by reviewing all the Dialog updates in the console that are logged by the CallControl gadget. Try doing the screenpop on a subsequent dialog update after the initial handleNewDialog by adding a dialog change handler like this: dialog.addHandler('change', _processCall);   then add a  _processCall function to display the callvars.       

 
Thanks lot David i am able to get inside _processCall

Subject: RE: Screenpop using BAAcountNumber
Replied by: Harishankar Venkatesan on 21-03-2013 06:38:50 AM
Hi David,
Thanks a lot. It works on the dialog change.
 
Thanks
Hari
Comments
DotNetBuddha
Level 1
Level 1

I just implemented this. It works however it does not let you screen pop before answering a call. The process event happens after the answer button is selected. This is ok... but not if an agent wants to see a screen pop prior to answering.

So on inbound calls I can have a screen pop happen prior, but not for outbound. Hopefully in 10.0 this will be addressed.

dlender
Level 6
Level 6

I think it is a matter of the dialer not updating the BAAccountNumber ecc variable prior to the Alerting event. You may wish to try setting up a WorkflowActionEvent and screen pop the BAAccountNumber “when the call arrives”

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:

Quick Links