RetrieveAgentHistory
This operation is part of the Interaction History API section of the Web Services API.
Overview
Returns the interaction history for the specified agent. If you make the request without parameters, Web Services returns interactions that were started in the last month.
Request URL | /api/v2/ucs/interactions |
---|---|
HTTP method | POST |
Required features | One of the following, depending on the type of interactions you want to retrieve:
|
Parameters
Parameter | Value | Mandatory |
---|---|---|
operationName | RetrieveAgentHistory | Yes |
fromDate | In yyyy-MM-dd format. The default is the current date minus one month. | No |
toDate | In yyyy-MM-dd format. The default is the current date. | No |
mediaType | The type of media. Possible values are call, chat, email, facebook, facebooksession, openmedia, twitter, or workitem. | No |
userId | If specified, only interactions handled the specified agent are returned. | No |
sort | Possible values are "asc" or "desc". The default is "desc". | No |
maxSize | The number of interactions to return. The default is "100". | No |
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 |
customAttributes | A list of custom attribute names to include in the result. | No |
searchCustomAttributes | Specify this parameter to search by a custom attribute. You can search custom attributes only with "Equals" statements. In order to include custom fields into the found interactions, you should specify their names in the customAttributes list. | No |
Sample
Request
POST /api/v2/ucs/interactions
{
"operationName":"RetrieveAgentHistory",
"fromDate":"2015-10-01",
"toDate":"2015-10-05",
"sort":"asc",
"searchCustomAttributes":{
"SearchId":"123456"
},
"customAttributes":[
"SearchId",
"CustomerId"
]
}
HTTP response
{
"statusCode":0,
"referenceId":1
}
CometD notification
{
"referenceId":1,
"messageType":"GetInteractionsHistoryMessage",
"interactions":[
{
"path":"interactions/0000Sa99620J0EM5",
"mediaType":"Chat",
"typeId":"Inbound",
"state":"New",
"startDate":"2015-10-01 12:17:45.000+0300",
"subject":"Customer support",
"contactId":"0000FaA3VXUS000M",
"uri":"http://localhost:8080/api/v2/interactions/0000Sa99620J0EM5",
"ownerInformation":{
"userName":"a2",
"lastName":"a2",
"id":"cc9016eee9c84dfeb266c642d9fd92c5",
"firstName":"a2"
},
"id":"0000Sa99620J0EM5",
"customAttributes":{
"SearchId":"123456",
"CustomerId":"a21d4c3"
}
},
{
"path":"/api/v2/interactions/0000Sa99620J0EM7",
"mediaType":"Email",
"typeId":"Outbound",
"state":"Stopped",
"startDate":"2015-10-02 20:02:22.000+0300",
"endDate":"2015-10-02 20:02:25.000+0300",
"subject":"Customer support",
"contactId":"0000FaA3VXUS000M",
"uri":"http://localhost:8080/api/v2/interactions/0000Sa99620J0EM7",
"ownerInformation":{
"userName":"a2",
"lastName":"a2",
"id":"cc9016eee9c84dfeb266c642d9fd92c5",
"firstName":"a2"
},
"id":"0000Sa99620J0EM7",
"customAttributes":{
"SearchId":"123456"
}
},
{
"path":"/api/v2/interactions/0000Sa99620J0EM9",
"mediaType":"Call",
"typeId":"Inbound",
"state":"Stopped",
"startDate":"2015-10-02 22:02:22.000+0300",
"endDate":"2015-10-02 22:02:25.000+0300",
"subject":"Customer support",
"contactId":"0000FaA3VXUS000M",
"uri":"http://localhost:8080/api/v2/interactions/0000Sa99620J0EM9",
"ownerInformation":{
"userName":"a2",
"lastName":"a2",
"id":"cc9016eee9c84dfeb266c642d9fd92c5",
"firstName":"a2"
},
"id":"0000Sa99620J0EM9",
"customAttributes":{
"SearchId":"123456"
}
}
]
}
This page was last edited on September 2, 2016, at 19:11.
Comments or questions about this documentation? Contact us for support!