cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
493
Views
0
Helpful
4
Replies
Highlighted
Beginner

Using Finesse Update Call Variable Data Sample Gadget to update the Wrap Up Reason

 

Hi ,

As mentioned in the title I am trying to use this gadget to update the Wrap Up Reason for agent initiated Outbound calls. I have found the information below and am using it as a guide.

<Dialog> <requestedAction>UPDATE_CALL_DATA</requestedAction> <mediaProperties> <wrapUpReason>Happy customer!</wrapUpReason> <callvariables> <CallVariable> <name>callVariable1</name> <value>123456789</value> </CallVariable> <CallVariable> ... Other call variables to be modified ... </CallVariable> </callvariables> </callvariables> </mediaProperties> </Dialog>

I have modified the sample code as below (in bold) but it does not appear to be updating the Wrap Up Reason for inbound or outbound calls.

// Build the content body
var contentBody = {
"Dialog" : {
"requestedAction": finesse.restservices.Dialog.Actions.UPDATE_CALL_DATA,
"mediaProperties": {
"wrapUpReason": {value}
"callvariables": {
"CallVariable": {
"name": name,
"value": value
}
}
}
}
};

I have tried various version of the syntax including a static string but nothing seems to work. Thanks for reading.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: Using Finesse Update Call Variable Data Sample Gadget to update the Wrap Up Reason

Hi,

 

For the updateWrapUpReason, it needs to be called against the dialog object. So using the Update Call Variable Data Sample Gadget code, that would be currentDialog.updateWrapUpReason(...).

 

In your code earlier, you had 

"wrapUpReason": {value}

Are you actually putting the brackets in the code? If so, that is probably what is breaking your gadget. I was assuming that you were just doing that syntax to say that you are putting the actual value. The syntax should be:

"mediaProperties": {
"wrapUpReason": wrapUpValue,
"callvariables": {
"CallVariable": {
"name": name,
"value": value
}
}
}

 

Thanx,

Denise

 

 

View solution in original post

4 REPLIES 4
Highlighted
Cisco Employee

Re: Using Finesse Update Call Variable Data Sample Gadget to update the Wrap Up Reason

Hi,

 

The syntax that you show seems right, but there is actually an easier way. The Finesse JavaScript library has a method to update the wrap up reason and you can use that directly: https://pubhub.devnetcloud.com/media/finesse/docs/guides/javascript-library/symbols/finesse.restservices.Dialog.html#updateWrapUpReason

 

updateWrapUpReason(wrapUpReason, handlers)
Update this dialog's wrap-up reason.
Parameters: {String} wrapUpReason The new wrap-up reason for this dialog {finesse.interfaces.RequestHandlers} handlers An object containing the handlers for the request

 

Also, double check that you can update the wrap up reason at that time of the call. You can easily check by using the API directly via Postman.

 

Thanx,

Denise

 

 

 

Highlighted
Beginner

Re: Using Finesse Update Call Variable Data Sample Gadget to update the Wrap Up Reason

Thanks Denise,

 

I am going to have to read up on how to use the Finesse JavaScript library as I get "updateWrapUpReason is undefined" when I try to use it in the Update Call Variable Data Sample Gadget.

 

I am mystified as to why the original sample code does not work with my "wrapUpReason": {value} modification. In fact it seems to break the gadget completely and I don't even get the default html message that is displayed when no call is active. 

 

"Please wait for a call to arrive. (UPDATE_CALL_DATA must be an allowable action for the user)"

 

Best Reagrds

 

Boyd

 

 

Highlighted
Cisco Employee

Re: Using Finesse Update Call Variable Data Sample Gadget to update the Wrap Up Reason

Hi,

 

For the updateWrapUpReason, it needs to be called against the dialog object. So using the Update Call Variable Data Sample Gadget code, that would be currentDialog.updateWrapUpReason(...).

 

In your code earlier, you had 

"wrapUpReason": {value}

Are you actually putting the brackets in the code? If so, that is probably what is breaking your gadget. I was assuming that you were just doing that syntax to say that you are putting the actual value. The syntax should be:

"mediaProperties": {
"wrapUpReason": wrapUpValue,
"callvariables": {
"CallVariable": {
"name": name,
"value": value
}
}
}

 

Thanx,

Denise

 

 

View solution in original post

Highlighted
Beginner

Re: Using Finesse Update Call Variable Data Sample Gadget to update the Wrap Up Reason

Hi Denise,

 

You are right it was the brackets. It's working now and I can set the Wrap Up Reason on Outbound calls to meet the customer requirements.

 

Thanks again for your help.

 

Best Regards

 

Boyd

This widget could not be displayed.