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

Update wrap-up data via REST API

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/fileMedia/download/90f66367-13f0-41a9-aadd-84df32057afe

Best regards,

Markus Lindberg

Everyone's tags (4)
5 REPLIES
Cisco Employee

Re: Update wrap-up data via REST API

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

Beginner

Re: Update wrap-up data via REST API

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

Cisco Employee

Re: Update wrap-up data via REST API

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

Beginner

Re: Update wrap-up data via REST API

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?

Cisco Employee

Re: Update wrap-up data via REST API

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

CreatePlease to create content
Ask the Expert- Webex Hybrid Services Solutions