cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1047
Views
2
Helpful
20
Replies

CallOut gadget

jdickinson
Contributor
Contributor

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?

1 Accepted Solution

Accepted Solutions

So for the utilities thing, this worked.

   try {

                token = _util.getUserAuthString();

            } catch (e) {

                token = "error";

            }

View solution in original post

20 Replies 20

dekwan
Cisco Employee
Cisco Employee

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

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?

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

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/

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

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;

                });

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.

I have successfully used now callvariable1 populated but not accountnumber, this is useful.

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);

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

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.

let me try this:

_util = finesse.utilities.Utilities;

_util.getAuthHeaderString(finesse.gadget.Config)

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.

I tried this:

   try {

                token = _util.getAuthHeaderString(config);

            } catch (e) {

                token = "error";

            }

and it doesn't work. I get error ...

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:

Recognize Your Peers