Attempting to extract topics on an individual conversation basis

Hi,
I'm currently trying to extract topic modelling data for conversations we have on a conversation by conversation basis.
I'm currently trying to extract it by using "api/v2/analytics/transcripts/aggregates/query" and passing the below JSON

{
    "interval": "2023-08-03T15:43:08.203Z/2023-08-10T11:10:05.026Z",
    "groupBy": [
        "conversationId"
    ],
    "dimension": "resultsBy",
    "value": "topic events",
    "metrics": [
        "nTopicCommunications"
    ]
}

When I run this is returns a 400 error code saying:


{'message': "Rule for metric 'nTopicCommunications' violated: query should contain dimension 'resultsBy'", 'code': 'bad.request', 'status': 400, 'messageParams': {}, 'contextId': '199b1ca9-de03-4af4-9d47-d61beee2bc2c', 'details': [], 'errors': []}

Would anyone be able to advise me on what to do to fix this issue please? Or if a better endpoint exists for extracting Conversation Topics.

Thanks!

Hi,

Try this query instead:

{
"interval": "2023-08-03T15:43:08.203Z/2023-08-10T11:10:05.026Z",
"filter":{
"type”:”and”,
"predicates":[
{
"dimension":"conversationId",
"value":"1ecb1970-2896-4b20-8cc3-54f9a12e3573"
}
{
"dimension":"resultsBy",
"value“:”communication”
}
]
},
"groupBy": ["topicId", "userId", "channel"]
,
"metrics": ["nTopicCommunications"]
}

Make sure to replace the conversation value with your conversation id

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