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

Importing an Outbound Call Data File from the Server

Scenario

This interface is invoked to import an outbound call data file from the server.

Outbound Call Data Template

Create an Excel template based on Table 1.

Table 1 Outbound call data template

sessionId (Optional)

called (Mandatory)

caller (Optional)

callData (Optional)

customField (Optional)

recycleTime (Optional)

-

[{'calledNo':1234566}]

-

-

-

-

Table 2 Parameters in the outbound call data template

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

String

Yes

The value is a JSON array.

Customer number information.

1.3

caller

String

No

Calling number.

The value can contain a maximum of 24 characters.

1.4

customField

String

No

User-defined field. The value can contain a maximum of 200 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.

A JSON format example is as follows:

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

Table 3 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 a customer number, in seconds. The value ranges from 0 to 7200. The default value is 0.

1.2.3

type

String

No

Type of a customer number.

Usage Description

  • Prerequisites
    • You have applied for a developer account.
    • An outbound campaign has been created.
    • A file server is available and supports SFTP.
  • Restrictions
    • A maximum of 500,000 records can be imported using a file at a time.

Method

This interface supports only the POST method.

URI

https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/calldatafile/uploadFileServer/{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 4 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

String

Yes

Outbound campaign task ID.

Request Description

Table 5 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 6 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

serverId

String

Yes

File server ID.

2

filePath

String

No

File storage path. This parameter is optional. If the outbound call data file is stored in the default path of the file server, you do not need to set this parameter. If the file is stored in a folder in the default path of the file server, set this parameter to the file path relative to the default path of the file server.

An example is /isales/20220310.

3

fileName

String

Yes

File name, for example, demo.xlsx.

4

hour

String

No

Hour, in 24-hour format. This parameter is mandatory when a scheduled task is used for the import. The value ranges from 0 to 23. If minute is set, hour is mandatory.

5

minute

String

No

Minute. This parameter is mandatory when a scheduled task is used for the import. Examples are 00 and 30. If hour is set, minute is mandatory.

Response Description

Table 7 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 5.

2

resultDesc

String

Description.

3

importTaskId

String

File import task ID.

4

returnCode

String

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

For details, see Table 8.

5

returnDesc

String

Description.

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

02000001

Empty parameter.

3

02000002

The parameter contains invalid characters.

4

02000003

The parameter length cannot exceed the maximum length.

5

02000004

The parameter length cannot be less than the minimum length.

6

02000005

The parameter length must be within the specified range.

7

02000006

Incorrect parameter type.

8

02000007

Incorrect parameter value.

9

02000008

Parameter conversion error. Check the request parameters.

10

02000009

Incorrect parameter combination. Check the request parameters.

11

02000010

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

12

02000011

The number of parameters cannot exceed the specified number.

Example

  • The following provides an example of the request body of this interface:
    {
        "serverId":"164690088271159234793429225848",
        "filePath":"/isales/upload",
        "fileName":"demogl50w.xlsx"
    }
  • The following provides an example of the response body of this interface:
    {
    {
     "returnCode": "0200000",
     "importTaskId": "164870990605164487770867067540",
     "resultCode": "0200000",
    	"resultDesc": "Exporting data... View details in Import Result.",
    	"returnDesc": "Exporting data... View details in Import Result.",
    }