Updated on 2023-09-27 GMT+08:00

Adding Outbound Numbers (V2)

Scenario

This interface is invoked to add outbound numbers to an outbound campaign.

Usage Description

  • Prerequisites
    • You have applied for a developer account.
    • The outbound campaign has been created.
  • Restrictions
    • The number of incomplete outbound calls in an outbound campaign cannot exceed 200,000.
    • For the same outbound campaign task, 20 records are added each time by default. You can change the value of isales.api.calldata.max to change the number of records added each time. The interface invoking time cannot be less than 1 second. It is recommended that the value be less than or equal to 2000 and the value of isales.api.uncomplate.count be set to false. Otherwise, the interface invoking may take more than 1 second.
    • The called numbers to be added each time under the same session ID must be unique.
    • The called numbers added each time are not in the blacklist, or they are in the blacklist but the restriction period and maximum number of calls are set for them and not exceeded.
    • Outbound numbers cannot be added to complete tasks.
    • Outbound numbers cannot be added to ongoing tasks.

Method

This interface supports only the POST method.

URI

https://ip:port/rest/isales/v2/openapi/campaigns/{vdnId}/calldata/{campaignId}

In the URL, ip indicates the IP address of the CC-iSales server, and port indicates the HTTPS port number of the CC-iSales server.

Table 1 Parameters in the URL

No.

Parameter

Type

Mandatory or Not

Description

1

vdnId

Integer

Yes

VDN ID.

The value is an integer ranging from 1 to 9999.

2

campaignId

Integer

Yes

ID of an outbound campaign.

Request Description

Table 2 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

The value is fixed to application/json; charset=UTF-8.

2

Authorization

String

Yes

For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

Table 3 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

callDataList

List

Yes

List of data to be added. A maximum of 20 data records are supported.

For details about the parameters of this object, see Table 4.

Table 4 Parameter description of callDataList

No.

Parameter

Type

Mandatory or Not

Description

1.1

sessionId

String

No

ID of a subscriber, which is sent back to the subscriber in the outbound call result.

The value can contain a maximum of 32 characters.

1.2

called

List

Yes

Customer number information.

1.3

caller

String

No

Calling number.

The number can contain a maximum of 24 characters.

1.4

customField

String

No

User-defined field. The value can contain a maximum of 200 characters and cannot contain the following special characters: `~!@#$%^&*()+=|{}'":;<>/?.\[]¥–,

1.5

recycleTime

String

No

Recycling time, in yyyy-mm-dd hh:mm:ss format.

1.6

callData

String

No

Call-associated data. The value can contain a maximum number of 1024 characters. The JSON format is recommended.

CAUTION:
  • If an automatic outbound call involves an intelligent IVR flow, the value of this parameter must be in JSON format.

    The intelligent IVR flow invokes the JSON Data Invoking diagram element to parse and assign values to the call-associated data in JSON format. For details about the implementation and usage of the diagram element, see JSON Data Invoking.

  • The following is a JSON format example. Customize the information in italics and retain other information.

    "callData":"{\\\"fullName\\\":\\\"Lin Zihang\\\",\\\"date\\\":\\\"March 31, 2022\\\",\\\"riskName\\\":\\\"Compulsory traffic insurance\\\"}}

Table 5 Parameter description of called

No.

Parameter

Type

Mandatory or Not

Description

1.2.1

calledNo

String

Yes

Called number of a customer.

The value can contain a maximum of 24 characters, including only digits, asterisks (*), and number signs (#).

1.2.2

delayTime

String

No

Call interval of each customer number, in seconds. The value ranges from 0 to 86400, and the default value is 0.

1.2.3

type

String

No

Customer number type.

  • This parameter is mandatory when Policy Type under OUTBOUND CALL RESULT POLICY is set to Contact Policy during outbound campaign addition.
  • This parameter is mandatory when Call Mode under CALL POLICY is set to By round during outbound campaign addition.

    The value is customized and can contain a maximum of 20 characters, excluding special characters.

Response Description

Table 6 Response body parameters

No.

Parameter

Type

Description

1

resultCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 8.

2

resultDesc

String

Description.

3

returnCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 8.

4

returnDesc

String

Description.

5

returnObject

Object

For details, see Table 7.

Table 7 Parameter description of returnObject

No.

Parameter

Type

Description

5.1

totalSize

Integer

Total number of outbound calls that the system needs to make.

Triggered Event

None

Error Codes

Table 8 Error code description

No.

Error Code

Description

1

0200001

Parameter error. For details about the error, see resultDesc.

2

0200006

Database operation error.

3

0200007

The outbound campaign does not exist.

4

0200018

Duplicate numbers exist.

5

0200019

The number cannot be added in the current state.

6

0200020

The number quantity exceeds the upper limit 200,000.

7

0200022

The interface invoking time is short.

8

0200024

The number to be added is in the blacklist.

9

0200029

The maximum number of numbers that can be added each time is exceeded.

10

0200030

The time format is incorrect.

11

02000001

Empty parameter.

12

02000002

The parameter contains invalid characters.

13

02000003

The parameter length cannot exceed the maximum length.

14

02000004

The parameter length cannot be less than the minimum length.

15

02000005

The parameter length must be within the specified range.

16

02000006

Incorrect parameter type.

17

02000007

Incorrect parameter value.

18

02000008

Parameter conversion error. Check the request parameters.

19

02000009

Incorrect parameter combination. Check the request parameters.

20

02000010

The hour and minute parameters must be set at the same time.

21

02000011

The number of parameters cannot exceed the specified number.

Example

  • The following provides an example of the request body of this interface:
    {
        "callDataList": [
            {
                "sessionId": "00750",
                "called": [
                   {"calledNo":"88880088","delayTime":"0","type":"ST"},
                   {"calledNo":"88880089","delayTime":"1","type":"SA"}
                ]
            },
            {
                "sessionId": "00850",
                "called": [
                   {"calledNo":"88880080","delayTime":"0","type":"ST"}
                ]
            }
    
        ]
    }
  • The following provides an example of the response body of this interface:
    {
        "resultCode": "0200000",
        "resultDesc": "",
        "returnCode": "0200000",
        "returnDesc": "",
        "returnObject": {
            "totalSize": 46
        }
    }