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

  1. Open a new file in IBM RPA Studio.
  2. On the Home tab, click on the New Variable button to define a new variable:
    1. Insert the variable name.
    2. Select the variable type as Chat data.
    3. Enable the Script Input Parameter input parameter.
  3. Insert the Attach Chatbot command in the script.
    1. Insert the variable created in step 1 in the Chatbot input parameter.
  4. Click Save.
  5. Optional: Click Publish to publish the script.

Sending parameter values

In the script that begins the digital assistant execution context:

  1. Open a new file in IBM RPA Studio.
  2. Insert the Connect to Chatbot (botConnect) command in the script.
  3. Insert a variable to the Chat output parameter.
  4. Insert the Execute Script (executeScript) command in the script.
  5. Choose between actions:
    1. Search for the directory that stores the script:
      • Enable the Is Local File input parameter.
      • Insert the script path in the File input parameter.
    2. Search for the script published on tenant:
      • Select one of the options available in the Name parameter.
  6. 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.

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.