Map host data using bot inputs

In a host application, you can pass supported input variable data to your attended bots in the iFrame widget.

Prerequisites

Ensure that you have completed the following:
  • Provided a system-created AAE_Robotic_Interface User role for the Co-Pilot User.
  • You have access to Automation Co-Pilot.
  • You have already set up your host data in a web application that supports the iFrame technology, such as Salesforce or ServiceNow, see Map data from HTML to form.
  • You have created a bot that contains variables with an input type, and checked in. Therefore this bot is available for you to access in the iFrame widget.
    Note: String, Number, Boolean, and DateTime variable types are supported to pass data to an attended bot. In additional, there are new IDs for event.processId and event.botId, where pID is for process and botID is for bots.

Sample of a bot with input variables:

This form uses the Set action from the Interactive Forms package to set input variable values in each form fields. See Interactive forms package. Sample of a bot with multiple variables.

Procedure

  1. Log in to Salesforce (host application).
  2. Configure your code in the Salesforce console.
    This code can be found in the code controller option.
    Sample of a code snippet of your bot configuration
    Sample of a full code that includes host data:
    Sample full host code
    Note: This code shows an number (ex: 102) that matches with the Bot ID from the Control Room. You can view the Bot ID when you access your public bots in the public repository. The ID will be shown in the URL similar to the following:

    Sample URL of bot ID in Control Room.

  3. View the bot in the embedded widget.
    Salesforce with embedded widget
    In this case, Account_Details_Validation bot is available for you to select.
  4. Deploy your bot.
    The bot will begin the automation process.

    Bot running in progress.

    Simultaneously, the data fields in the form will populate based on the input variables.

    Date from the input variables populates the form.

  5. Close the automation session.
    You have successfully ran a bot with input variables.