StartPredictiveCall

更新时间:
复制 MD 格式

Invoke StartPredictiveCall to initiate predictive outbound calling.

Operation description

In addition to supporting agents initiating outbound calls from the agent Workbench, Cloud Call Center also enables your Operational System backend to initiate outbound calls and transfer the call to an agent after it is answered. This allows you to seamlessly embed Cloud Call Center features into your Business Process.
For example, your Customer can enter their phone number on your WeChat Official Account and click a button to inquire about a product. Your backend system then invokes this API to call the Customer’s Phone. After the call is connected, the system plays back the message: “We have received your inquiry about our product via the Official Account. We are now connecting you to an advisor. Please wait.” The call is then transferred to an appropriate agent.
Compared with the DialEX API in version 1.0, this API offers greater flexibility in configuration. In addition to customizing the IVR for transfer-in, you can also pass custom parameters, which can be played back by voice within the IVR to support notification scenarios.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

ccc-test

Caller

string

Yes

The caller number, which must be an active outbound number under the instance.

0109810****

Callee

string

Yes

The callee number.

1312353****

TimeoutSeconds

integer

No

The timeout period, in seconds. If the call is not answered within the specified time, it is automatically disconnected.

10

ContactFlowId

string

Yes

The IVR contact flow ID. After the callee answers, the call is automatically transferred into this IVR flow.

9774c36c-12fe-4e37-adce-89bc77ce****

Tags

string

No

The ingest endpoint data, primarily used for extension purposes. Regular users do not need to concern themselves with this.

ContactFlowVariables

string

No

The contact flow variables passed in as a JSON-formatted string of an array. Each array element is a key-value pair, where the key is the variable name and the value is the variable value. To use these variables in the IVR flow, create a Custom Parameter with the same name in the start node of the IVR associated with the specified contact flow ID.

{"name":"王先生","time":"1920分","address":"某某中心"}

MaskedCallee

string

No

The desensitized callee number. If this field is not empty, it indicates that the callee number must be desensitized. The Desensitization Rule is defined by the Customer. Simply enter the desensitized callee number here. Using a desensitized callee number means that in certain scenarios, only the desensitized number is visible, and the real callee number cannot be viewed.

1312353****

SkillGroupId

string

No

The skill group ID. This parameter is optional. If specified, the outbound number is selected only from the numbers associated with the specified skill group.

skillgroup@ccc-test

Response elements

Element

Type

Description

Example

object

Code

string

The response code.

OK

HttpStatusCode

integer

HTTP status code.

200

Message

string

Response message.

RequestId

string

Request ID.

26A34338-5CD9-4C95-A7A6-5BDCE76C6B94

Params

array

List of response parameters.

string

Response parameter.

Data

object

Data.

CallContext

object

Call context environment.

CallType

string

Call type.

Valid values:

  • INBOUND :

    Inbound

  • BARGE :

    Barge

  • CONSULTANT :

    Consultation

  • CONFERENCE :

    Conference

  • MONITOR :

    Monitor

  • INTERNAL :

    Internal call

  • OUTBOUND :

    Outbound

  • INTERCEPT :

    Intercept

  • BACK2BACK :

    Back-to-back

  • PREDICTIVE :

    Predictive outbound

  • COACH :

    [responses_200_schema_properties_Data_properties_CallContext_properties_CallType_description]Call type.

OUTBOUND

InstanceId

string

Instance ID.

ccc-test

JobId

string

Call ID.

job-6570007401392****

ChannelContexts

array<object>

List of call channels.

object

Call channel.

ReleaseInitiator

string

The party that initiated the disconnection of the voice channel, indicating who first hung up the call.

ChannelState

string

The status of the voice channel.

Valid values:

  • CREATED :

    Created

  • ANSWERED :

    Answered

  • RELEASED :

    Released

  • RETIRED :

    Out Of Effect

  • EARLY_MEDIA :

    Early Media

  • NONE :

    Initial Status

  • RINGING :

    Ringing

NONE

Destination

string

Callee of the call channel.

8001****

UserId

string

The agent ID associated with the call channel. This field is empty if the channel belongs to a Customer.

agent@ccc-test

ChannelFlags

string

Flags of the voice channel.

Valid values:

  • COACHING :

    Coaching

  • MONITORING :

    Monitoring

  • MONITORED :

    Monitored

  • COACHED :

    Coached

  • HOLD :

    Hold

  • MUTED :

    Muted

[]

Timestamp

integer

The UNIX timestamp indicating the most recent status change of the channel, in milliseconds.

1609225718295

ReleaseReason

string

The release reason for the voice channel, indicating why the current voice channel was disconnected. The value comes from the response codes defined in the SIP protocol. Customers should refer to the SIP protocol to analyze the disconnection reason.

CallType

string

The call type of the channel.

Valid values:

  • INBOUND :

    Inbound

  • BARGE :

    Barge-in

  • CONSULTANT :

    Consultation

  • CONFERENCE :

    Conference

  • MONITOR :

    Listener

  • INTERNAL :

    Internal Call

  • OUTBOUND :

    Outbound

  • INTERCEPT :

    Intercept

  • BACK2BACK :

    Back-to-Back

  • PREDICTIVE :

    Predictive outbound call

  • COACH :

    Coaching

OUTBOUND

JobId

string

The call ID.

job-6570007401392****

ChannelId

string

The channel ID.

ch:user:131888****->8001****:1609225718294:job-6570007401392****

Originator

string

The originator of the call channel.

1318888****

UserExtension

string

The extension number of the agent associated with the channel.

8001****

UserContext

object

Agent context environment.

Extension

string

Agent extension number.

8001****

Heartbeat

integer

The time when the last heartbeat from the agent was received, in UNIX timestamp format, in milliseconds.

1609136956378

WorkMode

string

Work mode.

Valid values:

  • ON_SITE :

    On-site mode

  • OFF_SITE :

    Off-site mode

  • OFFICE_PHONE :

    Office phone mode

ON_SITE

DeviceId

string

Device ID, which is the identity ID of a browser-based Web Real-Time Communication (WebRTC) softphone or a physical phone device. Only one type of device can be registered at a time.

ACC-YUNBS-1.0.10-****

UserId

string

Agent ID.

agent@ccc-test

Reserved

integer

The timestamp in milliseconds of the most recent time the agent was reserved. Being reserved means an incoming call will soon be assigned to this agent. The format is a UNIX timestamp in milliseconds.

1609136956378

BreakCode

string

Break code, which can be either system-defined or customer-defined. System-defined break codes include: Warm-up (temporary break state after an agent is published and before becoming idle), RingingTimeout (break caused by agent ringing timeout), and RejectCall (break caused by agent call rejection). There are no restrictions on customer-defined break codes; customers can define them as needed for their business.

Valid values:

  • RingingTimeout :

    Break caused by agent ringing timeout

  • RejectCall :

    Break caused by agent call rejection

  • Warm-up :

    Temporary break state after an agent is published and before becoming idle

Warm-up

InstanceId

string

Instance ID.

ccc-test

OutboundScenario

boolean

Indicates whether the agent is in outbound-only mode.

false

DeviceState

string

Device status.

Valid values:

  • UNREGISTERED :

    Unregistered

  • ONLINE :

    Online

  • OFFLINE :

    Offline

ONLINE

Mobile

string

The agent's personal phone number.

1324730****

JobId

string

Call ID.

job-6570007401392****

UserState

string

Agent status.

Valid values:

  • READY :

    Ready

  • WORKING :

    Post-processing

  • DIALING :

    Dialing

  • BREAK :

    Break

  • OFFLINE :

    Offline

  • TALKING :

    Talking

  • RINGING :

    Ringing

READY

SignedSkillGroupIdList

array

List of skill group IDs that the agent has signed into.

string

Skill group ID.

skillgroup1@ccc-test

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "26A34338-5CD9-4C95-A7A6-5BDCE76C6B94",
  "Params": [
    "无"
  ],
  "Data": {
    "CallContext": {
      "CallType": "OUTBOUND",
      "InstanceId": "ccc-test",
      "JobId": "job-6570007401392****",
      "ChannelContexts": [
        {
          "ReleaseInitiator": "无",
          "ChannelState": "NONE",
          "Destination": "8001****",
          "UserId": "agent@ccc-test",
          "ChannelFlags": "[]",
          "Timestamp": 1609225718295,
          "ReleaseReason": "无",
          "CallType": "OUTBOUND",
          "JobId": "job-6570007401392****",
          "ChannelId": "ch:user:131888****->8001****:1609225718294:job-6570007401392****",
          "Originator": "1318888****",
          "UserExtension": "8001****"
        }
      ]
    },
    "UserContext": {
      "Extension": "8001****",
      "Heartbeat": 1609136956378,
      "WorkMode": "ON_SITE",
      "DeviceId": "ACC-YUNBS-1.0.10-****",
      "UserId": "agent@ccc-test",
      "Reserved": 1609136956378,
      "BreakCode": "Warm-up",
      "InstanceId": "ccc-test",
      "OutboundScenario": false,
      "DeviceState": "ONLINE",
      "Mobile": "1324730****",
      "JobId": "job-6570007401392****",
      "UserState": "READY",
      "SignedSkillGroupIdList": [
        "skillgroup1@ccc-test"
      ]
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Parameter.Blank The parameter %s may not be null or blank.
404 NotExists.Number The specified number %s does not exist in instance %s.
404 NotExists.InstanceId The specified instance %s does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.