cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
993
Views
0
Helpful
5
Replies

Update wrap-up data via REST API

marklind
Level 1
Level 1

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

5 Replies 5

dekwan
Cisco Employee
Cisco Employee

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

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

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

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?

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

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: