閱讀及檢閱 Automation Anywhere 文件

Automation 360

關閉內容

內容

開啟內容

Example using Multiple Analyze actions in a task

  • 已更新:2021/10/13
    • Automation 360 v.x
    • 探索
    • RPA 工作區

Example using Multiple Analyze actions in a task

In this example, you build a bot using multiple Open and Close Analyze actions in a task to analyze and compare the sales data for each quarter of XYZ Company and create visualizations in Bot Insight.

先決條件

Before you start building the bot, create the following data set on your desktop in the .csv file format.
PRODUCTCODE PRODUCTLINE COUNTRY QUANTITY ORDERED QTR1 SALES_QTR1 QUANTITY ORDERED QTR2 SALES_QTR2 QUANTITY ORDERED QTR3 SALES_QTR3 QUANTITY ORDERED QTR4 SALES_QTR4
S18_1367 Vintage Cars USA 39 4808.31 21 2856 50 5907.5 48 4389.12
S18_1367 Vintage Cars Germany 33 3288.78 42 2262.96 30 1746.6 25 2183.25
S18_1367 Vintage Cars France 41 2055.74 42 4431.84 34 5375.4 45 2304.45
S18_1367 Vintage Cars Australia 48 2354.88 33 3423.75 24 1496.64 32 1742.4
S18_1367 Vintage Cars UK 30 5151 36 3081.24 33 4950.33 29 5176.5
S18_1367 Vintage Cars India 50 3390 45 1702.8 23 4230.62 44 7554.8
S18_1367 Vintage Cars Japan 28 1801.24 22 995.5 47 6034.33 33 5890.5
S18_1367 Vintage Cars New Zealand 43 4818.15 29 1716.22 42 3958.5 27 1879.74
S18_1367 Vintage Cars Norway 39 4178.85 46 1528.58 34 3455.76 38 2323.7
S18_1367 Vintage Cars Sweden 22 1903.22 - - 24 1685.28 23 1643.12
S18_1367 Vintage Cars Spain 50 2490.5 - - 29 1254.83 38 4299.7
S18_1367 Vintage Cars Canada 49 1689.03 - - 36 1194.84 20 2212
S18_1367 Vintage Cars Austria 26 2253.68 - - 49 2414.72 26 3206.32

程序

  1. Create a new bot.
    1. Log in to the Control Room as a Bot Creator.
    2. On the left pane, click Automation.
      A list of available bots and forms is displayed.
    3. Click Create new > Bot.
    4. Click Create and edit.
  2. Open the XYZ sales data.csv file that you just created.
    1. Double-click or drag the CSV/TXT > Open action.
    2. In the Session name field, enter Session 1.
    3. Provide the file path to XYZ company sales data.csv.
    4. Select the Contains header option to exclude the first row.
  3. Create a Record variable as Row using the icon Create variable.
    The Record variable holds all the values for one row. With each iteration of the Loop, the bot retrieves the values of the next row and stores them in the Record variable, overwriting the values from the previous row.
  4. Use a Loop action to retrieve the cell values in each row from XYZ company sales data.csv.
    1. Select the For each row in CSV/TXT iterator.
    2. In the Session name field, enter Session 1.
    3. In the Assign the current row to this variable field, select the variable Row as created in step 3.
  5. Create the following Variables for Quarter 1, 2, 3 and 4 using the icon Create variable at the top of the Variables menu.
    • PRODUCTCODE
    • PRODUCTLINE
    • COUNTRY
    • QUANTITYORDERED_QTR1
    • SALES_QTR1
    • QUANTITYORDERED_QTR2
    • SALES_QTR2
    • QUANTITYORDERED_QTR3
    • SALES_QTR3
    • QUANTITYORDERED_QTR4
    • SALES_QTR4
  6. Specify the data to populate on the Bot Insight business dashboard.
    1. Double-click or drag the Analyze > Open action.
      註: Ensure to insert the Analyze Open and Close actions inside the Loop action to analyze and capture the data of each row in the Bot Insight dashboard.
    2. Double-click or drag the String > Assign action.
      Press F2 to open the variables menu.
    3. Choose the variable Row from the drop down.
    4. Enter PRODUCTCODE and click Yes, insert.
    5. In the Select destination string variable field, choose the variable PRODUCTCODE.
      Repeat Step 6b through Step 6e to assign string variables for PRODUCTLINE and COUNTRY respectively.
    6. Double-click or drag the Number > Assign action.
      Press F2 to open the variables menu.
    7. Choose the variable row from the drop down.
    8. Enter QUANTITYORDERED_QTR1 and click Yes, insert.
    9. In the Select destination string variable field, choose the variable QUANTITYORDERED_QTR1.
      Repeat Step 6f through Step 6i to assign number variables for SALES_QTR1, QUANTITYORDERED_QTR2, SALES_QTR2, QUANTITYORDERED_QTR3, SALES_QTR3, QUANTITYORDERED_QTR4, and SALES_QTR4 respectively.