Get Last N Interactions for a Contact

  In the future, this route will be deprecated. We recommend that you use the Get a Specific Interaction endpoint.

Use a GET request to retrieve a contact's last interactions. By default, the last 10 interactions are returned per page. Page 0 is the first page and is indexed. The interactions are returned in order, beginning with the most recent. You must have the CONTACTS_INTERACTION_HISTORY_READ permission in order to view a contact's historical interactions.

Request

Sample Request

curl GET https://api.cxengage.net/v1/tenants/<tenantID>/contacts/<contactID>/interactions

Request Parameters

The table below lists the parameters you can include in a request:

Parameter Required? Type Description
tenantId yes UUID The tenant's unique identifier.
contactId yes UUID The contact's unique identifier.
limit no integer The maximum number of results to return per page. The default is 10. The maximum permitted is 100.
page no integer The page that you want returned. By default, the first page is page 0 and it is indexed.

Response

Sample Response

The request returns JSON structured like the example below:

{
    "page": null,
    "limit": 10,
    "offset": 0,
    "total": 2,
    "results": [
        {
            "directionName": "Inbound",
            "recording": null,
            "endTimestamp": "2017-11-02T17:49:50.427Z",
            "interactionId": "5e003dd5-d261-42fb-8895-edcb7071b0bb",
            "customer": "+15064490906",
            "note": 0,
            "lastAgentId": "7a8c3cd0-82b2-11e7-b08f-6e56a766befb",
            "lastQueueId": "3703e470-834a-11e7-b08f-6e56a766befb",
            "channelName": "Voice",
            "lastAgentName": "Don Smith",
            "csat": null,
            "lastDispositionName": null,
            "startTimestamp": "2017-11-02T17:49:19.049Z",
            "transcript": null,
            "lastDispositionId": null,
            "channelType": "voice",
            "directionType": "inbound",
            "lastQueueName": "Support"
        },
        {
            "directionName": "Inbound",
            "recording": null,
            "endTimestamp": "2017-11-02T17:46:42.661Z",
            "interactionId": "d5c63406-a585-415f-9785-066a35ca9331",
            "customer": "+15064490906",
            "note": 0,
            "lastAgentId": "7a8c3cd0-82b2-11e7-b08f-6e56a766befb",
            "lastQueueId": "3703e470-834a-11e7-b08f-6e56a766befb",
            "channelName": "Voice",
            "lastAgentName": "Don Smith",
            "csat": null,
            "lastDispositionName": null,
            "startTimestamp": "2017-11-02T17:42:39.435Z",
            "transcript": null,
            "lastDispositionId": null,
            "channelType": "voice",
            "directionType": "inbound",
            "lastQueueName": "Support"
        }
    ]
}	

Response Parameters

Your response may include statistics that are not described in this reference. For more information about the statistics that are returned, see the Data Dictionary. The table below lists and describes the parameters that can be returned in the response.

Parameter Description
page The page returned. By default, this is the first page which is page 0.
limit The maximum number of results permitted per page. By default, this is 10. If you requested a different number of pages in the request, that number is returned.
offset

Which interaction the request started returning results from.

total The total number of results.
results

A list of interactions and their details.

Parameter Description
directionName The direction of the interaction, either inbound or outbound.
recording If the interaction doesn't have any audio recordings, null is returned. If the interaction does have audio recordings, 1 is returned to indicate "true".
endTimestamp The date and time, in UTC, that the interaction ended.
interactionId The interaction's unique identifier.
customer The customer's identification for their method of contact such as their email address or phone number.
note If the interaction doesn't have any notes, 0 is returned to indicate "false". If the interaction does have notes, 1 is returned to indicate "true".
lastAgentId The unique identifier for the last agent that was involved in the interaction. For example, if the interaction is transferred to an agent, the ID for the agent that received the transfer is returned.
lastQueueID The unique identifier for the last queue that the interaction entered. If an interaction waited in more than one queue, for example if it was transferred to a queue, the ID of the last queue that it waited in is returned.
channelName The label or user friendly name of the channel that the interaction used, such as Voice, SMS, or email.
lastAgentName The name of the last agent that was involved in the interaction. For example, if the interaction is transferred to an agent, the name of the agent that received the transfer is returned.
csat The customer satisfactions score that the customer provided for the interaction. If the customer didn't provide a CSAT, then the null is returned.
lastDispositionName The name of the last disposition selected in the interaction. For example, if multiple agents were involved in an interaction then the name of the last disposition selected by an agent is returned.
startTimestamp The date and time, in UTC, that the interaction began.
transcripts If the interaction doesn't have any messaging transcripts, 0 is returned to indicate "false". If the interaction does have messaging transcripts, 1 is returned to indicate "true".
lastDispositionId The unique identifier for the last disposition selected in the interaction. For example, if multiple agents were involved in an interaction then the last ID of the last disposition selected by an agent is returned.
channelType The type of channel that the interaction used such as sms, voice, or email.
channelType The type of channel that the interaction used such as sms, voice, or email.
directionType The direction of the interaction, either inbound or outbound.
lastQueueName The name of the last queue that the interaction entered. If an interaction waited in more than one queue, for example if it was transferred to a queue, the name of the last queue that it waited in is returned.