Search interaction history with customized tag

Hi,

I am looking for a way to search the conversation history by a customized tag (e.g. customer's account number). Now I am using the data table to link the tag with caller info (i.e. ani/external contact id) and use them to search indirectly on the interaction page.

Is there a more intuitive way to tag the conversation using the analytic api (or add a custom filter on the Interaction page directly)?

Thank you,
Leo

Hello,

With POST /api/v2/analytics/conversations/details/query (Query for conversation details), you can create filters based on a custom property.
To clarify, the query for conversation details does NOT allow to create a filter on a participant's attribute.

But what you can do is to first index a custom property on a conversation (using POST /api/v2/analytics/conversations/{conversationId}/details/properties).

This custom property will then be added to a segment in the conversation details.
And you can use it to build a filter in the query for conversation details.

As as an example:

  1. Retrieve details of a conversation via the analytics query (POST /api/v2/analytics/conversations/details/query) or getting the conversation details by id (GET /api/v2/analytics/conversations/{conversationId}/details)
  2. Find the participant's session you want to add a tag on (sessionId under one of the participant structures - example: the one corresponding to the customer with purpose=customer or purpose=external)
  3. Define a timestamp that is between the segmentStart and segmentEnd of the segment you want to add the custom property to (example the one that corresponds to "interact" in the customer's participant session)

You can then add an index a custom property with: POST /api/v2/analytics/conversations/{conversationId}/details/properties
and a body like this:

{
   "sessionId": "my_customer_participant_session_id",
   "targetDate": "2020-05-10T06:02:40.528Z",
   "properties": [
      {
         "propertyType": "string",
         "property": "MyCustomTag",
         "value": "ABCDEFGH"
      }
   ]
}

If you get the conversation details again, you will see the custom property with its value under a segment structure.

You can then leverage the query for conversation details using a filter on the custom property.
Doing a POST /api/v2/analytics/conversations/details/query
with a body like this (just as an example):

{
 "interval": "2020-05-09T22:00:00.000Z/2020-05-10T22:00:00.000Z",
 "order": "asc",
 "orderBy": "conversationStart",
 "paging": {
  "pageSize": 25,
  "pageNumber": 1
 },
 "segmentFilters": [
  {
   "type": "or",
   "predicates": [
    {
     "type": "property",
     "property": "MyCustomTag",
     "propertyType": "string",
     "operator": "matches",
     "value": "ABCDEFGH"
    }
   ]
  }
 ]
}

You will have to use Analytics API to add/index the custom property.
And also use the Analytics API to query the conversation details using the filter on custom property (it is NOT exposed in the Performance - Interactions page).

Regards,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.