Global commands
This topic describes how to configure and use global commands.
Overview
A global command can be executed on your business or third-party systems during a multi-turn conversation. By adding a global command to a response node, you can trigger subsequent actions, such as transferring to an agent immediately after the robot replies.
When the conversation flow reaches a response node with a global command, the command parameters are included in the node's response. You can retrieve these parameters from the commands field in the streaming conversation API response.
Create a global command

Log on to the Intelligent Conversation Robot Console, navigate to your robot space, and then go to Knowledge Base > Global Settings > Global Commands.
Click Create Command. In the dialog box that appears, enter a command name and command key. Click Add Parameter to configure command parameters.
Command name: The name of the command.
Command key: The unique identifier for the command.
Command parameter:
Parameter: The name of the parameter.
Parameter description: A description of the parameter's purpose.
Default value: The default value for this parameter if no other value is specified.

Click OK to create the global command.
To edit or delete a global command, click Edit or Delete in its Actions column.
To import commands, click Import on the right side of the page and upload a ZIP file under 10 MB. To export commands, select the desired commands and click Export.
Use a global command
Global commands allow you to integrate the robot with external systems. For example, a command can trigger a transfer to an agent. After you configure a command on a node, the robot sends this command information in its response, which your external business system can then process.
Log on to the Intelligent Conversation Robot Console, navigate to your robot space, and then go to Knowledge Base > Flow Management.
In the Actions column of the desired conversation flow, click Edit to open the node editor.
Double-click a node to edit it. In the Edit Node pane, click the advanced settings tab. Select an existing command, or click Create Command to create and apply a new one.
Click Save to apply the command to the current node.

Example
Suppose you have three agent skill groups (A, B, and C). You have a task-based multi-turn conversation that helps users check their invoices. When a user requests a transfer to an agent, you want to route them to skill group A.
Configure a global command: Create a "transfer to agent" global command as shown in the following figure.

Use the global command in a multi-turn conversation: Open the relevant conversation flow and add the transfer to agent global command to a standard node. The configuration is shown in the following figure.
NoteIn this example, the command parameter
skillgroupis set toA, which means the request to transfer to an agent is routed to skill group A. In a real-world scenario, you must configure the skill group name based on your actual business requirements.The following global command parameters are returned from the "transfer to agent" node in the TongyiBeebotChat API response:
"messageBody": { "commands": { "toAgent": "{\"skillgroup\":\"A\"}" } }For more information, see streaming conversation API.
After you obtain the parameters, you can integrate your system to route the transfer request to agent skill group A.
NoteThis step requires integration development and should be performed by a developer.