Attach the bot scope
Any commands of chatbot need a bot scope. You can not develop a digital assistant outside of this scope. To create the bot scope, use the Connect to Chatbot command.
To segregate a digital assistant script to separate part of your logic in another script, you need to attach these scripts to the main bot scope using the Attach Chatbot command.
Procedure
Creating a new script
- Open a new file in IBM RPA Studio.
- On the Home tab, click on the New Variable button to define a new variable:
- Insert the variable name.
- Select the variable type as
Chat data
. - Enable the Script Input Parameter input parameter.
- Insert the Attach Chatbot command in the script.
- Insert the variable created in
step 1
in the Chatbot input parameter.
- Insert the variable created in
- Click Save.
- Optional: Click Publish to publish the script.
Sending parameter values
In the script that begins the digital assistant execution context:
- Open a new file in IBM RPA Studio.
- Insert the Connect to Chatbot (
botConnect
) command in the script. - Insert a variable to the Chat output parameter.
- Insert the Execute Script (
executeScript
) command in the script. - Choose between actions:
- Search for the directory that stores the script:
- Enable the Is Local File input parameter.
- Insert the script path in the File input parameter.
- Search for the script published on tenant:
- Select one of the options available in the Name parameter.
- Search for the directory that stores the script:
- Click the plus icon to add new mappings to the Parameters input parameter:
- In the Parameter input parameter field, insert the
Chat data
variable name declared in the associated script. - In the Value field, insert the variable type
Chat data
returned from the Connect to Chatbot (botConnect
) command.
- In the Parameter input parameter field, insert the
The Chat data
and IVR data
variables is an object that contains various information from the digital assistant running. Information that may be essential to define the flow's progress.