Example: Searching Interactions by a Specific Custom Reporting Attribute
This example demonstrates how to use a GET request to retrieve interactions that include a specific custom reporting attribute. Custom reporting attributes are defined in a flow using the Custom Reporting Attribute notation and stored in the hook-name parameter. To search interactions by a custom reporting attribute, you can use either the hook-name or attribute-value parameters in the query.
|
You can search on multiple custom reporting attributes. When you use more than one query in the search string, the REST API only returns interactions that match both queries. |
Request
Sample Request
The request below returns interactions for the specified contact:
curl GET https://api.cxengage.net/v1/tenants/0e73a980-6557-11e6-b1b9-ca81484488df/interactions?attribute-value=<attributeValue>
Request Parameters
The table below lists the parameters you must include in a request:
| Parameter | Required? | Type | Description |
|---|---|---|---|
|
tenantId |
yes | UUID | The tenant's unique identifier. |
| attributeValue | yes | UUID | The value for the custom attribute. |
Response
Sample Response
The request returns JSON structured like the example below:
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"interactionAttributes": [
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"hookId": "d9f18a60-dc50-11e8-ae11-dad54383b88d",
"hookBy": "flow",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"hookName": "valueTwo",
"hookSubType": "interaction-attribute",
"timestamp": "2018-10-30T14:34:03.134Z",
"hookType": "unattachedAttr",
"interactionHookId": "d905f1e0-dc50-11e8-9eb7-c23298e321eb"
},
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"hookId": "da8dca60-dc50-11e8-ae11-dad54383b88d",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"hookBy": "flow",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"hookName": "valueOne",
"hookSubType": "interaction-attribute",
"timestamp": "2018-10-30T14:34:03.131Z",
"hookType": "customAttributeWithResource",
"interactionHookId": "d9057cb0-dc50-11e8-9eb7-c23298e321eb"
},
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"hookId": "ec6cfc60-dc50-11e8-ae11-dad54383b88d",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"hookBy": "flow",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"hookName": "1234567",
"hookSubType": "interaction-attribute",
"timestamp": "2018-10-30T14:34:32.863Z",
"hookType": "customAttributeUsingIvrInput ",
"interactionHookId": "eabe3af0-dc50-11e8-9eb7-c23298e321eb"
}
],
"hooks": [
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"hookId": "d9f18a60-dc50-11e8-ae11-dad54383b88d",
"hookBy": "flow",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"hookName": "valueTwo",
"hookSubType": "interaction-attribute",
"timestamp": "2018-10-30T14:34:03.134Z",
"hookType": "unattachedAttr",
"interactionHookId": "d905f1e0-dc50-11e8-9eb7-c23298e321eb"
},
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"hookId": "da8dca60-dc50-11e8-ae11-dad54383b88d",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"hookBy": "flow",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"hookName": "valueOne",
"hookSubType": "interaction-attribute",
"timestamp": "2018-10-30T14:34:03.131Z",
"hookType": "customAttributeWithResource",
"interactionHookId": "d9057cb0-dc50-11e8-9eb7-c23298e321eb"
},
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"hookId": "ec6cfc60-dc50-11e8-ae11-dad54383b88d",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"hookBy": "flow",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"hookName": "1234567",
"hookSubType": "interaction-attribute",
"timestamp": "2018-10-30T14:34:32.863Z",
"hookType": "customAttributeUsingIvrInput ",
"interactionHookId": "eabe3af0-dc50-11e8-9eb7-c23298e321eb"
}
],
"endTimestamp": "2018-10-30T14:34:33.166Z",
"flowId": "95bc80c0-59e2-11e8-a331-9e78b32c710f",
"customerConversationTime": 29.701,
"customerTalkTime": 29.701,
"interactionTime": 47.212,
"segments": [
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"segmentNumber": 0,
"interactionSegmentId": "cec87c20-dc50-11e8-9eb7-c23298e321eb",
"segmentStartType": "interaction",
"segmentToAgentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"endTimestamp": "2018-10-30T14:34:33.402Z",
"segmentEndType": "success",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"startTimestamp": "2018-10-30T14:33:45.954Z",
"segmentTime": 47.448
}
],
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"contactPoint": "+15063002967",
"customer": "+15066072058",
"customerHolds": 0,
"details": {
"endTimestamp": "2018-10-30T14:34:33.166Z",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"contactPoint": "+15063002967",
"customer": "+15066072058",
"startTimestamp": "2018-10-30T14:33:45.954Z",
"agents": [
{
"conversationStartTimestamp": "2018-10-30T14:34:03.014Z",
"conversationEndTimestamp": "2018-10-30T14:34:32.848Z",
"resourceId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"agentName": "Ryan Boyce",
"noteTitle": "Example Note Title"
}
],
"direction": "inbound",
"contactId": "f4895fe0-6714-11e7-9259-cb127bd0d17b",
"channelType": "voice"
},
"notes": [
{
"noteId": "e2f65910-dc50-11e8-9f0e-21353d459805",
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"title": "Example Note Title",
"body": "Example Note Body",
"created": "2018-10-30T14:34:19.000Z",
"updated": "2018-10-30T14:34:27.000Z"
}
],
"startTimestamp": "2018-10-30T14:33:45.954Z",
"ivrTime": 10.469,
"agents": [
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"platformAgentId": 471,
"agentWorkAccepted": true,
"agentName": "Ryan Boyce",
"agentWorkOfferTime": 5.125,
"conversationEndTimestamp": "2018-10-30T14:34:32.848Z",
"sessionId": "b71dd480-dc50-11e8-801c-016c5936a3b5",
"interactionSegmentId": "cec87c20-dc50-11e8-9eb7-c23298e321eb",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"conversationStartTimestamp": "2018-10-30T14:34:03.014Z",
"interactionAgentId": "d5cf57f0-dc50-11e8-9b97-f353dfbfdfa9",
"endTimestamp": "2018-10-30T14:34:33.402Z",
"talkTimes": [
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"interactionAgentTalkTimeId": "2b833654-aeb7-5b71-91af-35c1b66e286c",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"interactionAgentId": "d5cf57f0-dc50-11e8-9b97-f353dfbfdfa9",
"endTimestamp": "2018-10-30T14:34:33.375Z",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"startTimestamp": "2018-10-30T14:34:03.014Z",
"queueId": "ae708610-6592-11e7-9259-cb127bd0d17b",
"agentTalkTime": 30.361
}
],
"agentHandleTime": 29.834,
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"agentFocusTime": 30.689,
"startTimestamp": "2018-10-30T14:33:57.743Z",
"tenantAgentId": 486,
"agentConversationTime": 29.834,
"queueId": "ae708610-6592-11e7-9259-cb127bd0d17b",
"agentTalkTime": 29.834,
"agentWorkAcceptedTime": 5.125
}
],
"flowName": "Custom Attributes",
"queues": [
{
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"queueEntryLength": 1,
"interactionSegmentId": "cec87c20-dc50-11e8-9eb7-c23298e321eb",
"agentId": "eaff3f40-658d-11e7-9259-cb127bd0d17b",
"platformQueueId": 265,
"endTimestamp": "2018-10-30T14:34:03.014Z",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"queueExitType": "success",
"queueEntryType": "ivr",
"interactionQueueId": "d505ed70-dc50-11e8-96a8-3d6bfcf7af8f",
"queueType": "queue",
"startTimestamp": "2018-10-30T14:33:56.423Z",
"queueExitLength": 0,
"queueName": "Support",
"queueTime": 6.591,
"slaTime": 6.591,
"queueId": "ae708610-6592-11e7-9259-cb127bd0d17b",
"timeToAnswer": 6.591
}
],
"direction": "inbound",
"contactId": "f4895fe0-6714-11e7-9259-cb127bd0d17b",
"customerTalkTimes": [
{
"interactionCustomerTalkTimeId": "d9079f90-dc50-11e8-9eb7-c23298e321eb",
"interactionId": "c506eb9b-f523-4616-8839-fbce3fd89c17",
"tenantId": "87165f24-f1d4-4b2e-acec-05ac94e0ead4",
"startTimestamp": "2018-10-30T14:34:03.146Z",
"endTimestamp": "2018-10-30T14:34:32.847Z",
"customerTalkTime": 29.701
}
],
"channelType": "voice"
}
Response Parameters
| This reference is a work in progress as we continuously add to it and improve it. Your response may include statistics that are not described in this reference. If you notice that the parameter that you are looking for isn't currently listed, please check back on an ongoing basis. |
The table below lists and describes the parameters that can be returned in the response.
| Parameter | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| page | The page number for the page of results returned in the request. | ||||||||||||||||||||||||||||||||||||||||||||
| limit | The number of interactions to return per page. The default is 10. The maximum is 1000. | ||||||||||||||||||||||||||||||||||||||||||||
| offset | The offset, if specified, from the request. For example, the request might show interactions from page 10. | ||||||||||||||||||||||||||||||||||||||||||||
| tenantId | The unique identifier of the tenant. | ||||||||||||||||||||||||||||||||||||||||||||
| total | The number of interactions on the tenant. | ||||||||||||||||||||||||||||||||||||||||||||
| tenantTimeZone | The tenant's timezone, in TZ database format. This consists of a continent/city pair - for example, US/Central. | ||||||||||||||||||||||||||||||||||||||||||||
| results |
For each interaction, the following parameters might be returned:
|
Copyright © 2026 Enghouse Interactive. All Rights Reserved.