Blogs

Finesse Developers,

Are you excited about Cisco Live in Orlando? We are because we're anxious to share all of the progress that the Finesse team has made over the past year. We also want to provide details on our Finesse 10.0 release.

There are two Finesse sessions this year:
  • BRKCCT1031 -- Cisco Finesse: Revolutionizing the Agent Experience
  • BRKCDN1001- Programming with the Finesse API
  • ...Read More

 

Finesse gadgets can be hosted on your own web server or on the Finesse server itself.

To host gadgets on your own web server, you host the gadget just as you would any web site. You could use IIS, Apache, etc. That is up to you.
...Read More

 

bMost of the information you need is in this Finesse Developer Center and there is a detailed presentation for Finesse Developers here https://communities.cisco.com/docs/DOC-28452

You can explore the Finesse Developer Center http://developer.cisco.com/web/finesseand if you can’t find what you need, let us know.
...Read More

 

I. Disclaimer
-------------------------------------------------------------------------------

The SampleGadget_WebService sample gadget is intended to serve as an example of
using the gadgets.io.makerequest function to make a request of a web server that is
accessible via Finesse server.



This is only a sample and is NOT intended to be a production quality ...Read More

 

The SampleGadget_Logging sample gadget is intended to serve as an example of initializing and using the
Finesse logger.

This sample illustrates how to initialize the logger and log a message to the console and the Finesse agent logs on the Finesse server.

1. initialize private var
clientLogs = finesse.cslogger.ClientLogger;
2. connect with hub ...Read More

 

Showing 1 - 5 of 22 results.
Items per Page 5
of 5

Forums

« Back

RE: Screenpop using BAAcountNumber

Combination View Flat View Tree View
Threads [ Previous | Next ]
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
 

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?

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
Attachments: FinesseScreenshots.rar (443.5k)

Hi David,
 
Any updates??
 
Thanks
Hari

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

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?
 
 
 
 

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?

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  

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>"

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.
 
 

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

Hi David,
Thanks a lot. It works on the dialog change.
 
Thanks
Hari

Collateral


No files available