Project: Retrieve Data from a Web Application

This scenario demonstrates how to create an attended automation that retrieves requested information from a web application and displays it to the agent in a callout.

This project demonstrates the following Automation Studio features:

Scenario Overview

In this scenario, the agent is shown a callout as below.

The agent enters any valid United States ZIP code.

When the agent clicks the Go button, a workflow is invoked. The workflow opens a web site that provides time and weather information for any location by ZIP code and retrieves the current time and temperature for that location.

The retrieved information is displayed in the callout.

Download Project Files

  1. Download the project files here.

  2. Unzip and copy the files to the folder %AppData%/Nice_Systems/AutomationStudio/Project.

Recommended Implementation Approach

This scenario is demonstrated in two parts:

  1. Automate the interaction with the web site.

  2. Build an interactive callout.

Automate the Interaction with the Web Site

The first step is to build a workflow that will automate the interaction with a web site that provides time and weather information by ZIP code.

Examples of such sites include https://www.timeanddate.com/, https://www.wunderground.com/, and https://weatherstreet.com/.

The recommended procedure is as follows:

  1. Create a workflow and add a step to open the web site in a browser. The demonstration uses Microsoft Edge.

    Test the workflow.

  2. Capture the following screen elements from the web site's home page:

    • The search field into which you can enter a ZIP code

    • The search button to click after entering a ZIP code

    Test the screen elements.

  3. Add a workflow step to enter a specific ZIP code in the web site's search field.

  4. Add a workflow step to click the search button.

    Test the workflow.

  5. Capture the following screen elements from the web site's results page:

    • The temperature

    • The current time

    Test the screen elements.

  6. Create text variables:

    • current_time

    • temperature

  7. Add a workflow step to populate the variables with the values retrieved from the web site.

    Test the workflow.

  8. Test that the workflow works as expected when a different ZIP code is specified.

  9. Add a workflow step to close the web browser.

    Test the workflow.

The procedure is demonstrated in the following video.

Build an Interactive Callout

Once you have built a workflow that successfully automates the interaction with the web site, the next step is to build the callout that will be displayed to the agent.

The callout must allow the agent to enter a ZIP code and then invoke the workflow to retrieve the time and temperature information from the web site. Finally, the callout must display the time and temperature information retrieved.

The recommended procedure is as follows:

  1. Modify the workflow so that instead of the ZIP code to search for being hard-coded, the ZIP code will be specified by a workflow parameter.

  2. Create a new, blank callout.

  3. Add a table to the callout to act as a grid into which other callout controls can be placed neatly.

  4. Add label controls to display the static text required.

  5. Add an input field control to the callout. This is where the agent will enter the ZIP code.

  6. Add a button control to the callout. The agent will click this button after entering the ZIP code.

  7. Add label controls to display the time and temperature values retrieved.

  8. Modify the title of the callout.

  9. Preview the callout.

  10. Add functionality to the callout button. When the button is pressed, the workflow must be invoked to retrieve time and temperature information for the ZIP code the agent entered into the callout.

    Test the workflow.

  11. Create an event handler to display the callout when the project is loaded.

    Test the event handler.

  12. Modify the workflow to dynamically set the values of the label controls in the callout to the retrieved values for time and temperature.

  13. Test the completed solution.

The procedure is demonstrated in the following video.