User state log
Retrieves user state log.
Request | |
---|---|
Method | GET |
Resource | https://[customer].asp.virtual-call-center.eu/v2/statistics/userstate |
Options | from, to, projects, users, of |
Body | N/A |
Response | |
Body | User states, tab-separated, in .csv or .json format. |
Request
Resource parameters
Options
Name | Type | Mandatory | Comment |
---|---|---|---|
customer | string | yes | Your account name. (subdomain) |
from | string | yes | First date of the time period to be searched. Format: yyyymmdd format. (e.g., from=20120301) |
of | string | no | Output format. Possible values: – json (default) – tab – csv |
projects | integer | no | Project(s) data are retrieved from. Multiple items can be separated with commas. (e.g: projects=53,64). |
to | string | yes | Last date of the requested time period to be searched, in yyyymmdd format (e.g: from=20120331). |
users | integer | no | Which user(s) data should be retrieved. If there are several items, they should be separated with commas. (e.g: users=13,14,15). |
start | integer | no | Specifies the offset of the first record. Possible values: [0-9]+ |
num | integer | no | Specifies the maximum number of records to be returned. Possible values: [0-9]+ |
direction | string | no | Specifies the display order of response. Possible values: “ASC”, “DESC” |
Response
Response object
Name | Type | Comment |
---|---|---|
auxid | integer | Auxiliary codes connected with breaks from work. |
chatid | integer | The unique identifier of a chat the user worked with. |
connection_lost | integer | Shows if the user was disconnected by the system (1) or not (0). |
duration | integer | Time spent in ‘state’. |
emailid | integer | The unique identifier of an email the user worked with. |
name | integer | Name of the user. |
numberid | integer | Record’s identifier for the caller. |
prevstate | string | The status before the last status. |
prevtime | string | Timestamp when entering ‘prevstate’, in ‘YYYY-MM-DD hh:mm:ss’ format. |
prevtime_utc | string | Timestamp when entering ‘prevstate’ in UTC, in ‘YYYY-MM-DD hh:mm:ss’ format. |
projectid | integer | Project identifier. |
state | string | Last closed status. Possible values: – OFFLINE – UNAVAILABLE – AVAILABLE – PREWORK – WAITING4CALL – WAITING4RECALL – RINGING – CALL – HOLD – AFTERWORK – AUX |
ticketid | integer | The ticket’s identifier the user worked with. |
ticketno | string | The ticket’s number that was generated by the system the user worked with. |
time | string | Timestamp when entering ‘state’, in ‘YYYY-MM-DD hh:mm:ss’ format. |
time_utc | string | Timestamp when entering ‘state’ in UTC, in ‘YYYY-MM-DD hh:mm:ss’ format. |
userid | integer | User identifier. |
username | integer | User’s username. |
Example
List the states of Robert Green (userid=6) on 20.02.2013.
https://mycc.asp.virtual-call-center.eu/v2/statistics/userstate?from=20130220&to=20130220&users=6
Response body
{
"response": [
{
"userid": 6,
"prevstate": "OFFLINE",
"state": "UNAVAILABLE",
"prevtime": "2013-02-20 15:40:06",
"prevtime_utc": "2013-02-20 15:40:06",
"time": "2013-02-20 15:40:06",
"time_utc": "2013-02-20 15:40:06",
"projectid": 0,
"numberid": 0,
"auxid": null,
"emailid": 0,
"chatid": 0,
"ticketid": 0,
"connection_lost": 0,
"duration": 0,
"ticketno": "",
"username": "green_op",
"name": "Robert Green"
},
{
"userid": 6,
"prevstate": "UNAVAILABLE",
"state": "AVAILABLE",
"prevtime": "2013-02-20 15:40:06",
"prevtime_utc": "2013-02-20 15:40:06",
"time": "2013-02-20 15:40:11",
"time_utc": "2013-02-20 15:40:11",
"projectid": 0,
"numberid": 0,
"auxid": null,
"emailid": 0,
"chatid": 0,
"ticketid": 0,
"connection_lost": 0,
"duration": 5.75,
"ticketno": "",
"username": "green_op",
"name": "Robert Green"
},
{
"userid": 6,
"prevstate": "AVAILABLE",
"state": "AUX",
"prevtime": "2013-02-20 15:40:11",
"prevtime_utc": "2013-02-20 15:40:11",
"time": "2013-02-20 15:40:19",
"time_utc": "2013-02-20 15:40:19",
"projectid": 1,
"numberid": 0,
"auxid": null,
"emailid": 0,
"chatid": 0,
"ticketid": 0,
"connection_lost": 0,
"duration": 7.44,
"ticketno": "",
"username": "green_op",
"name": "Robert Green"
},
{
"userid": 6,
"prevstate": "AUX",
"state": "AVAILABLE",
"prevtime": "2013-02-20 15:40:19",
"prevtime_utc": "2013-02-20 15:40:19",
"time": "2013-02-20 15:41:05",
"time_utc": "2013-02-20 15:41:05",
"projectid": 1,
"numberid": 0,
"auxid": "lunch",
"emailid": 72,
"chatid": 0,
"ticketid": 48,
"connection_lost": 0,
"duration": 46.4,
"ticketno": "1-20221006-513722",
"username": "green_op",
"name": "Robert Green"
},
{
"userid": 6,
"prevstate": "AVAILABLE",
"state": "WAITING4CALL",
"prevtime": "2013-02-20 15:41:05",
"prevtime_utc": "2013-02-20 15:41:05",
"time": "2013-02-20 15:41:12",
"time_utc": "2013-02-20 15:41:12",
"projectid": 1,
"numberid": 0,
"auxid": null,
"emailid": 0,
"chatid": 0,
"ticketid": 0,
"connection_lost": 0,
"duration": 6.96,
"ticketno": "",
"username": "green_op",
"name": "Robert Green"
},
{
"userid": 6,
"prevstate": "WAITING4CALL",
"state": "RINGING",
"prevtime": "2013-02-20 15:41:12",
"prevtime_utc": "2013-02-20 15:41:12",
"time": "2013-02-20 15:41:17",
"time_utc": "2013-02-20 15:41:17",
"projectid": 1,
"numberid": 2,
"auxid": null,
"emailid": 0,
"chatid": 0,
"ticketid": 0,
"connection_lost": 0,
"duration": 4.57,
"ticketno": "",
"username": "green_op",
"name": "Robert Green"
},
{
"userid": 6,
"prevstate": "RINGING",
"state": "AFTERWORK",
"prevtime": "2013-02-20 15:41:17",
"prevtime_utc": "2013-02-20 15:41:17",
"time": "2013-02-20 15:41:25",
"time_utc": "2013-02-20 15:41:25",
"projectid": 1,
"numberid": 2,
"auxid": null,
"emailid": 0,
"chatid": 24,
"ticketid": 61,
"connection_lost": 0,
"duration": 7.88,
"ticketno": "1-20221005-514723",
"username": "green_op",
"name": "Robert Green"
}
],
"errors": []
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.