Skip to content

创建客服技能

该接口用于创建客服技能。

Tip: 注意事项: user_access_token 访问,需要操作者是当前服务台的管理员或所有者

请求

项目
HTTP URLhttps://open.feishu.cn/open-apis/helpdesk/v1/agent_skills
HTTP MethodPOST
接口频率限制特殊频控
支持的应用类型custom
权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用helpdesk:all 更新服务台资源详情

请求头

名称类型必填描述
Authorizationstringuser_access_token 值格式:"Bearer access_token" 示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token
Content-Typestring固定值:"application/json; charset=utf-8"

Tip: 服务台请求Header中还需添加“服务台token”参数:

Key: X-Lark-Helpdesk-Authorization

Value: base64(helpdesk_id:helpdesk_token),通过base64加密将helpdesk_id和helpdesk_token用':'连接而成的字符串。

了解更多:获取与使用服务台token

请求体

名称类型必填描述
namestring技能名
示例值:"test-skill"
rulesagent_skill_rule\[\]技能rules
  └ idstringrule id, 参考获取客服技能rules 用于获取rules options
示例值:"test-skill-id"
  └ selected_operatorint运算符比较, 参考客服技能运算符选项
示例值:8
  └ operandstringrule 操作数的值
示例值:"{\"selected_departments\":[{\"id\":\"部门ID\",\"name\":\"IT\"}]}"
  └ categoryintrule 类型,1-知识库,2-工单信息,3-用户飞书信息
示例值:3
agent_idsstring\[\]客服 ids
示例值:["ou_ea21d7f018e1155d960e40d33191f966"]

请求体示例

json
{
    "name": "部门技能",
    "rules": [
        {
            "id": "12",
            "selected_operator": 8,
            "operand": {
                "selected_departments": [
                    {
                        "id": "部门ID",
                        "name": "IT"
                    }
                ]
            }
        }
    ],
    "agent_ids": [
        "客服ID"
    ]
}

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
data\--
  └ agent_skill_idstring客服技能id

响应体示例

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "agent_skill_id": "test-skill-id"
    }
}

错误码

HTTP状态码错误码描述排查建议
400154000Bad request, please check your request body请求不合法,请检查参数
403154003Please check you have the correct access检查是否申请正确权限
500155000Internal error内部错误,请联系我们

内容来源:飞书开放平台 · 自动爬取整理