Skip to content

自动外呼任务 ​

接口说明 ​

调用接口可对自动外呼任务进行管理,包括增、删、查、导入号码、更改状态。

⚠️自动外呼任务开启有时间段限制(8am.-10pm.),如需涉及特殊时间段通知场景,请使用语音通知实现。

1.创建 ​

请求示例 ​

json
{
  "name": "任务名称",
  "description": "任务描述",
  "priority": 1,
  "callStrategy": {
    "concurrentType": "stable",
    "concurrent": 10,
    "magnification": 1,
    "maxConcurrent": 10
  },
  "timeConditionId": "anyTime",
  "answerType": "voice",
  "ivrId": "",
  "voiceId": "",
  "numberPickType": 3,
  "numberList": [],
  "numberStrategyId": "",
  "timeOut": 20,
  "startType": "manual",
  "timingStartTime": "",
  "customParams": ""
}

请求方式 ​

POST/call/web/v1/autoCallTask/create

请求参数 ​

参数类型必填示例值说明
namestring是—任务名称
descriptionstring否—任务描述
priorityinteger否1优先级,越小越优先,默认值1
callStrategyobject是{}呼叫策略
concurrentTypestring是stable并发类型(stable 固定并发,dynamic 动态并发)
concurrentinteger否—固定并发数,并发类型为固定并发时必填
magnificationinteger否—空闲座席倍率,并发类型为动态并发时必填
maxConcurrentinteger否—最大并发,并发类型为动态并发时必填
timeConditionIdstring是—运行时间id(全局设置-服务时间),可使用"anyTime"代表不限时间
answerTypestring是—被叫接通后处理类型(ivr ivr导航,voice 播放语音)
ivrIdstring否—ivr导航id,answerType为ivr时必填
voiceIdstring否—语音id,answerType为voice时必填
numberPickTypeinteger是—外显号码策略(1 指定外显号列表随机,2 智能外显,3 全部外显号随机)
numberListlist否—外显号列表,外显号码策略为1时必填
numberStrategyIdstring否—外显策略id,外显号码策略为2时必填
startTypestring否—启动方式,默认值manual(manual 手动启动,timing 定时启动)
timingStartTimestring否—定时启动时间,启动方式为定时时必填(格式 yyyy-MM-dd HH:mm:ss)
timeOutinteger否—被叫振铃超时秒数,默认值20
openRepeatCallboolean否—重复呼叫开关,默认值false
repeatCallResultlist否—需要重复呼叫的结果,默认全选(QUEUE_ABANDON 排队放弃 CUSTOMER_NO_ANSWER 客户未接 AGENT_NO_ANSWER 座席未接)
repeatCallCountinteger否—重复呼叫次数,1-5整数
repeatCallIntervalinteger否—重复呼叫间隔,单位分钟,0-60整数
customParamsstring否—自定义参数,最大255字节,通话记录查询和推送事件会原样返回

成功响应 ​

json
{
  "success": true,
  "message": "200 ok!",
  "code": "200",
  "data": {
    "id": "",
    "accountId": "",
    "name": "任务名称",
    "status": "notTurnedOn",
    "description": "任务描述",
    "priority": 1,
    "callStrategy": {
      "concurrentType": "stable",
      "concurrent": 10,
      "magnification": 1,
      "maxConcurrent": 10,
      "freeAgentCount": 0
    },
    "timeConditionId": "anyTime",
    "numberPickType": 3,
    "numberList": [],
    "numberStrategyId": "",
    "answerType": "voice",
    "ivrId": "",
    "voiceId": "",
    "timeOut": 20,
    "startType": "manual",
    "timingStartTime": null,
    "callout": 0,
    "total": 0,
    "dealing": 0,
    "called": 0
  }
}

data 字段说明

字段说明
status状态(notTurnedOn 未开启,dealing 执行中,pauseding 暂停中,paused 已暂停,complete 已完成)
callout呼叫总次数
total任务中号码总数
dealing接通总数
called有效外呼数

2.修改 ​

请求示例 ​

json
{
  "id": "",
  "name": "任务名称",
  "description": "任务描述",
  "priority": 1,
  "callStrategy": {
    "concurrentType": "stable",
    "concurrent": 10,
    "magnification": 1,
    "maxConcurrent": 10
  },
  "timeConditionId": "anyTime",
  "answerType": "voice",
  "ivrId": "",
  "voiceId": "",
  "numberPickType": 3,
  "numberList": [],
  "numberStrategyId": "",
  "timeOut": 20,
  "startType": "manual",
  "timingStartTime": "",
  "customParams": ""
}

请求方式 ​

POST/call/web/v1/autoCallTask/update

请求参数 ​

参数类型必填示例值说明
idstring是—任务id,必填
namestring是—任务名称
descriptionstring否—任务描述
priorityinteger否1优先级,越小越优先,默认值1
callStrategyobject是{}呼叫策略
concurrentTypestring是stable并发类型(stable 固定并发,dynamic 动态并发)
concurrentinteger否—固定并发数,并发类型为固定并发时必填
magnificationinteger否—空闲座席倍率,并发类型为动态并发时必填
maxConcurrentinteger否—最大并发,并发类型为动态并发时必填
timeConditionIdstring否—运行时间id(全局设置-服务时间),可使用"anyTime"代表不限时间
answerTypestring是—被叫接通后处理类型,(ivr ivr导航,voice 播放语音)
ivrIdstring否—ivr导航id,answerType为ivr时必填
voiceIdstring否—语音id,answerType为voice时必填
numberPickTypeinteger是—外显号码策略,(1 指定外显号列表随机,2 智能外显,3 全部外显号随机)
numberListlist否—外显号列表,外显号码策略为1时必填
numberStrategyIdstring否—外显策略id,外显号码策略为2时必填
startTypestring否—启动方式,默认值manual(manual 手动启动,timing 定时启动)
timingStartTimestring否—定时启动时间,启动方式为定时时必填(格式 yyyy-MM-dd HH:mm:ss)
timeOutinteger否—被叫振铃超时秒数,默认值20
openRepeatCallboolean否—重复呼叫开关,默认值false
repeatCallResultlist否—需要重复呼叫的结果,默认全选(QUEUE_ABANDON 排队放弃 CUSTOMER_NO_ANSWER 客户未接 AGENT_NO_ANSWER 座席未接)
repeatCallCountinteger否—重复呼叫次数,1-5整数
repeatCallIntervalinteger否—重复呼叫间隔,单位分钟,0-60整数
customParamsstring否—自定义参数,最大255字节,通话记录查询和推送事件会原样返回

成功响应 ​

json
{
  "success": true,
  "message": "200 ok!",
  "code": "200",
  "data": {
    "id": "",
    "accountId": "",
    "name": "任务名称",
    "status": "notTurnedOn",
    "description": "任务描述",
    "priority": 1,
    "callStrategy": {
      "concurrentType": "stable",
      "concurrent": 10,
      "magnification": 1,
      "maxConcurrent": 10,
      "freeAgentCount": 0
    },
    "timeConditionId": "anyTime",
    "numberPickType": 3,
    "numberList": [],
    "numberStrategyId": "",
    "answerType": "voice",
    "ivrId": "",
    "voiceId": "",
    "timeOut": 20,
    "startType": "manual",
    "timingStartTime": null,
    "callout": 0,
    "total": 0,
    "dealing": 0,
    "called": 0
  }
}

data 字段说明

字段说明
status状态(notTurnedOn 未开启,dealing 执行中,pauseding 暂停中,paused 已暂停,complete 已完成)
callout呼叫总次数
total任务中号码总数
dealing接通总数
called有效外呼数

3.导入号码 ​

请求示例 ​

json
{
  "id": "",
  "duplicateCheckType": "2",
  "customerNumberList": [
    "13800000000",
    "13811111111"
  ],
  "customerNumberParam": {
    "13800000000": {
      "customerName": "客户名称",
      "memo": "备注",
      "customParams": "自定义参数"
    }
  }
}

请求方式 ​

POST/call/web/v1/autoCallTask/importNumbers

请求参数 ​

参数类型必填示例值说明
idstring是—任务id,必填
duplicateCheckTypestring否—号码查重类型,默认值2(1 所有任务,2 当前任务,3 不查重)
customerNumberListlist是—号码列表,必填
customerNumberParamobject否—号码额外参数,key为号码,value为对象,对象格式参考示例

成功响应 ​

json
{
  "success": true,
  "message": "200 ok!",
  "code": "200",
  "data": null
}

4.修改状态 ​

请求示例 ​

json
{
  "id": "",
  "status": "turnedOn"
}

请求方式 ​

POST/call/web/v1/autoCallTask/updateStatus

请求参数 ​

参数类型必填示例值说明
idstring是—任务id,必填
statusstring是—状态,必填(turnedOn 开启,paused 暂停)

成功响应 ​

json
{
  "success": true,
  "message": "200 ok!",
  "code": "200",
  "data": {
    "id": "",
    "accountId": "",
    "name": "任务名称",
    "status": "notTurnedOn",
    "description": "任务描述",
    "priority": 1,
    "callStrategy": {
      "concurrentType": "stable",
      "concurrent": 10,
      "magnification": 1,
      "maxConcurrent": 10,
      "freeAgentCount": 0
    },
    "timeConditionId": "anyTime",
    "numberPickType": 3,
    "numberList": [],
    "numberStrategyId": "",
    "answerType": "voice",
    "ivrId": "",
    "voiceId": "",
    "timeOut": 20,
    "startType": "manual",
    "timingStartTime": null,
    "callout": 0,
    "total": 0,
    "dealing": 0,
    "called": 0
  }
}

data 字段说明

字段说明
status状态(notTurnedOn 未开启,dealing 执行中,pauseding 暂停中,paused 已暂停,complete 已完成)
callout呼叫总次数
total任务中号码总数
dealing接通总数
called有效外呼数

5.删除 ​

请求示例 ​

json
[
  "id1",
  "id2"
]

请求方式 ​

POST/call/web/v1/autoCallTask/delete

成功响应 ​

json
{
  "success": true,
  "message": "200 ok!",
  "code": "200",
  "data": null
}

6.快捷创建 ​

请求示例 ​

json
{
  "callStrategy": {
    "concurrentType": "stable",
    "concurrent": 10
  },
  "answerType": "voice",
  "voiceId": "id01",
  "customerNumberList": [
    "13800000000"
  ],
  "customerNumberParam": {
    "13800000000": {
      "customerName": "客户名称",
      "memo": "备注",
      "customParams": "自定义参数"
    }
  },
  "customParams": ""
}

请求方式 ​

POST/call/web/v1/autoCallTask/simpleCreate

请求参数 ​

参数类型必填示例值说明
namestring否—任务名称,默认值当前毫秒时间戳
descriptionstring否—任务描述
priorityinteger否1优先级
callStrategy—是—呼叫策略
concurrentTypestring是stable并发类型 stable 固定并发 dynamic 动态并发
concurrentinteger否—固定并发数,并发类型为固定并发时必填
magnificationinteger否—空闲座席倍率,并发类型为动态并发时必填
maxConcurrentinteger否—最大并发,并发类型为动态并发时必填
timeConditionIdstring否anyTime运行时间id(全局设置-服务时间),默认值"anyTime",代表不限时间
answerTypestring是—被叫接通后处理类型 ivr ivr导航 voice 播放语音
ivrIdstring否—ivr导航id,answerType为ivr时必填
voiceIdstring否—语音id,answerType为voice时必填
numberPickTypeinteger否—外显号码策略,默认值3(1 指定外显号列表随机 2 智能外显 3 全部外显号随机)
numberListstringlist否—外显号列表,外显号码策略为1时必填
numberStrategyIdstring否—外显策略id,外显号码策略为2时必填
startTypestring否timing启动方式,默认值timing(manual 手动启动 timing 定时启动)
timingStartTimestring否当前时间定时启动时间,默认值当前时间 格式 yyyy-MM-dd HH:mm:ss
timeOutinteger否20被叫振铃超时秒数,默认值20
customerNumberListstringlist是—客户号码列表
customerNumberParamobject否—号码额外参数,key为号码,value为对象,对象格式参考示例
openRepeatCallboolean否—重复呼叫开关,默认值false
repeatCallResultlist否—需要重复呼叫的结果,默认全选(QUEUE_ABANDON 排队放弃 CUSTOMER_NO_ANSWER 客户未接 AGENT_NO_ANSWER 座席未接)
repeatCallCountinteger否—重复呼叫次数,1-5整数
repeatCallIntervalinteger否—重复呼叫间隔,单位分钟,0-60整数
customParamsstring否—自定义参数,最大255字节,通话记录查询和推送事件会原样返回

成功响应 ​

json
{
  "success": true,
  "message": "200 ok!",
  "code": "200",
  "data": {
    "id": "",
    "accountId": "1015",
    "name": "1704168304250",
    "status": "notTurnedOn",
    "description": null,
    "priority": 1,
    "callStrategy": {
      "concurrentType": "stable",
      "concurrent": 10,
      "magnification": null,
      "maxConcurrent": 0,
      "freeAgentCount": 0
    },
    "timeConditionId": "anyTime",
    "numberPickType": 3,
    "numberList": null,
    "numberStrategyId": null,
    "answerType": "voice",
    "ivrId": null,
    "voiceId": "",
    "timeOut": 20,
    "startType": "timing",
    "timingStartTime": "2024-01-02 12:05:04",
    "callout": 0,
    "total": 0,
    "dealing": 0,
    "called": 0
  }
}

7.查询任务 ​

请求示例 ​

json
{
  "ids": [
    "id1"
  ],
  "page": 1,
  "pageSize": 10
}

字段说明

字段说明
page页数,默认1
pageSize每页条数,默认10

请求方式 ​

POST/call/web/v1/autoCallTask/query

请求参数 ​

参数类型必填示例值说明
idsstringlist否—任务id数组
namestring否—任务名称
pageint否1页数
pageSizeint否10每页条数

成功响应 ​

json
{
  "success": true,
  "message": "200 ok!",
  "code": "200",
  "data": {
    "list": [
      {
        "id": "",
        "accountId": "",
        "name": "任务名称",
        "status": "notTurnedOn",
        "description": "任务描述",
        "priority": 1,
        "callStrategy": {
          "concurrentType": "stable",
          "concurrent": 10,
          "magnification": 1,
          "maxConcurrent": 10,
          "freeAgentCount": 0
        },
        "timeConditionId": "anyTime",
        "numberPickType": 3,
        "numberList": [],
        "numberStrategyId": "",
        "answerType": "voice",
        "ivrId": "",
        "voiceId": "",
        "timeOut": 20,
        "startType": "manual",
        "timingStartTime": null,
        "callout": 0,
        "total": 0,
        "dealing": 0,
        "called": 0
      }
    ],
    "page": 1,
    "pageSize": 1,
    "count": 4,
    "total": 4,
    "totalPage": 4
  }
}

data.list[] 字段说明

字段说明
status状态(notTurnedOn 未开启,dealing 执行中,pauseding 暂停中,paused 已暂停,complete 已完成)
callout呼叫总次数
total任务中号码总数
dealing接通总数
called有效外呼数