2.3 切换座席状态

应用场景:登录后

标识(key):changeAgentStatus

传入参数(data):

序号 名称 类型 是否必填 说明
1 id String 对接ID
2 type String 类型(传’ready’为切换至空闲,’busy’切换至忙碌)
示例代码:
//切换座席状态
function changeAgentStatus () {
  let obj = {
    key: 'changeAgentStatus',
    data: {
      id: phoneId, // 对接ID
      type: 'ready', // ready’为切换至空闲,’busy’切换至忙碌
    }
  }
  telephoneFunction(obj);
}
切换座席状态的回调事件说明:
{
    "key": "CTIResponse",
    "name": "通话信令",
    "data": {
        "agentnum": "1007",
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "type": "response",
        "command": "agentSetState", // 切换座席状态事件
        "retmsg": "succeed!",
        "retcode": 200 // 200代表切换成功,非200切换失败
    }
}
{
    "key": "CTIEvent",
    "name": "通话信令",
    "data": {
        "agentnum": "1007",
        "reason": "agent setup",
        "stateto": "ready", // 当前的座席状态
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "type": "event",
        "command": "agentstatus", // 座席状态结果事件
        "statefrom": "busy" // 上一次的座席状态
    }
}
文档更新时间: 2024-08-28 14:30   作者:admin