LaunchSurvey
Invoke LaunchSurvey to send a satisfaction survey. This operation causes the agent to hang up. If it is a voice-based satisfaction survey, the customer enters the IVR satisfaction survey flow after the agent hangs up and completes the satisfaction collection within the IVR flow. If it is an SMS-based satisfaction survey, the call ends and the customer receives a satisfaction survey text message.
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 that initiates the satisfaction survey. |
agent@ccc-test |
| DeviceId |
string |
No |
Device ID. This parameter has no effect and can be filled with any value. |
device |
| JobId |
string |
Yes |
The call ID. |
job-6580466654649**** |
| ContactFlowId |
string |
No |
The contact flow ID of the IVR satisfaction survey flow. Ensure that the specified contact flow ID corresponds to an active satisfaction survey flow. |
4685b65a-eb8f-11ec-8ea0-0242ac120002 |
| ContactFlowVariables |
string |
No |
Variables passed to the contact flow. The variables configured here can be retrieved and used in the IVR flow. The format is a JSON string containing a collection of key-value pairs. This parameter is optional and defaults to empty. |
{ "customerID": "208880281831****", "operateType": "cipherCode", "taskId": "1234567890", "crmOther": "123" } |
| SurveyChannel |
string |
No |
The channel for collecting satisfaction feedback. This parameter is optional and defaults to Voice Satisfaction. Valid values:
|
IVR |
| SmsMetadataId |
string |
No |
The configuration ID for text message satisfaction. This parameter is required only when the collection channel is SMS. It is optional and defaults to empty. |
4685b65a-eb8f-11ec-8ea0-0242ac120002 |
| SurveyTemplateId |
string |
No |
The ID of the satisfaction survey template. |
19dc793c-9a01-4cb0-b7d5-fcb5431bab6b |
| SurveyTemplateVariables |
string |
No |
Satisfaction survey configuration. |
[] |
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. |
AF1E5957-5276-48FF-A6E6-347166A4ADCD |
| Params |
array |
List of response parameters. |
|
|
string |
Response parameter. |
无 |
|
| Data |
object |
Data. |
|
| CallContext |
object |
Call context environment. |
|
| CallType |
string |
Call type. Valid values:
|
OUTBOUND |
| InstanceId |
string |
Instance ID. |
ccc-test |
| JobId |
string |
Call ID. |
job-6580466654649**** |
| ChannelContexts |
array<object> |
List of channels. |
|
|
object |
Channel. |
||
| Index |
integer |
System auto increment ID, which the customer does not need to concern themselves with. |
1 |
| ReleaseInitiator |
string |
The party that initiated the release of the voice channel, indicating who hung up first. |
无 |
| ChannelState |
string |
The status of the voice channel. Valid values:
|
ANSWERED |
| Destination |
string |
The callee of the voice channel. |
1318888**** |
| UserId |
string |
The agent ID associated with the channel. This field is empty if the channel belongs to a Customer. |
agent@ccc-test |
| ChannelFlags |
string |
Channel flags. Valid values:
|
MONITORING |
| SkillGroupId |
string |
The skill group ID associated with the 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 that the agent signed into. |
skillgroup@ccc-test |
| Timestamp |
integer |
The UNIX timestamp of the most recent status change of the channel, in milliseconds. |
1609250655922 |
| ReleaseReason |
string |
The reason for releasing the channel, indicating why the current channel was disconnected. The value corresponds to 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:
|
OUTBOUND |
| JobId |
string |
The call ID. |
job-6580466654649**** |
| ChannelId |
string |
The channel ID. |
ch:user:1390501****->8032****:1609138902226:job-653821410368**** |
| UserExtension |
string |
The extension number of the agent associated with the channel. |
8001**** |
| Originator |
string |
The originator of the channel. |
1318888**** |
| UserContext |
object |
Agent context environment. |
|
| Extension |
string |
Agent extension number. |
8001**** |
| Heartbeat |
integer |
The time when the last heartbeat was received from the agent, formatted as a UNIX timestamp in milliseconds. |
1609250656122 |
| WorkMode |
string |
Work mode. Valid values:
|
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 most recent time the agent was reserved. Being reserved means an incoming call will be assigned to the agent shortly. The format is a UNIX timestamp in milliseconds. |
1609250655090 |
| BreakCode |
string |
Break status code, which can be either system-defined or customer-defined. System-defined break codes include: Warm-up (temporary break state after agent is published and before becoming idle), RingingTimeout (break caused by agent ringing timeout), and RejectCall (break caused by agent call rejection). Customer-defined status codes have no restrictions, and customers can define them according to their business needs. Valid values:
|
Warm-up |
| InstanceId |
string |
Instance ID. |
ccc-test |
| OutboundScenario |
boolean |
Indicates whether the agent is in outbound-only mode. |
false |
| Mobile |
string |
Agent's personal phone number. |
1390000**** |
| JobId |
string |
Call ID. |
job-6580466654649**** |
| 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 |
|
| ContextId |
integer |
System auto increment ID. Customers do not need to concern themselves with this. |
102323 |
Examples
Success response
JSON format
{
"Code": "OK",
"HttpStatusCode": 200,
"Message": "无",
"RequestId": "AF1E5957-5276-48FF-A6E6-347166A4ADCD",
"Params": [
"无"
],
"Data": {
"CallContext": {
"CallType": "OUTBOUND",
"InstanceId": "ccc-test",
"JobId": "job-6580466654649****",
"ChannelContexts": [
{
"Index": 1,
"ReleaseInitiator": "无",
"ChannelState": "ANSWERED",
"Destination": "1318888****",
"UserId": "agent@ccc-test",
"ChannelFlags": "MONITORING",
"SkillGroupId": "skillgroup@ccc-test",
"Timestamp": 1609250655922,
"ReleaseReason": "无",
"CallType": "OUTBOUND",
"JobId": "job-6580466654649****",
"ChannelId": "ch:user:1390501****->8032****:1609138902226:job-653821410368****",
"UserExtension": "8001****",
"Originator": "1318888****"
}
]
},
"UserContext": {
"Extension": "8001****",
"Heartbeat": 1609250656122,
"WorkMode": "ON_SITE",
"DeviceId": "ACC-YUNBS-1.0.10-****",
"UserId": "agent@ccc-test",
"Reserved": 1609250655090,
"BreakCode": "Warm-up",
"InstanceId": "ccc-test",
"OutboundScenario": false,
"Mobile": "1390000****",
"JobId": "job-6580466654649****",
"UserState": "TALKING",
"SignedSkillGroupIdList": [
"skillgroup1@ccc-test"
]
},
"ContextId": 102323
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Parameter.Blank | The parameter %s may not be null or blank. | |
| 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.