Editing and Publishing a Bot

After you record a process, the bot's actions will be automatically listed in the bot designer. We recommend that you edit and test the bot before putting it into production. Editing the bot also allows you to handle edge cases and steps that need to be repeated multiple times.

Example: Susan recorded her process of copying events from websites into Outlook appointments, but she wants the bot to handle cases where an event is high priority for her team. She makes a second recording of how to handle a high priority event, and adds an If condition to the editor. She configures the condition so that if an event description includes the word "Mandatory," then a high priority appointment will be created for the event.

Accessing your bot

  1. Use the app picker to navigate to Process Automation.
  2. Click Bots.
  3. On the Manage page, double-click your bot to open it.

Editing your bot

In the bot designer, you can add, delete, and edit the steps you want your bot to take. You can also add actions from the Toolbox and provide input and output parameters.

Recorded actions

  • Read: This action appears if you copied information with your bot.
    • If you copied a table during your recording, the bot will capture all of the table's rows and make them available as multi-value tokens. Use the For Each activity to iterate through these tokens.
  • Click: This action appears if you recorded your bot performing a click.
  • Write: This action appears if you wrote or pasted information during your bot recording. Click the text to edit the value written in this action. Click the sideways arrow to add a token to the value you're writing. Tokens are placeholders for information that will be known when the bot runs.
    • Secure data: If you recorded a password or other secure data, and didn't lock the data during the recording, you can secure it in the designer. Secure data is encrypted so it can't be accessed by users editing the bot.
      • Secure the data by clicking the related write action and then clicking the lock button Lock button in the toolbar. Alternatively, select Secured from the More actions button Click this button to reveal more options in the bot designer. to the right of the activity.
      • Edit secure data by clicking the More actions button Click this button to reveal more options in the bot designer. to the right of the activity and clearing the Secured check mark. Select to Unlock the data. Then enter new information in the activity. Then either secure the new data from the More actions button or leave it unlocked.

Editing recorded actions

  • Continue on error: Generally, if an action cannot be performed because the bot cannot find the related element or because some other error occurs with the action, the bot will terminate. Select this option to skip the action if the element cannot be found or if an error occurs, and continue the bot normally. Click the More actions button Click this button to reveal more options in the bot designer. to the right of the activity, and select Continue on error.
  • Descriptions: You can add a description to an action as a note to yourself or others explaining the step. Click the More actions button on the activity and select Add description. Type a description and click Save. You can also edit and delete existing descriptions by clicking the More actions button Click this button to reveal more options in the bot designer..
  • Disable activity: Disable an activity if you don't want the activity to run. Disabling is helpful when testing your bot since you may want to only test some activities instead of running the entire bot. Enable the activity when you want it to run again. You can access the disable and enable options by clicking the More actions button Click this button to reveal more options in the bot designer. to the right of the activity.
  • Delete: Delete an action by selecting it and clicking the trash can button Delete button in the toolbar.
  • Reorganize: To move the action to a different place in the bot, drag the grips (six dots to the left of the action) or use the up and down arrows in the toolbar.
  • Indent: Indent activities to make them subsets of another activity, e.g., to move an activity under a condition or group.
  • Collapse all/Expand all: Click this link in the toolbar to collapse or expand all groups in the designer.

Toolbox activities

To add an activity

  • Drag the activity from the toolbox to the canvas.

Activities

  • Add recording: Drag this activity to the canvas and click Open the bot recorder to add another recording to your process.
    • If you want the new recording to use data from an existing recording, ensure you add this activity below the existing activities in the bot.
      • If you add this activity below an existing recording, the bot recorder will give you the option to run the bot up to this point before starting your new recording. This is helpful if you're recording your bot in sections and want to return to the point you last stopped recording.
    • If you want to add a recording that you saved as a .lfrec file, click Import bot recording.
  • Create token: Use this activity to combine values into a multi-value token or combine multi-value tokens into a table token. Provide a name for your token by clicking token name, and then click value to define the token's values. Use the drop-down menu to create a single-value, multiple value, or table token. If you select Table token, you can provide names for the table's columns and multi-value tokens for the columns' values. Created tokens can be passed to Workflow via output parameters.
  • Edit token: Use this activity to append or replace values in a multi-value token or to replace values in a single or multi-value token. Click <token> to select the token you want to edit. Then click value to append or replace values. The number in parentheses next to value shows you the number of values the token has.
  • End bot: Particularly useful inside an If condition activity, this activity lets you end the bot either with a terminated or completed status. You can also provide a reason explaining why the bot was terminated at this point. The reason will appear the Action History and, if you set the status to terminated, in the Terminating error column of the Monitor page.
  • Exit loop: Use this activity within an If condition inside a For Each activity. This activity stops the For Each loop and then lets the bot continue.
  • Find application: This activity locates an application that's already open on the machine the bot will run on. After using this activity to find an application, you can then run recorded actions in the application.
    1. Click the text after Find application, and select the application you want the bot to locate from the drop-down menu.
    2. Click the text after With window title to edit the name of the window the application will locate. By default, this is the name of the window you recorded actions in. Click the token button to insert tokens in the window title. This lets you change the page that is found based on information collected earlier in the bot. Use regular expressions to allow the bot to interact windows with a variety of different titles.
    3. If you are finding a web page open in a web browser, after With web page, specify the URL of the page you want to find. Click the token button to insert tokens in the URL. This lets you change the web page based on information collected earlier in the bot. Use regular expressions to have the bot find web pages that have a URL that matches a specific pattern.
  • For Each: This activity allows you to repeat a series of steps for each row in a table or each value in a multi-value token. Click <select table> to select a table token or a multi-value token. You can change the word "row" to something more descriptive, by clicking it and typing a new name.
  • Group: Grouping lets you organize your bot into logical sections, making the bot easier to edit and understand. Adding a group to your bot does not make any changes to the actions the bot takes.
  • Example: If you have a bot that updates customer information, but updating their address involves inputting values into several fields and performing several clicks, you might want to drag the actions related to updating the address into an "Update Address" group. Then, you can collapse and expand that group as needed to keep your bot organized.

  • If condition: Conditions allow you to account for edge cases and variations within your process. A condition performs a series of actions if a token's value is equal to, or not equal to, a specific value. You can nestle conditions if needed. Click the value links to select tokens or type a value.
  • Keyboard shortcut: If you want your bot to enter a keyboard shortcut in an application, specify the application and shortcut here.
  • Launch application: By adding this activity, you can have your bot launch any of the applications it interacts with. Place this activity before the bot needs to interact with the application, and when the bot runs, it will open the application first and then perform the recorded actions.
  • Note: If your bot interacts with a web page opened in Google Chrome, you must use this activity to open a new Chrome browser window. Bots cannot interact with already open Chrome browser windows; only windows the bot has opened itself.

    1. Click the text after Launch application, and select the application you want the bot to launch from the drop-down menu.
    2. Click the text after to find to edit the name of the window or website the application will open. By default, this is the name of the window you recorded actions in. If the window name will change (e.g., based on tokens passed to the application in the Start program section below), use regular expressions to allow the bot to open windows with a variety of different names.
    3. Next to Start program provide the path to the application's executable file.
      • If you are opening a desktop application, next to Arguments, define the parameters you want to pass into the application. You can use windows variables, like %APPDATA%, here.
      • If you are opening a web page, next to Open web page, specify the URL you want to open. Click the token button to insert tokens in the URL. This lets you change the web page that is opened based on information collected earlier in the bot.
      • Example: The web page you want the bot to open follows a predictable pattern, such as page that opens purchase orders with URLs such as, www.myPOs.com/ponum=1234. The number portion of the URL changes based on the P.O. opened on the page. If you collect the P.O. number earlier in the bot, then you can use a token in the URL here, e.g., www.myPOs.com/ponum=%(PONumber) to open the specific purchase order the bot needs to interact with.

      • Use regular expressions to have the bot open web pages whose title matches a specific pattern.
      • Example: A purchase order system is set up so that the web page each PO has a title that follows the pattern: Purchase Order 1234, where "1234" is the purchase order's number. Users need to run a bot on whatever purchase order they have open. To ensure the bot runs regardless of the specific purchase order the user has open, edit the title using regular expressions to indicate that the page should match the pattern: Purchase Order */\d\d\d\d

  • Read CSV: If you have information stored in a CSV file that you want your bot to use throughout its process, select that CSV file here. The values in the file will automatically be made available as tokens to use later in the bot.
    1. Provide a descriptive display name for the file so you, and others who edit the process, can remember which file you're reading from. This name will also be the token name for the file.
    2. Provide a path to the CSV file you want the bot to read from. You can use tokens in this path to account for situations where you might want to access one of many different CSV files that have the same format.
    3. Example: You may have different CSV files for different types of customers (one-time, returning, VIP, etc.), but all the files follow the same format. Depending on data captured earlier in the process, you may want to read values from any one of these files. Using a token in the path allows you to dynamically read from a variety of files.

    4. Click Select Sample File to browse to a CSV file with the same format as the file the bot will read from. This can be the same file as specified next to File Path, or it can be a template file that has the same format as the CSV file at the path specified.
  • Wait: Allows you to wait a specified amount of a time for a user to take an action. The bot will continue to run as soon as the user clicks Mark as complete in the Action History. If the user does not click Mark as complete during that time, you can choose to have the bot either continue or end.

Configuring input and output parameters

You can specify input and output parameters for the bot by clicking the Input/Output parameters button Parameters button from the toolbar.

Workflow can provide input parameter values to bots and accept output parameters from bots.

  • Input Parameters: Enter placeholder values for your input parameters, and then, in Workflow, use the Invoke Bot activity to specify the tokens and values you want Workflow to pass to the bot. Select Multiple values if you want to send a multi-value token from Workflow to the bot.
  • Output Parameters: Enter the tokens or values you want the bot to pass to Workflow. These will appear as output parameters in the Invoke Bot activity. Select Multiple values if the token you are sending to Workflow is a multi-value token.

When testing your bot using the play button in the designer, a dialog box will open and prompt you to enter sample parameter values. Output parameters will appear in the Action History after the bot runs.

Learn more about using bots with Workflow.

Publishing, running, and saving your bot

  • Save: Click Save Save button to save the bot.
  • Validate: Click the check mark button Validate button. in the toolbar to ensure your bot is configured correctly. If your bot has configuration errors, they will appear in-line with the relevant action or activity. You must fix these errors before you can run the bot.
  • Publish: Click the Publish button to make your bot operational. Published bots can be run based on schedule starting events. If you have not saved or validated your bot before publishing, you will be prompted to do so.
  • Run: Click the play button Play button. to test your bot. Then, click Open Laserfiche Bots WebLauncher.
    • If you specified input parameters for the bot, you'll be prompted to enter values for those parameters.
    • If you have a For Each activity in your bot, you'll be prompted to specify if you want the activity to only run once on the first row of data, or if you want it to run for every row of data.

    Note: You cannot run a bot if another bot is running or suspended at a wait activity. You must wait for the bot to continue before starting the next bot.

  • Run as administrator: If you need to run your bot in administrator mode (e.g., if your bot is installing software, updating drivers, or changing system settings), select the Settings button in the toolbar and select Run as administrator.
  • Export: Click the Export button Export button to download your bot as a .lfrbj (bot draft) file. If you want to export your bot along with its accompanying starting events (in a .lfrbi file), export the bot from the Manage page.

Starting events for your bot

Click the starting event tab Click this tab to see starting events on the left to see the starting events associated with your bot.

You can create new starting events here, edit existing starting events, or delete starting events.

Learn more about starting events.