此接口用于新增外呼任务。
接口说明
接口支持创建预测外呼和自动外呼任务,任务类型通过 type 字段区分。 创建任务数量如果超过最大任务限制,接口提供参数自动删除最早已完成的任务。
为确保平台服务稳定性,本 API 设定以下使用限制: 可创建任务数:≤ 100 个。 可导入号码数:≤ 1000 万个。
当触发上述任一限制时,本次请求失败。
新增任务接口提供参数自动删除最早已完成的任务:
autoDelete:创建任务超出最大任务数限制时,是否自动删除已完成的最早创建的任务,值为 1 代表自动删除。
平台提供删除任务接口「删除任务」:业务平台可根据实际情况定期自动删除已完成的任务。
删除任务时任务内的号码清单会全量删除,平台已呼叫过的通话记录明细、录音文件会继续保留。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| EnterpriseId |
integer |
是 |
呼叫中心 id。 |
36 |
| Name |
string |
是 |
任务名称;需进行 UTF-8 格式的 URLEncode 编码,长度小于 50 字 |
taskName |
| Description |
string |
否 |
任务描述;需进行 UTF-8 格式的 URLEncode 编码,长度小于 200 字 |
Task Description |
| Type |
integer |
是 |
外呼任务创建后任务类型不支持修改。
|
1 |
| TemplateName |
string |
否 |
任务模板名称。
说明
|
TemplateName |
| AutoStart |
integer |
否 |
定时开始,默认关闭。
说明
|
0 |
| AutoStartDay |
string |
否 |
定时开始日期;autoStart=1 时生效。参数不传入时默认在当天的 autoStartTime 定时启动。格式:yyyy-MM-dd,如:2017-01-01 |
2026-01-01 |
| AutoStartTime |
string |
否 |
定时开始时间;autoStart=1 时生效。参数不传入时默认在 autoStartDay 的 00:00:00 定时启动。格式:HH:mm:ss,如:08:00:00 |
08:00:00 |
| AutoStop |
integer |
否 |
定时完成,默认关闭。
说明
|
0 |
| AutoStopDay |
string |
否 |
定时完成日期;autoStop=1 时生效。参数不传入时默认在当天的 autoStopTime 定时完成。格式:yyyy-MM-dd,如:2017-01-01 |
2026-01-01 |
| AutoStopTime |
string |
否 |
定时完成时间;autoStop=1 时生效。参数不传入时默认在 autoStopDay 的 23:59:59 定时完成。格式:HH:mm:ss,如:17:00:00 |
17:00:00 |
| ForceEndFlag |
integer |
否 |
定时完成时强制结束任务;autoStop=1 时生效。0.关闭 1.开启,默认关闭。开启配置后,当任务到定时完成时间时无论任务中的号码是否已经呼完,均将任务状态设置为结束。适用于对数据有呼叫时间限制的场景。注:任务在结束状态时无法再次启动。 |
0 |
| AutoTaskType |
integer |
否 |
配合定时开始(autoStart)和定时结束(autoStop)参数使用,如任务需要在每天的特定时间段内呼叫则开启间隔呼叫方式。默认连续呼叫。
|
0 |
| AutoTriggerTimeStrategy |
string |
否 |
间隔呼叫时间段;autoTaskType=1 时必填。呼叫的时间段配置。参数格式:时间条件编号。支持多个,多个使用英文","逗号隔开,如: 说明
|
9,22 |
| AutoComplete |
integer |
否 |
默认开启。
说明
|
0 |
| RetryStrategy |
string |
否 |
重试策略;
说明
|
{"retry":2,"strategy":[{"round":1,"time":"1-1-1"},{"round":2,"time":"2-2-2"}]} |
| RetryStrategyTimeType |
integer |
否 |
重试策略时间类型;配置重试策略时生效。
|
1 |
| RetryStrategyOnlyToday |
integer |
否 |
任务仅当天生效;
|
0 |
| CallPriorityStrategy |
string |
否 |
|
0 |
| CustomerClidsCategory |
integer |
否 |
客户侧外显号码类型;
说明
|
1 |
| CustomerClids |
string |
否 |
客户侧外显号码列表;customerClidsCategory=1 或 2 时必填。支持多个,多个直接使用英文逗号','分隔。不建议使用 |
7744331,7744332 |
| CustomerClidType |
integer |
否 |
客户侧外显规则;customerClidsCategory=1 或 2 时生效。默认随机。不建议使用
|
1 |
| ClidProperty |
string |
否 |
外显规则;customerClidType=2 时生效。Json 格式,外显号码选择规则:默认区号,是否匹配省会等;如:{"defaultAreaCode":"010", "isMatchCapital":"1"}。不建议使用 |
{"defaultAreaCode":"010", "isMatchCapital":"1"} |
| CustomerClidWeightFlag |
integer |
否 |
外显号码比例配置开关;customerClidsCategory=1 时生效。默认关闭。不建议使用。
|
0 |
| CustomerClidWeight |
string |
否 |
外显号码比例配置内容;customerClidsCategory=1 且 customerClidWeightFlag=1 时生效。JsonArray 格式 [{"number":"123,345","weight":"5"}, {"number":"567,789","weight":"5"}],不建议使用 |
[{"number":"123,345","weight":"5"}, {"number":"567,789","weight":"5"}] |
| CustomerClidsGroup |
string |
否 |
客户侧外显号码池名称或外显导航标识;customerClidsCategory=4 或 5 时必填。customerClidsCategory=4 时 customerClidsGroup 传号码池名称。customerClidsCategory=5 时 customerClidsGroup 传外显导航标识 |
example |
| CustomerTimeout |
integer |
否 |
客户超时时间;单位秒数,默认 30 秒,取值范围 5 ~ 60 |
30 |
| CallRouteStrategy |
integer |
否 |
|
1 |
| IvrId |
integer |
否 |
语音导航 Id;参数 ivrId 和 ivrName 二选一,同时传入时 ivrId 生效,在创建自动外呼任务时 ivrId 或 ivrName 必选其一。预测外呼使用场景:如果客户接听后未在特定时间内(默认 2 秒)找到可用座席,通话将溢出到语音导航继续排队找座席。同时支持在呼转座席,座席未接听时也溢出到语音导航,需要开启企业配置生效自动外呼使用场景:客户接听后,转到的语音导航 |
42 |
| IvrName |
string |
否 |
语音导航名称;参数 ivrId 和 ivrName 二选一,同时传入时 ivrId 生效,在创建自动外呼任务时 ivrId 或 ivrName 必选其一。 |
IvrName1 |
| Concurrency |
integer |
否 |
任务维度限制最大并发数,实际并发不会超过最大并发限制。type=1 时,配置成 0 表示不限制,座席数量少于 10 时建议配置该参数 |
0 |
| UserFields |
string |
否 |
任务自定义字段。JsonArray 格式;数组的每个元素只支持传递一组键值对,传递多组只取第一组,如 {"key", "value"}。 默认空值,示例:[{"name":"1234"},{"name1":"12345"}] 注:单个字段值的长度不能超过 1000 个字符 |
[{"name":"1234"},{"name1":"12345"}] |
| CallVariables |
string |
否 |
座席通道变量。JsonArray 格式;最大支持 5 个变量。默认空值, 示例:[{"name":"abcdefg","value":"${cdr_enterprise_id}"}] 注:单个字段值的长度不能超过 1000 个字符。变量会以 SIP_HEADER 的形式设置到座席侧通道 |
[{"name":"abcdefg","value":"${cdr_enterprise_id}"}] |
| TimeStrategy |
string |
否 |
禁呼时间;在特定的时间段内禁止呼叫。参数格式:时间条件编号。支持多个,多个使用英文","逗号隔开,如:9,22。注:时间条件列表可通过查询时间条件设置列表接口获取 |
9,22 |
| AutoDelete |
integer |
否 |
任务数超出最大任务数限制时,是否自动删除已完成的最早创建的任务,值为 1 代表自动删除。注:autoDelete 不是任务属性,只在接口调用时生效
|
0 |
| CallGroupType |
integer |
否 |
指定座席方式;
说明
|
1 |
| Cnos |
string |
否 |
座席工号列表;callGroupType=1 时必填。支持多个座席工号,多个之间使用英文逗号','分隔注:一个座席只能在一个运行中的任务中 |
1111,2222 |
| AgentGroup |
string |
否 |
外呼组号;callGroupType=2 时必填。注:一个外呼组可以绑定到多个任务,但只能同时运行一个任务中 |
33 |
| CallStrategy |
string |
否 |
座席分配规则;默认随机。
|
1 |
| AgentTimeout |
integer |
否 |
座席超时时间;单位秒数,默认 10 秒,取值范围 5 ~ 60 |
52 |
| Wrapup |
integer |
否 |
座席整理时间;默认 30 秒,取值范围 1~10800,整理时间会影响每次呼叫的个数,值越大,呼叫号码个数会减小 |
30 |
| MaxWaitTime |
integer |
否 |
座席最长等待时间;默认 40 秒,最小 10,最大 600,允许座席空闲的最大时间。任务执行过程中,如果座席平均空闲时间大于 maxWaitTime,每次呼叫个数会增加 |
40 |
| MinAvailableAgentCount |
integer |
否 |
最小可用座席数;默认为 10,取值范围 1 ~ 10。任务内可用座席数小于当前值时,任务自动暂停,避免骚扰 |
10 |
| Quotiety |
number |
否 |
骚扰率;默认值为 1,取值范围为大于 0,小于等于 20,支持小数,精确到小数点两位。值越小呼叫的号码越少,值越大呼叫的号码越多,座席利用率越高 |
17.62 |
| PredictAdjust |
integer |
否 |
超呼率;默认值为 100,取值范围 50~400 |
55 |
| CallLimitStrategy |
string |
否 |
座席当日接听的通话个数上限,使用方式详见下方说明;JsonArray 格式 [{"cnos":["2000","2001"],"limit":"5"}注:使用座席当日接听数限制功能需开启企业配置,功能开启并且配置上限后系统才开始统计当日接听数 |
[{"cnos":["2000","2001"],"limit":"5"}] |
| CustomerMoh |
string |
否 |
客户侧等待音;客户接听后呼叫座席,等待座席接听时播放的语音,默认为空白音。支持公共语音和企业语音,值为语音文件的 path。 |
60000011533526918819 |
| CustomerVoice |
string |
否 |
客户侧提示音;客户接听后呼转座席前播放的语音,提示音播放完成后再找座席,默认无提示音。支持公共语音和企业语音,值为语音文件的 path。 |
60000011533526918819 |
| AnswerRate |
integer |
否 |
初始化预计客户接通率;默认 50,取值范围 1~100,预热阶段的呼叫,按照此接通率计算呼叫频率 |
59 |
| WarmUpDuration |
integer |
否 |
任务预热时间;默认 300 秒, 取值范围 60 ~ 600 |
93 |
| IsRewarm |
integer |
否 |
暂停后重新预热;默认开启,任务暂停后是否需要重新预热。
|
0 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| AccessDeniedDetail |
string |
访问被拒绝的详细原因。 |
None |
| RequestId |
string |
请求 ID。 |
90E63D28-E31D-1EB2-8939-A9486641**** |
| Message |
string |
返回结果的提示信息。 |
OK |
| Data |
object |
返回数据。 |
|
| OverTime |
string |
任务结束时间 |
example |
| CustomerTimeout |
string |
客户超时时间 |
example |
| Description |
string |
任务描述 |
example |
| AutoStopDay |
string |
定时完成日期,格式:yyyy-MM-dd,如:2026-04-11 |
example |
| AgentTimeout |
string |
座席超时时间,单位秒 |
example |
| EnterpriseId |
string |
企业编号 |
example |
| Name |
string |
任务名称 |
example |
| Cnos |
string |
座席工号列表 |
example |
| Concurrency |
string |
最大并发限制 |
example |
| CustomerClids |
string |
客户侧外显号码列表 |
example |
| AutoComplete |
integer |
自动完成。
|
1 |
| AutoStart |
string |
定时开始。
|
1 |
| AnswerRate |
string |
初始化预计客户接通率 |
example |
| Status |
string |
任务状态。
|
3 |
| CustomerMoh |
string |
客户侧等待音 |
example |
| AutoStartDay |
string |
定时开始日期,格式:yyyy-MM-dd |
2016-04-11 |
| UserFields |
string |
任务自定义字段,JsonArray 格式 |
[{"key1":"value1"},{"key2":"value2"}] |
| PredictAdjust |
string |
超呼率 |
example |
| CreateTime |
string |
任务创建时间 ,格式为: yyyy-MM-dd HH:mm:ss |
example |
| StartTime |
string |
任务开始时间 |
example |
| AutoStop |
string |
定时完成。
|
1 |
| Wrapup |
string |
座席整理时间,单位秒 |
10 |
| MaxWaitTime |
string |
座席最大等待时间,单位秒 |
10 |
| Type |
string |
任务类型。
|
1 |
| AutoStartTime |
string |
定时开始时间,格式:HH:mm:ss |
08:00:00 |
| IsRandom |
string |
随机呼叫。
|
0 |
| AutoStopTime |
string |
定时完成时间,格式:HH:mm:ss |
17:00:00 |
| Id |
string |
外呼任务 Id |
11 |
| IvrId |
string |
语音导航 Id |
330 |
| Quotiety |
string |
骚扰率,支持小数,精确到小数点两位 |
0.33 |
| Code |
string |
请求状态码。
|
OK |
示例
正常返回示例
JSON格式
{
"AccessDeniedDetail": "None",
"RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
"Message": "OK",
"Data": {
"OverTime": "example",
"CustomerTimeout": "example",
"Description": "example",
"AutoStopDay": "example",
"AgentTimeout": "example",
"EnterpriseId": "example",
"Name": "example",
"Cnos": "example",
"Concurrency": "example",
"CustomerClids": "example",
"AutoComplete": 1,
"AutoStart": "1",
"AnswerRate": "example",
"Status": "3",
"CustomerMoh": "example",
"AutoStartDay": "2016-04-11",
"UserFields": "[{\"key1\":\"value1\"},{\"key2\":\"value2\"}]",
"PredictAdjust": "example",
"CreateTime": "example",
"StartTime": "example",
"AutoStop": "1",
"Wrapup": "10",
"MaxWaitTime": "10",
"Type": "1",
"AutoStartTime": "08:00:00",
"IsRandom": "0",
"AutoStopTime": "17:00:00 ",
"Id": "11",
"IvrId": "330",
"Quotiety": "0.33"
},
"Code": "OK"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。