Jump to: navigation, search

GetInteractionContent

This operation is part of the Interaction History API section of the Web Services API.

Overview

Returns interaction attributes for the specified interaction. For chat, facebooksession, and smssession interactions, Web Services also includes a list of messages.

Request URL /api/v2/ucs/interactions/{id}
HTTP method POST
Required features api-multimedia

Parameters

Parameter Value Mandatory
operationName GetInteractionContent Yes
source Specifies where to look up the interaction. Possible values are "main" and "archive". The default is "main". Whether "archive" is available depends on your Universal Contact Server configuration. No

Sample

Request

POST /api/v2/ucs/interactions/0000Sa99620J0EM5
{  
   "operationName":"GetInteractionContent"
}

HTTP response

{  
   "statusCode":0,
   "referenceId":2
}

CometD notification

{  
   "referenceId":2,
   "messageType":"GetInteractionContentMessage",
   "interaction":{  
      "uri":"http://localhost:8080/api/v2/interactions/0000Sa99620J0EM5",
      "id":"0000Sa99620J0EM5",
      "path":"/interactions/0000Sa99620J0EM5",
      "mediaType":"facebooksession",
      "typeId":"Inbound",
      "state":"Stopped",
      "startDate":"2013-11-25 21:02:22.000+0200",
      "endDate":"2013-11-25 21:02:25.000+0200",
      "subject":"Customer support",
      "contactId":"0000Sa99620J0EM7",
      "ownerInformation":{  
         "userName":"a2",
         "lastName":"a2",
         "id":"cc9016eee9c84dfeb266c642d9fd92c5",
         "firstName":"a2"
      }
   },
   "messages":[  
      {  
         "index":1,
         "from":{  
            "nickname":"You",
            "type":"Customer",
            "participantId":"00AF52939EBE5BC4"
         },
         "timestamp":"2013-11-2521: 02: 22.000+0200",
         "visibility":"All",
         "type":"ParticipantJoined",
         "timestampSeconds":1385406142000L
      },
      {  
         "index":2,
         "from":{  
            "nickname":"htcc1",
            "type":"Agent",
            "participantId":"00AF52939EDF5BC6"
         },
         "timestamp":"2013-11-2521: 02: 22.033+0200",
         "visibility":"All",
         "type":"ParticipantJoined",
         "timestampSeconds":1385406142033L
      },
      {  
         "index":3,
         "from":{  
            "nickname":"htcc1",
            "type":"Agent",
            "participantId":"00AF52939EDF5BC6"
         },
         "text":"Hello!",
         "visibility":"All",
         "timestamp":"2013-11-2521: 02: 22.036+0200",
         "type":"Text",
         "timestampSeconds":1385406142036L
      },
      {  
         "index":13,
         "from":{  
            "nickname":"htcc1",
            "type":"Agent",
            "participantId":"00AF52939EDF5BC6"
         },
         "timestamp":"2013-11-2521: 02: 22.054+0200",
         "visibility":"All",
         "type":"ParticipantLeft",
         "timestampSeconds":1385406142054L
      },
      {  
         "index":14,
         "from":{  
            "nickname":"You",
            "type":"Customer",
            "participantId":"00AF52939EBE5BC4"
         },
         "timestamp":"2013-11-2521: 02: 22.054+0200",
         "visibility":"All",
         "type":"ParticipantLeft",
         "timestampSeconds":1385406142054L
      }
   ]
}

Error notification

{
    "referenceId": 1,
    "messageType": "GetInteractionContentMessage",
    "errorMessage": "Request failed"
}
This page was last edited on January 27, 2017, at 19:02.
Comments or questions about this documentation? Contact us for support!