11-21-2017 11:56 PM - last edited on 03-05-2021 09:41 AM by dekwan
Hi,
I know how to get the wrap-up reason code list with the following URI:
https://<FQDN>/finesse/api/User/<id>/WrapUpReasons
But I don't know how I would be able to update the wrap-up data during a call via the REST API, is it possible? Could it be related to "Update Call Variable Data" (Dialog—Update Call Variable Data)?
I have read the following document https://developer.cisco.com/docs/finesse/#!rest-api-dev-guide
Best regards,
Markus Lindberg
11-22-2017 09:59 AM
Hi Markus,
Yes, you can update the wrap up reason during the call with the Update Call Variable Data REST API. You need to populate the wrap up reason in this field here: <wrapUpReason>Happy customer!</wrapUpReason>
Thanx,
Denise
11-23-2017 11:30 PM
Hi,
Thank you for your answer.
Is the dialog id unique for every call and you have to use it for the Update Call Variable Data REST API call?
Best regards,
Markus
11-27-2017 10:15 AM
Hi,
Yes, the dialogId is unique for every call. For the most part, they map to the callId from CCE/X. And yes, you need to use it for the Update Call Variable Data REST API request because you are updating the wrap up for that particular call.
Thanx,
Denise
12-11-2017 07:53 AM
Hi Denise,
Currently, I am updating CallVariables using finesseext.js provided by Cisco as shown below:
finesse.restservices.Dialog.prototype.updateCallVariable = function (name, value, options)
{
this.isLoaded();
var callvar = {
"name" : name,
"value" : value
};
var callvariable = { "CallVariable" : callvar };
var mediaProperties =
{
"callvariables": callvariable
};
options = options || {};
options.content = {};
options.content[this.getRestType()] =
{
"mediaProperties": mediaProperties,
// "requestedAction": finesse.restservices.Dialog.Actions.UPDATE_CALL_DATA
"requestedAction": "UPDATE_CALL_DATA"
};
options.method = "PUT";
this.restRequest(this.getRestUrl(), options);
return this;
};
It is working for Updating Call variables. Now I am trying to use the same function to update WrapUp data. Can I still use the same function above?
12-12-2017 01:12 PM
Hi Danny,
Yes, except it would be for "wrapUpReason" instead of "callvariables" to match the XML for the request body (see below).
Example REST request body:
<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>
</mediaProperties>
</Dialog>
Thanx,
Denise
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