Interface Invoked After Dialog Interaction (inaction=9)
inparams
Parameter |
Type |
Position |
Mandatory |
Description |
---|---|---|---|---|
call_id |
String |
Body |
Yes |
Unique call ID, which is the same as the value of userid and is used by the flow. The value can contain a maximum of 64 characters. |
call_dst_id |
String |
Body |
Yes |
Access ID. 1. In the voice navigation scenario, this parameter is set to the called number. 2. In the voice outbound call survey scenario, this parameter is set to the survey type ID. 3. In other interaction scenarios, this parameter is set to the access ID. The value can contain a maximum of 20 characters. |
flow_result_type |
String |
Body |
Yes |
Result type.
|
input |
String |
Body |
Yes |
Dialog interaction result.
If the result is hangup, the hangup response of the ODFS can be triggered. The value can contain a maximum of 1024 characters. |
auth_token |
String |
Body |
Yes |
Authorization information, which is the token value returned by the access control system. For details, see C3 OIAP Interface Authentication. |
recordFileName |
String |
Body |
No (special field in the voice navigation scenario that supports full-flow recording) |
Full-flow recording path and file name, for example, Y:/record/1/20200421/xxxxxx.wav. |
inter_idx |
String |
Body |
No (special field in the voice navigation scenario) |
Number of interaction times. The value is the same as that of inter_idx returned by the ODFS in the previous time. |
begin_play |
String |
Body |
No (special field in the voice navigation scenario) |
Voice playing start time. |
end_play |
String |
Body |
No (special field in the voice navigation scenario) |
Voice playing end time. |
result_time |
String |
Body |
No (special field in the voice navigation scenario) |
Time when the result is generated. |
inter_no |
String |
Body |
No (special field in the voice navigation scenario) |
Recognition ID. |
IACmd |
String |
Body |
No (special field in the voice navigation scenario) |
Field dedicated for intelligent match and intelligent case filling. This parameter must be set to match when intelligent match is used. This parameter can be set to any of the following values when intelligent case filling is used: match: A case filling request is submitted. rematch: An event is re-identified when the classification of the identified event is incorrect. confirm: When an agent selects a field, the system notifies the ODFS that the field has been confirmed. |
TextSource |
String |
Body |
No (special field in the voice navigation scenario) |
Whether the input text is from an agent or a user when IACmd is set to match (same for intelligent matching and intelligent case filling). The options are staff and customer. staff: agent customer: user The name of the field selected by the agent is transferred when IACmd is set to confirm, for example, object level 2. This parameter is optional when IACmd is set to rematch. |
feedback |
Integer |
Body |
No |
Satisfaction. The options are 1 (satisfactory) and 0 (unsatisfactory). |
feedbackContent |
String |
Body |
No |
Dissatisfaction reason. If the feedback is satisfactory, leave this parameter empty. |
mediaType |
String |
Body |
No |
Media type (text, audio, video, and so on). Example: audio or video |
channelType |
String |
Body |
No |
Channel type.
|
refeedbackContentcordFileName |
String |
Body |
No |
Name of a voice recording file. |
call_media_type |
String |
Body |
No |
Type of an inbound IVR call. The options are 1 (audio) and 3 (video). |
ExtParams
Parameter |
Type |
Position |
Mandatory |
Description |
---|---|---|---|---|
transin_data |
String |
Body |
No |
Call-associated data parameters agreed by the access party and the OIAP, for example, data packet parameters transferred by the IVR. |
release_reason |
String |
Body |
No (special field in the voice navigation scenario) |
Reason code reported by the IVR to the ODFS for call release. 0: The call is released in a business flow. 1: The system releases the call abnormally. 2: The user releases the call. |
queueIndex |
String |
Body |
No (only in the queuing information query scenario) |
Queuing position of a skill queue. |
agentCount |
String |
Body |
No (only in the queuing information query scenario) |
Number of online agents in a skill queue. |
estimateTime |
String |
Body |
No (only in the queuing information query scenario) |
Estimated wait time of a skill queue. |
idleAgentCount |
String |
Body |
No (only in the queuing information query scenario) |
Number of idle agents in a skill queue. |
Request Example
{ "userid": "1528780879-9581", "inaction": 9, "inparams": { "call_id": "1528780879-9581", "call_dst_id": "10086", "flow_result_type":"1", "input":"Help me query the call fee.", "inter_idx": "1", "begin_play": "2018090407:16:24", "end_play": "2018090407:16:30", "result_time":"2018090407:16:3", "inter_no":"0" }, "extparams": { "transin_data":"95,22714,0,,1,1,,test_gdj_01005", "queueIndex":"2", "agentCount":"5", "estimateTime":"10", "idleAgentCount":"1" } }
If the ODFS determines that flow_result_type is set to 1 and input is set to the recognition result ID, the ODFS invokes the Redis to obtain the converted text in which key is set to the Redis value key in the recognition result ID. The obtained recognition text is a non-JSON character string.
The following is an example of the code for the Lua script to obtain the Redis result. In the example, the key value is msg.
After receiving a request whose inaction is 8, 9, or 11, the ODFS may send different responses based on the TUC configuration, that is, the value of outaction may be 9, 10, 11, or 12.
Parameter |
Type |
Position |
Mandatory |
Description |
---|---|---|---|---|
call_id |
String |
Body |
Yes |
Unique call ID, which is the same as the value of userid and is used by the flow. |
prompt_type |
String |
Body |
Yes |
Interaction type.
|
prompt_wav |
String |
Body |
No (special field in the voice navigation scenario) |
When prompt_type is set to 0, 4, or 5, enter the full path name for storing the file to be played or recorded. (The path must be readable by the UAP.) When prompt_type is set to 1, enter the name of the voice file (excluding the path header, which is assembled by the IVR during voice playing). |
prompt_text |
String |
Body |
Yes |
TTS dynamic text content or text dialog content. This parameter is mandatory when prompt_type is set to 2, 3, 6, or 7. |
language |
String |
Body |
Yes |
Language ID. (This parameter is mandatory for TTS voice playing and ASR.) 0: Chinese 1: English |
inter_idx |
String |
Body |
No (special field in the voice navigation scenario) |
Number of consecutive interactions with a user in the ODFS. |
model_type |
String |
Body |
No (special field in the voice navigation scenario) |
Template type. The value is a number of seven digits. The first three digits indicate whether voice playback, recognition, and key pressing are supported, respectively.
|
timeout |
String |
Body |
No (special field in the voice navigation scenario) |
Voice playing timeout interval, in seconds. The parameter specifies the timeout interval for the system to wait for customer input after the voice playing ends. |
tone |
String |
Body |
No (special field in the voice navigation scenario) |
This parameter is mandatory for recording when prompt_type is set to 4. true: A beep tone is played before recording starts. false: A beep tone is not played before recording starts. |
vendor |
String |
Body |
No (special field in the voice navigation scenario) |
ASR extended parameter. |
grammar |
String |
Body |
No (special field in the voice navigation scenario) |
ASR syntax file name (including the path and suffix). |
question_id |
String |
Body |
No (special field in the voice outbound call survey scenario) |
Question sequence number in the outbound call scenario, for example, Q1 and Q2. (This parameter is discarded.) |
question_name |
String |
Body |
No (special field in the voice outbound call survey scenario) |
Question name in the outbound call scenario. (This parameter is discarded.) |
answer_id |
String |
Body |
No (special field in the voice outbound call survey scenario) |
Answer to the question in the outbound call scenario.
If the answer is not Y or N, the actual configuration result is used. (This parameter is discarded.) |
flowRecordFlag |
String |
Body |
No |
Whether to record voices.
|
flowRecordPath |
String |
Body |
No |
Path of the recording file returned when recording is required. |
ttsGroupId |
String |
Body |
No |
Group ID of the TTS server configured on the UAP. |
ttsSoundEffect |
String |
Body |
No |
Sound effect of TTS voice playing. 0: male voice 1: female voice |
ttsSoundSpeed |
String |
Body |
No |
Speed of TTS voice playing. 0: low speed 1: medium speed 8: high speed |
ttsMRCPVendor |
String |
Body |
No |
TTS extended parameter, that is, the mrcp vendor parameter. The value contains a maximum of 40 characters. |
asrMRCPId |
String |
Body |
No |
MRCP ID of the ASR server configured on the UAP. |
asrSlotName |
String |
Body |
No |
Keyword used for parsing the ASR slots. |
asrRecognizeType |
String |
Body |
No |
ASR recognition type. 0: common recognition 1: intelligent recognition |
asrNoInputTimeout |
String |
Body |
No |
Timeout period when a user remains silent, in seconds. The default value is 100. |
asrRecognitionTimeout |
String |
Body |
No |
Interval when the recognition times out, in seconds. The default value is 200. |
asrSpeechCompleteTimeout |
String |
Body |
No |
Timeout period when a user pauses, in seconds. The default value is 500. |
responseSource |
Integer |
Body |
No |
Whether the reply comes from a chatbot or a silent agent. The options are 0 (chatbot) and 1 (silent agent). |
specialRecognize |
Integer |
Body |
No |
Whether to use recognition by packet capture and recording. The options are 0 (original recognition) and 1 (recognition by packet capture and recording). |
Parameter |
Type |
Position |
Mandatory |
Description |
Source |
---|---|---|---|---|---|
sentiment_analysis |
String |
Body |
No |
Emotion detection type. The options are as follows: negative positive neutrality |
TUC real-time inspection |
sentiment_analysis_score |
Integer |
Body |
No |
Emotion detection score. 0–100 |
TUC real-time inspection |
role |
String |
Body |
No |
User type. staff: agent customer: user Other values: empty character string |
TUC real-time inspection |
sensitive_word |
JSON object |
Body |
No |
Sensitive word notification. {"Prohibited word":["Password"]} |
TUC sensitive word configuration |
Intend |
String |
Body |
Yes |
Customer intention. It is a description text. |
TUC intention |
recomand_KP |
List |
Body |
No |
Recommended knowledge points. |
Business knowledge base |
call_script |
JSON string |
Body |
Yes |
Recommended script. Note: The intentcode parameter indicates the TUC intention code and can be empty. The intentDsp parameter indicates the intention description and cannot be empty. { {intentcode: "", intentDsp: "", "status":"", childintent[{intentcode: "", intentDsp: "", "status":""},{intentcode: "", intentDsp: "", "status":""}...]} { intentcode:"", intentDsp:"", "status":""} } |
ODFS resource template configuration |
call_script_matchedstep |
String |
Body |
No |
Intention code. It corresponds to the intention code in call_script. It indicates the script progress (matched step). |
TUC intention |
Parameter |
Type |
Position |
Mandatory |
Description |
Usage Method |
---|---|---|---|---|---|
beginIndex |
String |
Body |
Yes |
Start index of an entity in a text file. |
Start index of an entity in a text file. |
endIndex |
String |
Body |
Yes |
End index of an entity in a text file. |
End index of an entity in a text file. |
type |
String |
Body |
Yes |
Extracted entity type. |
Recognition type of the entity. You do not need to enter the value in the form. |
entity |
String |
Body |
Yes |
Entity content, which has been standardized. |
Used to fill in the corresponding fields in the form. |
tag |
String |
Body |
Yes |
Name of the field to be filled in the form. |
Example: object level 2 |
Response Example 1
{ "userid": "1528780879-9581", "outaction": 9, "outparams": { "call_id": "1528780879-9581", "prompt_type": "1", "prompt_wav": "welcome", "prompt_text": "Query the call fee.", "language": "0", "inter_idx": "1", "model_type":"1011201" "timeout": "10", "tone": "", "grammar": "", "question_id": "Q1", "question_name": "Question 1", "answer_id": "Y" } }
Parameter |
Type |
Position |
Mandatory |
Description |
---|---|---|---|---|
call_id |
String |
Body |
Yes |
Unique call ID, which is the same as the value of userid and is used by the flow. |
prompt_type |
String |
Body |
Yes |
Query type.
|
moduleName |
String |
Body |
No |
Module name, that is, name of a diagram element. |
inter_idx |
String |
Body |
No (special field in the voice navigation scenario) |
Number of consecutive interactions with a user in the ODFS. |
changeType |
String |
Body |
Yes |
Switching type.
|
Response Example
{ "outaction": 12, "outparams": { "call_id": "1528780879-9581", "prompt_type": "1", "inter_idx": "1", "moduleName":"Query", "xxx":"xxx" //Extend } }
Parameter |
Type |
Position |
Mandatory |
Description |
---|---|---|---|---|
call_id |
String |
Body |
Yes |
Unique call ID, which is the same as the value of userid and is used by the flow. |
call_sor_id |
String |
Body |
Yes |
User ID. (In the voice navigation and voice outbound call scenarios, the value is a user number. In other interaction scenarios, the value is a user ID.) |
trans_type |
String |
Body |
Yes |
Dialog transfer type.
|
route_value |
String |
Body |
Yes |
Route value information, which depends on the value of trans_type. When the value of trans_type is 1, route_value is set to the subsequent access code of the skill queue. When the value of trans_type is 2, route_value is set to the access code of the IVR flow. When the value of trans_type is 3, route_value is set to the name of the skill queue. When the value of trans_type is 4, route_value is set to an agent ID. When the value of trans_type is 5, route_value is set to a third-party number. When the value of trans_type is 6, route_value is set to a flow route number. When the value of trans_type is 7, route_value is left empty. When the value of trans_type is 8, route_value is set to an agent ID. When the value of trans_type is 31, route_value is left empty. When the value of trans_type is 32, route_value is set to a skill queue name or access code. When the value of trans_type is 33, route_value is set to an agent ID. |
trans_data |
String |
Body |
No |
Call-associated data (transferred when the call is transferred to the manual service). |
calling_num |
String |
Body |
No |
Number preferentially used as the calling number when a call is forwarded to a third-party. |
record_path |
String |
Body |
No |
Full recording path name. (This parameter is valid and conference recording starts only when route_value is set to a third-party number. If this parameter is left empty or does not exist, recording is not performed.) |
inter_idx |
String |
Body |
No (special field in the voice navigation scenario) |
Number of consecutive interactions with a user in the ODFS. |
trans_idx |
String |
Body |
No (special field in the voice navigation scenario) |
Jump sequence number. |
question_id |
String |
Body |
No (special field in the voice outbound call survey scenario) |
Question ID in the outbound call scenario. (This parameter is discarded.) |
question_name |
String |
Body |
No (special field in the voice outbound call survey scenario) |
Question name in the outbound call scenario. (This parameter is discarded.) |
answer_id |
String |
Body |
No (special field in the voice outbound call survey scenario) |
Answer to the question in the outbound call scenario. (This parameter is discarded.) |
Response Example 2
{ "userid": "1528780879-9581", "outaction": 11, "outparams": { "call_id": "1528780879-9581", "call_sor_id": "13500000001", "calling_num":"1234567890", "trans_type": "1", "route_value": "123456789", "inter_idx": "1", "trans_idx": "1", "question_id": "Q1", "question_name": "Question 1", "answer_id": "Y" } }
Parameter |
Type |
Position |
Mandatory |
Description |
---|---|---|---|---|
call_id |
String |
Body |
Yes |
Unique call ID, which is the same as the value of userid and is used by the flow. |
call_sor_id |
String |
Body |
Yes |
User ID. (In the voice navigation and voice outbound call scenarios, the value is a user number. In other interaction scenarios, the value is a user ID.) |
call_dst_id |
String |
Body |
Yes |
Access ID. 1. In the voice navigation scenario, this parameter is set to the called number. 2. In the voice outbound call survey scenario, this parameter is set to the survey type ID. 3. In other interaction scenarios, this parameter is set to the access ID. |
start_time |
String |
Body |
Yes |
Dialog interaction start time. |
end_time |
String |
Body |
Yes |
Dialog interaction end time. |
release_reason |
String |
Body |
No |
Whether the ODFS flow enters the End diagram element properly. 0: The flow enters the End diagram element properly. 1: The flow enters the End diagram element when an exception or timeout occurs and no error tolerance business logic is processed. |
region_id |
String |
Body |
No (special field in the voice navigation scenario) |
Region of a user. |
entrance_id |
String |
Body |
No (special field in the voice navigation scenario) |
Entrance ID. |
exit_id |
String |
Body |
No (special field in the voice navigation scenario) |
Exit ID. The value is the same as that of entrance_id. |
user_type_id |
String |
Body |
No (special field in the voice navigation scenario) |
User type. |
suilu_region_id |
String |
Body |
No (special field in the voice navigation scenario) |
Call access region ID. |
After a session ends, if the IVR initiates a request whose inaction is 9 or 11 and input is hangup, the ODFS triggers the hangup response and sends the response to the IVR as the end flag. The IVR does not invoke the ODFS interface.
Response Example 3
{ "userid": "1528780879-9581", "outaction": 10, "outparams": { "call_id": "1528780879-9581", "call_sor_id": "13500000001", "call_dst_id": "10086", "start_time": "2018090407:16:24", "end_time": "2018090407:30:24", "release_reason": "0", "region_id": "025", "entrance_id": "03", "exit_id": "05", "user_type_id": "01", "suilu_region_id":"025" } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot