Configure Lightning Flow trigger for Automation Anywhere for Salesforce

Lightning Flow is the newest mechanism to create a flow with an event-triggered bot. This method offers users an opportunity to automate processes while setting a required criteria for the bot to be triggered.

Prerequisites

Ensure that you have the following:
  • You should have the AAI RPA Bots Lightning Component User permission set applied.
  • The object and criteria defined by the administrator and a result you aim to achieve by using a flow.
  • Familiarity with mapping an object ID field to the record ID field required by the Run Bot class.
  • Bot Configurations record ID if you are planning on Running Bot by Bot Configuration.

Procedure

  1. From Salesforce navigate to Setup > Process Automation > Flows.
  2. Click New Flow.
  3. Choose a Trigger and Event.
    TriggerEvent
    Record-triggered Flow Define the Object and Condition Requirements.
    Platform Event-triggered Flow Choose a Platform Event.
  4. Click Next.
  5. Choose one of the following options to control how elements connect in your Flow.
    OptionAction
    Freeform Drag the Action element into the Flow.
    Auto-Layout Click the plus icon.
    Important: The following initial steps are required within every Action:
    • Enter a Label for the action.
    • Enter the API Name.
    • Optionally, enter a Description.
  6. Enter an Apex Action in the Action field.
    Four APEX actions are available to run Automation Anywhere for Salesforce from a Flow. Each action accesses the bot and its data differently. Select one that best meets your requirements based on following descriptions:
    • Run Bot By Bot Configuration:

      Use saved Bot Configurations from the Automation Anywhere for Salesforce connector.

      • Enter the record id of the configuration as the Bot Configuration ID.
        Tip: This id is found on the bot configuration page and at the end of the URL of the record. For example: https://na1.lightning.force.com/lightning/r/Case/5003000000D8cuIQAA.Image of interface
      • Choose the field type of the Record ID, by scrolling the drop-down menu and selecting the field type of the record that the bot will run on.
        Tip: The field type of the prior example looks like the following:
        $Recordid:Case
    • Run Bot with API Key

      Connect to your Control Room by entering your credentials to run a saved bot.

      • Enter the Bot Name.
      • Enter the CR API Key.
      • Enter the CR URL.
      • Enter the CR Username.
      • Assign the Run As User Id for the Bot Runner user that will execute the bot.

        Click the slider for Run As User Id and enter the ID in the field that appears.

      • Optionally, click any other sliders to select more parameters to use in the bot output such as Device Pool Id, RecordId, Variable Names, and Variable Values.
        • Variable Names must match the exact name of the input variable defined within the bot.

          If you are specifying multiple variable names, use a pipe to separate each (for example, inputOne|inputTwo|inputThree).

        • Variable Values are passed to the bot in the same order as variable names are provided (for example, as in the previous step inputValue1|inputValue2|inputValue3).
    • Run Bot with Connection

      Use a live connection to your Control Room to run a saved bot.

      • Enter the Bot Name.
      • Enter the Connection Id.
      • Assign the Run As User Id for the Bot Runner user that will execute the bot.

        Click the slider for Run As User Id and enter the ID in the field that appears.

      • Optionally, click any other sliders to select more parameters to use in bot outputs such as: Device Pool Id, RecordId, Variable Names, and Variable Values.
        • Variable Names must match the exact name of the input variable defined within the bot.

          If you are specifying multiple variable names, use a pipe to separate each (for example, inputOne|inputTwo|inputThree).

        • Variable Values are passed to the bot in the same order as variable names are provided (for example, as in the previous step inputValue1|inputValue2|inputValue3).
    • Run Bot with Password

      Connect to your Control Room by entering your credentials to run a saved bot.

      • Enter the Bot Name.
      • Enter the CR Password.
      • Enter the CR URL.
      • Enter your CR Username.
      • Assign the Run As User Id for the Bot Runner user that will execute the bot.

        Click the slider for Run As User Id and enter the ID in the field that appears.

      • Optionally, click any other sliders to select more parameters to use in the bot output such as Device Pool Id, RecordId, Variable Names, and Variable Values.
        • Variable Names must match the exact name of the input variable defined within the bot.

          If you are specifying multiple variable names, use a pipe to separate each (for example, inputOne|inputTwo|inputThree).

        • Variable Values are passed to the bot in the same order as variable names are provided (for example, as in the previous step inputValue1|inputValue2|inputValue3).
  7. Click Save.
  8. Enter a Flow Label.
  9. Enter a Flow API Name.
  10. Optional: Enter a Description.
  11. Click Save.