| Field | Value |
|---|---|
| Method | POST |
| Endpoint | https://{{host}}/api/public/bot/{{BotID}}/getAnalytics |
| Content Type | application/json |
| Authorization | auth: {{JWT}} See How to generate the JWT Token. |
| API Scope | App Builder: Metrics; Admin Console: Not Applicable |
Path Parameters
| Parameter | Required | Description |
|---|---|---|
host | Required | Environment URL, for example, https://platform.kore.ai. |
BotID | Required | Bot ID or Stream ID. Access it from the General Settings page of the bot. |
Sample Request
The following sample request shows how to retrieve unhandled utterance analytics data with specific filters. You can modify the type and filters parameters to retrieve different types of analytics data as needed.Request Body Parameters
| Parameter | Required/Optional | Type | Description |
|---|---|---|---|
type | Required | String | Indicates the type of metrics for which you can retrieve data: successintent, failintent, successtask, failtask, performance, unhandledutterance. |
filters | Required | Object | A set of filters to narrow down the analytics data. |
filters.from | Required | String | The start timestamp for the data retrieval. |
filters.to | Required | String | The end timestamp for the data retrieval. |
filters.channel | Optional | Array of strings | An array containing channel names to filter data by; the default channel is rtm. Accepted channels are: • msteams • twitter• spark• rtm• facebook• slack• kore• email• sms• ringcentral• jabber• yammer• alexa• twiliovoice• telegram• ivr• ivrVoice• smartassist• line• liveperson• googleactions• hangoutchat• mattermost• rcs |
filters.channel.channelUIds | Optional | Array of strings | The end-user’s identity provided by the channel. |
filters.isAmbiguous | Optional | Boolean | Whether to include ambiguous intents or not – set to true or false. |
filters.isDeveloper | Optional | Boolean | Whether to include developer metrics – set to true or false. |
filters.trained | Optional | Boolean | Whether to include trained intents or not – set to true or false. |
filter.taskId | Optional | Array of strings | To filter based on the task IDs. |
filters.userId | Optional | Array of strings | To filter based on user IDs. |
filters.tags | Optional | Object | Meta tags to filter the records. Usage example¹ |
sort | Optional | Object | An object containing the sorting criteria: order (string, required): Sorting order – asc or desc. by (string, required): The field by which to sort. Usage example: "sort": { "order": "<desc/asc>", "by": "<column name>" } |
limit | Required | Number | Indicates the number of records to be returned in the result set. |
skip | Required | Number | The number of records to be skipped from the result set. |
Sample Response
Response Body Parameters
| Parameter | Type | Description |
|---|---|---|
moreAvailable | Boolean | Indicates if the API has returned all the records or if more are available, based on the pagination criteria. True if more records are available. False if there are no more records to be retrieved. |
result | Array of objects | Contains complete information about the metrics. |
id | String | The unique identifier for the record. |
messagesId | String | The unique identifier for the message record. |
sessionId | String | The unique identifier for the session. |
utterance | String | The user utterance/input. |
intent | String | The identified intent for the user’s utterance/input. |
userId | String | The unique identifier for the user. |
channelUId | String | The end-user’s identity provided by the channel. It can be the user’s email ID or enterprise-assigned unique ID. |
language | String | The language in which the conversation happened with the bot. |
timestamp | String | The response date is converted into timestamp format. |
pinned | Boolean | Indicates whether the message is pinned – true or false. |
channel | String | Name of the channel through which the conversation occurred. |
winningIntent | Array | An array containing the winning intent(s) for the utterance. |
isAmbiguous | Boolean | Indicates whether the intent is ambiguous – true or false. |
ambiguousIntents | Array | An array of ambiguous intents, if applicable. |
taskName | String | The name of the task associated with the conversation. |
nodeName | String | The node name. Retrieved only for the Performance metric. |
type | String | The type of the node. Retrieved only for the Performance metric. |
status | String | The status of the task. Retrieved only for the Performance metric. |
statusCode | String | The status code of the task. Retrieved only for the Performance metric. |
responseTime | String | The response time for the task. Retrieved only for the Performance metric. |
flow | Array | An array of task flows. |
taskId | String | The unique identifier for the task. |
koralogstatusId | String | The unique identifier for the koralog status. |
customTags | Object | Custom tags added to the user’s profile. |
customTags.userTags | Array | User tags added to the user’s profile information. |
userTags.name | String | Tag’s name. |
userTags.value | String | Tag’s value. |
customTags.sessionTags | Array | Custom tags added to the conversation session. |
customTags.messagesTags | Array | Meta tags to filter the conversations. |
NLAnalysis | Object | Contains natural language analysis results, including intent recognition and other NLP details. Includes sub-objects intentRescoring, nlProcessing, ml (machine learning analysis), fm (fundamental meaning analysis), faq (FAQ analysis), and finalResolver. Each sub-object contains information about linguistic analysis, intent recognition, and elimination of unlikely intents. |
NLAnalysis.debugTitle | String | The metric type in the NL Analysis. Possible values: • Intent Match Successful• Intent Match Failed• Intent Failed/Abandoned• Intent Completed Successfully• Unhandled Utterances• Performance. |
NLAnalysis.result | String | The result of the NL analysis. For example, an unhandled utterance or a failed task. |
NLAnalysis.messageStoreId | String | A unique identifier for the message stored in the system. |
NLAnalysis.channelId | String | The identifier for the channel where the conversation took place. |
NLAnalysis.bot | String | The name of the bot that handled the conversation. |
NLAnalysis.botid | String | The unique identifier for the bot. |
NLAnalysis.skipConversation | Boolean | If set to true, skips the conversation record. If false, does not skip the conversation. |
NLAnalysis.task | String | The name of the task associated with the conversation. |
NLAnalysis.botLanguage | String | The language used by the bot. |
NLAnalysis.nluLanguage | String | The language in which the NLP training happened for that particular bot language. |
NLAnalysis.taskId | String | The unique identifier for the task associated with the conversation. |
NLAnalysis.isDeveloper | Boolean | Whether the session was initiated by a developer – true or false. |
NLAnalysis.reason | Object | The NL analysis reason object. |
NLAnalysis.reason.cause | String | The cause for NL analysis failure. For example, the script node failure. |
NLAnalysis.reason.causeId | String | The NL analysis cause ID. |
NLAnalysis.fields | String | Contains additional fields associated with the interaction. |
NLAnalysis.logSequenceId | String | The unique log sequence identifier. |
NLAnalysis.intentStatus | String | The status of the intent. |
NLAnalysis.subType | String | The task subtype. For example, a dialog. |
NLAnalysis.channelInfo | String | The bot channel information. |
NLAnalysis.input | Array | An array containing the user’s input. |
NLAnalysis.taskContextId | String | The unique task context identifier. |
NLAnalysis.intentRescoring | Boolean | Indicates whether intent rescoring was enabled – true or false. (true means the system may reevaluate and rescore intents during processing of the user’s input.) |
NLAnalysis.isPreferDefinitiveMatch | Boolean | Indicates whether the system prefers a definitive match when recognizing intents – true or false. |
NLAnalysis.scoringModel | String | The scoring model used for intent recognition. Possible value: original. |
NLAnalysis.toneAnalysis | Object | The toneAnalysis object; contains the tone analysis of the task. |
NLAnalysis.nlProcessing | Object | The nlProcessing object; contains information about the linguistic analysis and NLP of the user’s input. |
NLAnalysis.nlProcessing.originalInput | String | The original user input. |
NLAnalysis.nlProcessing.spellCorrectedInput | String | If spelling correction is applied, contains the corrected user input. null indicates no spelling correction was applied. |
NLAnalysis.nlProcessing.canonical | String | The canonical representation of the input; typically a normalized or recognized form of the user’s input. |
NLAnalysis.nlProcessing.wordAnalysis | Array | An array of objects, each containing a detailed analysis of individual words in the user’s input. |
NLAnalysis.nlProcessing.wordAnalysis.index | Number | The position of the word in the input. |
NLAnalysis.nlProcessing.wordAnalysis.word | String | The recognized/analyzed word. |
NLAnalysis.nlProcessing.wordAnalysis.ignored | Boolean | Indicates whether the word was ignored in the analysis – true or false. |
NLAnalysis.nlProcessing.wordAnalysis.pos | String | Part-of-speech tagging for the word. |
NLAnalysis.nlProcessing.wordAnalysis.role | String | The role or function of the word in the context. |
NLAnalysis.nlProcessing.wordAnalysis.original | String | The original word. |
NLAnalysis.nlProcessing.wordAnalysis.processedWord | String | The processed word. |
NLAnalysis.ml | Object | The ml object; contains information related to machine learning analysis, including intent recognition and elimination of unlikely intents. Most parameters/values are used internally. |
NLAnalysis.fm | Object | The fm object; contains information related to fundamental meaning analysis, including scoring, matching, and elimination of tasks. Most parameters/values are used internally. |
NLAnalysis.faq | Object | The faq object; contains detailed information about the analysis of user input related to FAQ. Most parameters/values are used internally. |
NLAnalysis.finalResolver | Object | The finalResolver object; contains information related to the final resolution process and the determination of the response or action based on the user’s input. Most parameters/values are used internally. |
totalCount | Number | The total number of records identified as per the API request parameters. |