CreateScript
Create a scenario.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
outboundbot:CreateScript |
create |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID |
c46001bc-3ead-4bfd-9a69-4b5b66a4a3f4 |
| ScriptName |
string |
Yes |
Script name |
课程满意度回访 |
| ScriptDescription |
string |
No |
Script description |
课程回复话术 |
| Industry |
string |
Yes |
Industry |
教育 |
| Scene |
string |
Yes |
Scenario |
回访 |
| ChatbotId |
string |
No |
If the NluServiceType of the instance is Authorized or Provided, specify the ID of the chatbot instance to which the script needs to be attached using this field. |
chatbot-cn-IfaUfqaUnb |
| AsrConfig |
string |
No |
ASR configuration. Parameter definitions:
Note
If you select ali as the engine and Authorized as the nlsServiceType, a custom service is used, and the service provider is ali. If you select ali as the engine and Managed as the nlsServiceType, the default service is used. If you select xunfei as the engine and Authorized as the nlsServiceType, xunfei is the service provider. You must enter the xunfei configuration: {"uuid":"ed2xxxxxxxxx","globalMaxEndSilence":700,"globalMaxEndSilenceEnable":true}
|
{ "appKey": "oQDVNlE6fZ5mg46X", "engine": "ali", "engineXunfei": "", "globalMaxEndSilence": 700, "globalMaxEndSilenceEnable": true, "maxEndSilence": "500", "nlsServiceType": "Managed", "silenceTimeout": "5000", "speechNoiseThreshold": "0" } |
| TtsConfig |
string |
No |
TTS configuration. Parameter definitions:
Note
1. If you select ali as the engine and Authorized as the nlsServiceType, a custom service is used. 2. If the service provider is ali, and you select ali as the engine and Managed as the nlsServiceType, the default service is used. 3. If you select xunfei as the engine (applicable to small model scenarios) and Authorized as the nlsServiceType, xunfei is the service provider. You must enter the engineXunfei configuration: {"pitchRate":50,"speechRate":50,"voice":"aisjiuxu","volume":50}. 4. If you select volc as the engine and Authorized as the nlsServiceType, it applies to doubao. |
{ "appKey": "oQDVNlE6fZ5mg46X", "engine": "ali", "engineXunfei": "", "globalInterruptible": true, "nlsServiceType": "Managed", "pitchRate": "0", "speechRate": "0", "voice": "zhiyuan", "volume": "50" } |
| ScriptContent |
array |
No |
For notification instances, pass in the script list. Deprecated. |
[] |
|
string |
No |
For notification instances, pass in the script list. Deprecated. |
您好,您昨晚在李佳琦直播间下单的娜薇诗椰子水二代精华2支装还未付款,超时未支付会自动关闭订单,活动错过不再有奥。 |
|
| ScriptWaveform |
array |
No |
For notification instances, pass in the script voice list. Deprecated. |
[] |
|
string |
No |
For notification instances, pass in the script voice list. Deprecated. |
[] |
|
| MiniPlaybackEnable |
boolean |
No |
Connective phrase configuration switch (applicable to small models) |
true |
| NewBargeInEnable |
boolean |
No |
Graceful interruption configuration switch (applicable to small models) |
true |
| LongWaitEnable |
boolean |
No |
Intelligent sentence segmentation configuration switch (applicable to small models) |
true |
| EmotionEnable |
boolean |
No |
Emotion detection configuration switch (applicable to small models) |
true |
| AgentKey |
string |
No |
Robot workspace access Key |
9137ab9c27044921860030adf8590ec4_p_outbound_public |
| AgentLlm |
boolean |
No |
Is the robot workspace a Large Language Model (LLM) workspace? |
false |
| AgentId |
integer |
No |
Robot workspace ID |
1198938 |
| NluEngine |
string |
No |
NLU engine (applicable only to Large Language Model (LLM) scenarios). This field is empty for non-LLM scenarios.
Valid values:
|
Prompts |
| NluAccessType |
string |
No |
NLU access method (applicable only to Large Language Model (LLM) scenarios). Enumeration: Managed - Access using an Alibaba public account. This field is empty for non-LLM scenarios. |
Managed |
| ScriptNluProfileJsonString |
string |
No |
Note
If nluEngine is SSE_FUNCTION, you must pass in the corresponding configuration. Function Compute service pattern configuration
|
{"fcRegion":"cn-shanghai","fcFunction":"waihu_test","fcHttpTriggerUrl":"https://waihu-test.xxxxxxxxxxx.cn-shanghai-vpc.fcapp.run"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
HTTP status code |
200 |
| RequestId |
string |
Request ID |
254EB995-DEDF-48A4-9101-9CA5B72FFBCC |
| Success |
boolean |
Indicates whether the operation was successful. |
true |
| Code |
string |
Response code |
OK |
| Message |
string |
API message |
Success |
| Script |
object |
Script information |
|
| Status |
string |
Job status. Valid values:
|
DRAFTED |
| UpdateTime |
integer |
Script update time (unit: milliseconds) |
1578474045152 |
| Industry |
string |
Industry |
教育 |
| ScriptDescription |
string |
Script description |
课程满意度回访 |
| IsDrafted |
boolean |
Is draft |
true |
| DebugStatus |
string |
Script debug status |
DRAFTED |
| ScriptId |
string |
Script ID |
8c58d3e0-bf27-4685-a5a5-65872ec5abc4 |
| IsDebugDrafted |
boolean |
Is debug draft |
true |
| ScriptName |
string |
Script name |
课程满意度回访 |
| Scene |
string |
Scenario |
回访 |
| NluEngine |
string |
NLU engine (applicable only to Large Language Model (LLM) scenarios). Enumeration: Prompts - Large Language Model (LLM) scenario. This field is empty for non-LLM scenarios. |
Prompts |
| NluAccessType |
string |
NLU access method (applicable only to Large Language Model (LLM) scenarios). Enumeration: Managed - Access using an Alibaba public account. This field is empty for non-LLM scenarios. |
Managed |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "254EB995-DEDF-48A4-9101-9CA5B72FFBCC",
"Success": true,
"Code": "OK",
"Message": "Success",
"Script": {
"Status": "DRAFTED",
"UpdateTime": 1578474045152,
"Industry": "教育",
"ScriptDescription": "课程满意度回访",
"IsDrafted": true,
"DebugStatus": "DRAFTED",
"ScriptId": "8c58d3e0-bf27-4685-a5a5-65872ec5abc4",
"IsDebugDrafted": true,
"ScriptName": "课程满意度回访",
"Scene": "回访",
"NluEngine": "Prompts",
"NluAccessType": "Managed"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidScriptName.Duplicated | The specified ScriptName already exists. | |
| 500 | InternalError | An error occurred while processing your request. Please try again later. Submit a ticket if the error still exists. | |
| 404 | NotExist.Instance | The specified Instance does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.