{"id":5932,"date":"2022-11-25T13:39:33","date_gmt":"2022-11-25T13:39:33","guid":{"rendered":"https:\/\/multisite.korebots.com\/smartassist\/?p=5932"},"modified":"2022-11-29T05:17:07","modified_gmt":"2022-11-29T05:17:07","slug":"historical-agent-status-summary","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/smartassist\/historical-agent-status-summary\/","title":{"rendered":"Historical Agent Status Summary"},"content":{"rendered":"<p>To retrieve the status of every agent, for each bucket, in the given time interval. The status shown can be available, busy, away, etc.<\/p>\n<p><strong>Required API Scope:<\/strong> SmartAssist Analytics<\/p>\n<p><b>POST <\/b> <code>https:\/\/{{host}}\/agentassist\/api\/public\/analytics\/account\/{{accountId}}\/\/userstatus<\/code><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Path_Parameters\"><\/span>Path Parameters<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required\/Optional<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">host<\/span><\/td>\n<td>Required<\/td>\n<td>Environment URL, for example, https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<tr>\n<td>accountId<\/td>\n<td>Required<\/td>\n<td>The Account Id<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span class=\"ez-toc-section\" id=\"Authorization\"><\/span>Authorization<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Invoke the API with JWT in the header with the following syntax:<\/p>\n<p><code>auth: {{JWT}}<\/code><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Content_Type\"><\/span>Content Type<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><code>application\/json<\/code><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Request\"><\/span>Sample Request<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>curl --location --request POST \\\r\n     'https:\/\/{host}\/agentassist\/api\/public\/analytics\/account\/{{accountId}}\/\/userstatus'\r\n\r\n      --header 'auth: {jwt-code}' \\\r\n      --header 'Content-Type: application\/json' \\\r\n      --data-raw '{\r\n\t\"filter\":{\r\n\t\t\"agents\":[\"gau@gmail.com\",\"gautham@gmail.com\"],\r\n\t\t\"dateFilter\":{\r\n\t\t\t\"startDate\":\"2022-08-25T10:30:00.000Z\",\r\n\t\t\t\"endDate\":\"2022-08-26T12:52:30.652Z\",\r\n\t\t\t\"timeZoneOffSet\": -330\r\n\t\t     }\r\n\t      },\r\n\t\t\t\"granularity\":20\t\r\n        }'<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Body_Parameters\"><\/span>Body Parameters<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<table style=\"height: 141px\" width=\"499\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required\/Optional<\/th>\n<th>Description<\/th>\n<th>Type<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>filter<\/td>\n<td>Required<\/td>\n<td>Object with the following details to filter the result set<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>agents<\/td>\n<td>Optional<\/td>\n<td>The Email Ids of the agents.<\/td>\n<td>Array<\/td>\n<\/tr>\n<tr>\n<td>dateFilter<\/td>\n<td>Required<\/td>\n<td>Object with the following details to filter the result set<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>startDate<\/td>\n<td>Required<\/td>\n<td>The start timestamp from which the records need to be considered.<br \/>\nThe date format\u00a0 is :<br \/>\n<code>yyyy-mm-ddThh:mm:ss.msZ <\/code><br \/>\neg: <code>2022-08-25T10:30:00.000Z<\/code><\/td>\n<td>Date<\/td>\n<\/tr>\n<tr>\n<td>endDate<\/td>\n<td>Required<\/td>\n<td>The end timestamp from which the records need to be considered.<br \/>\nThe date format\u00a0 is :<br \/>\n<code>yyyy-mm-ddThh:mm:ss.msZ<\/code><br \/>\neg: <code>2022-08-25T10:30:00.000Z<\/code><\/td>\n<td>Date<\/td>\n<\/tr>\n<tr>\n<td>timeZoneOffSet<\/td>\n<td>Required<\/td>\n<td>The time zone offset.<br \/>\neg: <code>-330,630,-500<\/code><\/td>\n<td>Number<\/td>\n<\/tr>\n<tr>\n<td>granularity<\/td>\n<td>Required<\/td>\n<td>The number of minutes from which the records need to be considered.<\/td>\n<td>Number<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Response\"><\/span>Sample Response<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>{\r\n    \"u-93735585-7d99-5608-ba6f-a21c71136808\": {\r\n        \"emailId\": \"gau@gmail.com\",\r\n        \"firstName\": \"gautham\",\r\n        \"timeInterval\": [\r\n            {\r\n                \"startTime\": \"2022-08-26T05:20:00.001Z\",\r\n                \"endTime\": \"2022-08-26T08:40:00.000Z\",\r\n                \"status\": [\r\n                    {\r\n                        \"metric\": \"AgentStatus\",\r\n                        \"value\": \"AVAILABLE\",\r\n                        \"stats\": {\r\n                            \"sum\": 2198656\r\n                        }\r\n                    },\r\n                    {\r\n                        \"metric\": \"AgentStatus\",\r\n                        \"value\": \"BUSY\",\r\n                        \"stats\": {\r\n                            \"sum\": 63242\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        ]\r\n    },\r\n    \"u-22acf441-720c-5f29-8fc7-5a4b74bac596\": {\r\n        \"emailId\": \"gautham@gmail.com\",\r\n        \"firstName\": \"peesapatiGautham\",\r\n        \"lastName\": \"murali\",\r\n        \"timeInterval\": [\r\n            {\r\n                \"startTime\": \"2022-08-26T05:20:00.001Z\",\r\n                \"endTime\": \"2022-08-26T08:40:00.000Z\",\r\n                \"status\": [\r\n                    {\r\n                        \"metric\": \"AgentStatus\",\r\n                        \"value\": \"login\",\r\n                        \"stats\": {\r\n                            \"sum\": \"InProgress\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        ]\r\n    }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To retrieve the status of every agent, for each bucket, in the given time interval. The status shown can be available, busy, away, etc. Required API Scope: SmartAssist Analytics POST https:\/\/{{host}}\/agentassist\/api\/public\/analytics\/account\/{{accountId}}\/\/userstatus Path Parameters Parameter Required\/Optional Description host Required Environment URL, for example, https:\/\/bots.kore.ai accountId Required The Account Id Authorization Invoke the API with JWT in&#8230;<\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/posts\/5932"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/comments?post=5932"}],"version-history":[{"count":13,"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/posts\/5932\/revisions"}],"predecessor-version":[{"id":6027,"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/posts\/5932\/revisions\/6027"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/media?parent=5932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/categories?post=5932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/smartassist\/wp-json\/wp\/v2\/tags?post=5932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}