员工统计-任务执行
企业可通过此接口获取员工任务执行的统计数据
请求方式: POST(HTTPS)
请求地址: https://open.wshoto.com/openapi/user/get_user_task_execute_statistics_list
Query参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 调用接口凭证 |
Body参数:
{
"query_type": 1,
"task_type": 1,
"time_type": 1,
"time_value": 1,
"user_ids": [
"1",
"2"
],
"dept_ids": [
"1",
"2"
]
}
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
query_type | Int | 是 | 查询类型,1-员工,2-部门. |
task_type | int | 否 | 任务类型,0-全部,1:群发客户,2:群发客户群,3:群发朋友圈,4:协作任务,5:标准营销,6:跟进任务, 7:超级群发.默认值:0 |
time_type | int | 是 | 时间类型,1-日,2-周,3-月 |
time_value | long | 是 | 时间参数.时间戳精度:秒.最大值:4102329599 当time_type=1,传入对应当天任意时间点的时间戳. 当time_type=2,传入对应周的周日任意时间点的时间戳. 当time_type=3,传入对应月的任意一天时间点的时间戳. |
user_ids | array | 否 | 员工id集合,当查询类型为员工时候,该字段必填.集合最大个数:100 |
dept_ids | array | 否 | 部门id集合,当查询类型为部门时候,该字段必填.集合最大个数:20 |
返回值:
{
"code": 0,
"msg": "请求成功",
"data": [
{
"staff_id": "test_d156e6218830",
"department_id": "test_244f505201b5",
"need_task_execute_cnt": 82,
"need_execute_staff_cnt": 71,
"task_complete_rate": "0.123",
"task_complete_cnt": 1
}
]
}
返回说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 出错返回码,为0表示成功,非0表示调用失败 |
msg | string | 返回码描述 |
data | array[] | 分页对象 |
staff_id | string | 员工id,当传入员工id进行查询时候,该字段才会返回具体参数 |
department_id | string | 部门id |
need_task_execute_cnt | long | 需执行次数 |
need_execute_staff_cnt | long | 需执行员工数 |
task_complete_rate | string | 完成率,格式:小数 |
task_complete_cnt | long | 完成数 |
错误码:
code | 返回码描述 |
---|---|
30011 | 当查询类型为员工时候,员工id集合不能为空 |
30012 | 当查询类型为部门时候,部门id集合不能为空 |
30013 | 当前时间不是周日的某个时间,请传入正确参数 |
30014 | 时间戳参数转化异常,请传入正确参数 |