updateConversation (JavaScript API Reference) for Dynamics 365 Channel Integration Framework 2.0

This method allows you to update a Conversation(msdyn_ocliveworkitem) record.

Syntax

Microsoft.CIFramework.updateConversation(id, data, correlationId).then(successCallback, errorCallback)

Parameters

Name Type Required Description
id String(GUID) Yes Unique identifier of the conversation returned by Microsoft.CIFramework.getSession API.
data Object Yes A JSON object containing key-value pairs, where key is the property of the entity and value is the value of the property you want to update in msdyn_ocliveworkitem entity.

Example

var data = {
    "subject": "Troubleshooting printer malfunction",
    "prioritycode": 2
}
var conversationId = "05145e77-ce40-ea11-a812-000d3a579805";
var jsonData = JSON.stringify(data);
Microsoft.CIFramework.updateConversation(conversationId, jsonData).then(
    function success (response) {
        var result = JSON.parse(response);
        console.log("Conversation updated with ID: " + result.id);
        //the Conversation is updated
      },
      function (error) {
          console.log(error);
          //handle errors
      }
  );