Consultation transfer refers to transferring a call to another agent, a skill group queue, or an external number. It is also known as follow transfer or two-step transfer.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID. |
ccc-test |
| UserId |
string |
No |
The agent ID initiating the consultation transfer. |
agent@ccc-test |
| DeviceId |
string |
No |
Device ID. This parameter is meaningless and can be filled with any value. |
ACC-YUNBS-1.0.10-**** |
| Transferor |
string |
No |
The party initiating the transfer. When transferring to an external number, this parameter specifies the caller number. This parameter is invalid when transferring to an internal agent or skill group; in such cases, the initiator is determined by the UserId parameter. |
无 |
| Transferee |
string |
Yes |
The transferee, which can be an agent ID or a skill group ID. |
agent2@ccc-test |
| TimeoutSeconds |
integer |
No |
Timeout duration for the consultation transfer, in seconds. If the transferee does not answer within the specified time, the call is disconnected. This field is optional. Default value is 30 seconds. |
60 |
| JobId |
string |
Yes |
The call ID. |
job-6538214103685**** |
| CallPriority |
integer |
No |
The queuing priority when transferring to a skill group queue. Valid values range from 0 to 9, where 0 is the highest priority and 9 is the lowest. |
5 |
| StrategyName |
string |
No |
The policy name for agent assignment when transferring to a skill group queue. |
MOST_IDLE,MOST_SKILLED,MOST_ACQUAINTED,CUSTOMIZED等 |
| StrategyParams |
string |
No |
The policy parameters for agent assignment when transferring to a skill group queue. |
当分配策略为CUSTOMIZED时,本参数的内容为如下格式: { "functionId": "512fed64-e379-400f-a1a5-14d5730xxxxx", "functionName": "routing-strategy-test-2" } |
| TransfereeType |
string |
No |
The destination type for the transfer. Valid values are AGENT, SKILL_GROUP, and EXTERNAL. If this parameter is not provided, the system determines the destination type based on the format of the target number. If inaccurate detection occurs, explicitly specify this parameter. Valid values:
|
SKILL_GROUP |
| RoutingType |
string |
No |
The call assignment type. Valid values are Automatic or Manual. If this parameter is empty, the default value is Automatic, which is also the current system's default behavior. When Manual is selected, you must invoke APIs such as ClaimCall to assign the call to a specific agent. Valid values:
|
Automatic |
| Tags |
string |
No |
Ingest endpoint data, primarily used for extension requirements. Regular users do not need to concern themselves with this. |
a=b |
| QueuingTimeoutSeconds |
integer |
No |
The queuing timeout period in seconds when the transfer target is a skill group queue. |
10 |
| QueuingOverflowThreshold |
integer |
No |
The queuing overflow threshold when the transfer target is a skill group queue. The default value is 0, which means no overflow occurs. |
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
Response code. |
OK |
| HttpStatusCode |
integer |
HTTP status code. |
200 |
| Message |
string |
Response message. |
无 |
| RequestId |
string |
Request ID. |
EEEE671A-3E24-4A04-81E6-6C4F5B39DF75 |
| Params |
array |
List of response parameters. |
|
|
string |
Response parameter. |
无 |
|
| Data |
object |
Data. |
|
| ContextId |
integer |
System auto increment ID. Customers do not need to concern themselves with this field. |
103655 |
| CallContext |
object |
Call context environment. |
|
| CallType |
string |
Call type. Valid values:
|
OUTBOUND |
| InstanceId |
string |
Instance ID. |
ccc-test |
| JobId |
string |
Call ID. |
job-6538214103685**** |
| ChannelContexts |
array<object> |
List of call channels. |
|
|
object |
Call channel. |
||
| Index |
integer |
Records the order in which this channel was created during the call. |
10 |
| ReleaseInitiator |
string |
The party that initiated the release of the call channel, indicating who hung up first. |
1390501**** |
| ChannelState |
string |
The status of the call channel. Valid values:
|
ANSWERED |
| Destination |
string |
The callee of the call channel. |
1390501**** |
| UserId |
string |
The agent ID associated with the channel. This field is empty for a Customer channel. |
agent@ccc-test |
| ChannelFlags |
string |
Channel flags. Valid values:
|
MONITORING |
| SkillGroupId |
string |
The skill group ID associated with the voice channel. In inbound scenarios, the associated skill group ID is determined by the agent transfer module configured in the IVR. In outbound scenarios, the associated skill group ID is the first skill group the agent signed into. |
skillgroup@ccc-test |
| Timestamp |
integer |
The UNIX timestamp of the most recent status change of the voice channel, in milliseconds. |
1609138903315 |
| ReleaseReason |
string |
The hang-up 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 hang-up reason. |
404 - No destination |
| CallType |
string |
The call type of the call channel. |
OUTBOUND |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| ChannelId |
string |
Channel ID. |
ch:user:139xxxx0501->80326034:1609138902226:job-6538214103685**** |
| UserExtension |
string |
The extension number of the agent associated with the channel. |
8032**** |
| Originator |
string |
The originator of the channel. |
0830019**** |
| UserContext |
object |
Agent context environment. |
|
| Extension |
string |
The agent's extension number. |
8032**** |
| Heartbeat |
integer |
The time when the last heartbeat was received from the agent, in UNIX timestamp format with millisecond precision. |
1609136956378 |
| WorkMode |
string |
Work mode. Valid values:
|
ON_SITE |
| DeviceId |
string |
Device ID, 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 most recent time when the agent was reserved. Being reserved means an incoming call will be assigned to the agent shortly. The value is formatted as a UNIX timestamp in milliseconds. |
1609136956378 |
| BreakCode |
string |
Break status code, which can be either System-defined or Custom-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 Custom-defined status codes; customers can define them as needed for their business. Valid values:
|
Warm-up |
| InstanceId |
string |
Instance ID. |
ccc-test |
| OutboundScenario |
boolean |
Indicates whether the agent is in outbound-only mode. |
false |
| Mobile |
string |
The agent's personal phone number. |
1324730**** |
| JobId |
string |
Call ID. |
job-6538214103685**** |
| UserState |
string |
Agent status. Valid values:
|
TALKING |
| 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": "EEEE671A-3E24-4A04-81E6-6C4F5B39DF75",
"Params": [
"无"
],
"Data": {
"ContextId": 103655,
"CallContext": {
"CallType": "OUTBOUND",
"InstanceId": "ccc-test",
"JobId": "job-6538214103685****",
"ChannelContexts": [
{
"Index": 10,
"ReleaseInitiator": "1390501****",
"ChannelState": "ANSWERED",
"Destination": "1390501****",
"UserId": "agent@ccc-test",
"ChannelFlags": "MONITORING",
"SkillGroupId": "skillgroup@ccc-test",
"Timestamp": 1609138903315,
"ReleaseReason": "404 - No destination",
"CallType": "OUTBOUND",
"JobId": "job-6538214103685****",
"ChannelId": "ch:user:139xxxx0501->80326034:1609138902226:job-6538214103685****",
"UserExtension": "8032****",
"Originator": "0830019****"
}
]
},
"UserContext": {
"Extension": "8032****",
"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,
"Mobile": "1324730****",
"JobId": "job-6538214103685****",
"UserState": "TALKING",
"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. | |
| 400 | InvalidOperation.ChannelState | The operation is not allowed. Channel stats (%s) does not meet expectations (%s). | |
| 400 | InvalidOperation.UserState | The operation is not allowed. User state (%s) does not meet expectations (%s). | |
| 500 | InternalService.CTI | An internal CTI service error occurred. %s | |
| 404 | NotExists.ChannelId | The specified channel %s does not exist in call %s. | |
| 404 | NotExists.InstanceId | The specified instance %s does not exist. | |
| 404 | NotExists.JobId | The call %s does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.