04-17-2017 02:01 PM
So I am attempting to add data to the call out gadget, i.e.:
callvars["callVariable1"] = loanid;
callvars["callVariable2"] = document.getElementById("userPhone").value;
callvars.BAAccountNumber = loanid;
callvars.userLoandID = loanid;
But I don't see it presented in the uccx database.
How can I get associated calls so that the data appears in uccx?
Solved! Go to Solution.
04-20-2017 10:46 AM
So for the utilities thing, this worked.
try {
token = _util.getUserAuthString();
} catch (e) {
token = "error";
}
04-17-2017 02:21 PM
Hi Joe,
In order for the values to be in the UCCX database, you must use the REST API to Update the Call Variables. The code that you pasted above only changes the UI.
Thanx,
Denise
04-18-2017 07:49 AM
I think I know what is needed, but having trouble with this part.
In the process call, I want to initiate a link...
so I am trying this:
html += 'src="https://uccx-001-app-abc.com:8445/3rdpartygadget/files/release/?loanid=' + loanid + dialogid;
$('#agentout').html(html);
so that I can then send the data for the call.
Is the '<iframe necessary?
04-18-2017 09:25 AM
Hi Joe,
It will depend on what the variable html is before you added the src. Ultimately the agentout's html will need to be a full iframe tag.
Thanx,
Denise
04-18-2017 03:00 PM
ok I have it coded up to a point where now it's asking for authentication....
Is there a webtoken I can use, or do I need to store the user and pass for authentication and pass it along to the app so that it can call the api with user auth?
https://developer.cisco.com/site/finesse/docs/guides/rest-api-dev-guide/
04-18-2017 03:22 PM
Hi,
Assuming you are using the REST API request that I suggested earlier, you can find the auth here: JsDoc Reference - finesse.utilities.Utilities
Thanx,
Denise
04-18-2017 03:55 PM
not getting very far with that.
This just breaks it...
var basics = "";
finesse.utilities.getUserAuthString(x => {
basics = x.getAuthHeaderString();
});
var bearer;
finesse.utilities.Utilities.getAuthHeaderString(auth => {
bearer = auth;
});
04-18-2017 04:37 PM
Also I tried using postman with the correct dialogID UPDATE_CALL_DATA Happy customer! userLoanId 0000029701 and it responded with no errors. but I didn't find the number in the database, the items were still null.
04-19-2017 08:51 AM
I have successfully used now callvariable1 populated but not accountnumber, this is useful.
04-19-2017 09:38 AM
when I call the getToken() function it errors, not sure why it does not throw an exception. Again, how do I get a token so I can populate my authentication header with basic token?
clientLogs.log("render2(): In method " + did);
token = finesse.utilities.Utilities.getToken();
clientLogs.log("getToken: " + token);
04-19-2017 02:15 PM
Hi Joe,
When you say:
I have successfully used now callvariable1 populated but not accountnumber, this is useful.
Do you mean successfully on postman? I don't remember off the top of my head, but I am not sure that the accountnumber can be updated. What is the notification error that you get when you use postman?
For the auth header, you need to pass in the config object.
_util = finesse.utilities.Utilities;
_util.getAuthHeaderString(finesse.gadget.Config)
I haven't used getToken() myself, but according to the doc that is how you call it. Are you breakpointing and doing debugging via the browser developer tools? That will tell you exactly what is wrong.
Thanx,
Denise
04-19-2017 02:31 PM
yes I have auth working with postman and also with my app.
I think I just need the basic user auth data not sure how to debug except for looking at logs.
The logs reflect that an exception is thrown every time I call that.
04-19-2017 02:32 PM
let me try this:
_util = finesse.utilities.Utilities;
_util.getAuthHeaderString(finesse.gadget.Config)
04-19-2017 02:37 PM
Do you mean successfully on postman? I don't remember off the top of my head, but I am not sure that the accountnumber can be updated. What is the notification error that you get when you use postman?
For this info, there is no error, it just doesn't do anything. But I can use a callvariable which will work for the team.
04-19-2017 02:46 PM
I tried this:
try {
token = _util.getAuthHeaderString(config);
} catch (e) {
token = "error";
}
and it doesn't work. I get error ...
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