Skip to main content
Back to API List This task-wise Containment Report offers a comparative analysis of the impact of task executions on overall containment. It breaks down task-wise successes and failures by containment type, including Drop-off, Self-service, and Agent Hand-off, providing a detailed overview for better understanding and decision-making.
FieldValue
MethodPOST and GET
Endpoint (POST)https://{{host}}/api/public/bot/{{botID}}/taskContainmentReport?skip={{skipValue}}&limit={{limitValue}}
Endpoint (GET)https://{{host}}/api/public/bot/{{botID}}/taskContainmentReport/status/{{_id}}
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Metrics; Admin Console: Not Applicable
It’s a combination of POST and GET methods. The POST method is used to set the filters and the GET method is used to fetch data as per the set filters.

Path Parameters

ParameterRequiredDescription
hostRequiredEnvironment URL. For example, https://platform.kore.ai
BotIDRequiredBot ID or Stream ID can be accessed from the General Settings page in the application.
_idRequired (GET only)The API Response ID returned by the POST method in the response object. Use it in the GET method to get data as per the set filters.
skipOptional (POST only)The number of messages to be skipped.
limitOptional (POST only)The number of messages to be shown on each page.

Sample Request for the POST Method

curl --location 'https://{{host}}/api/public/bot/{{botId}}/taskContainmentReport?skip={{skipValue}}&limit={{limitValue}}' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
        "dateFrom": "2024-04-22",
        "dateTo": "2024-04-30T00:00:00.000Z",
        "ConversationStatus": "Active",
        "ConversationType": "Interactive",
        "AggregationType": "Daily"
    }
}'

Request Body Parameters

ParameterRequiredDescription
dateFromOptionalThe start time selected for the report generation. If not provided, the system considers 7 days prior to the dateTo value. Formats accepted: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.msZ.
dateToOptionalThe end time selected for the report generation. If not provided, the system considers 7 days after the dateFrom value. Maximum allowed time range is 90 days.
includeTaskNameOptionalAn array of strings representing task names for which the execution report is generated.
ConversationTypeOptionalConversation type filter: Interactive or Non-Interactive.
ConversationStatusOptionalCurrent conversation status: Active or Closed.
AggregationTypeOptionalReport aggregation type: Daily (max 30 days) or Cumulative.
tagsOptionalEmitted custom tags represented as an array of objects to filter the task execution data.

Sample Response for the POST Method

{
   "status": "IN_PROGRESS",
   "percentageComplete": 0,
   "streamId": "st-9xxxxxx9-0xx9-5xxd-8xxa-7xxxxxxxxx56",
   "jobType": "TASK_EXECUTION_CONTAINMENT_REPORT",
   "action": "QUERY",
   "countOfDockStatuses": 1,
   "createdBy": "u-exxxxxx6-6xx1-5xx5-axx4-5xxxxxxxxxd2",
   "expireAt": "2024-03-08T12:30:46.247Z",
   "statusLogs": [],
   "_id": "ds-9xxxxxxd-0xx4-5xx8-axx8-axxxxxxxd083",
   "lMod": "2024-03-08T12:15:46.000Z",
   "createdOn": "2024-03-08T12:15:46.253Z",
   "requestedTime": "2024-03-08T12:15:46.253Z",
   "__v": 0
}

Response Body Parameters (POST)

ParameterDescription
statusStatus of the task execution.
percentageCompleteThe percentage of task execution completed.
streamIdCan be accessed from the General Settings page of the application.
jobTypeTask Execution Containment Report.
actionQuery action for task execution.
countOfDockStatusesThe number of dock statuses generated for the task execution-based report.
createdByThe user ID of the end user who created the task execution-based report.
expireAtTask execution expiry timestamp.
statusLogsAn array of status logs for the task execution.
_idThe API Response ID.
lModThe last modified time for the task execution-based report.
createdOnThe task execution-based report creation date.
requestedTimeThe time of request for the task execution-based report.

Sample Request for the GET Method

curl --location 'https://{{host}}/api/public/bot/{{botID}}/taskContainmentReport/status/{{_id}}' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'

Sample Response for the GET Method

{
   "tasksExecutionReport": {
   "total": 8,
   "data": {
   "2024-03-07": [
       {
         "totalExecution": 1,
         "totalSession": 1,
         "selfServiceSessions": 1,
         "dropOffSessions": 0,
         "agentTransferSessions": 0,
         "dateRange": "2024-03-07",
         "taskType": "dialog",
         "taskName": "Tags 1",
         "Status": "success",
         "selfServiceSessionsInPercentage": 100,
         "dropOffSessionsInPercentage": 0,
         "agentTransferSessionsInPercentage": 0
      }
    ]
  }
  },
  "status": "SUCCESS"
}

Response Body Parameters (GET)

ParameterDescription
totalExecutionThe overall count of the successful or failed tasks executed for a conversation session.
totalSessionTotal number of conversation sessions during which the specified task is executed.
selfServiceSessionsTotal number of conversation sessions marked as Self-service during which the specified task is executed.
dropOffSessionsTotal number of conversation sessions marked as Drop-off during which the specified task is executed.
agentTransferSessionsThe total number of conversation sessions marked as Agent Transfer during which the specified task is executed.
dateRangeThe date range based on the selected dateFrom and dateTo values.
taskTypeThe type of task executed: Dialog, Alert task, or FAQ.
taskNameName of the task executed, including Dialog Tasks, Alert Tasks, and FAQs.
StatusTasks that are successfully executed are marked as success. Unsuccessful tasks are marked as failtask.
selfServiceSessionsInPercentageThe percentage of sessions classified as Self-Service out of the total sessions for a task status.
dropOffSessionsInPercentageThe percentage of sessions classified as drop-off out of the total sessions for a task status.
agentTransferSessionsInPercentageThe percentage of sessions classified as Agent Hand-off or transfer out of the total sessions for a task status.