Using Sample Data to Create and Schedule an Alert

A data-driven Alert is an event that is prompted by a guideline that you define. This guideline can vary from the simple to the complex. The following tutorial describes how to create a simple Alert that is triggered when the cost of goods exceeds the revenue for a brand. This type of Alert could help a company decide whether they should continue to carry a specific brand, based on the money loss throughout a given timeframe.

To follow this tutorial, you must have access to the WebFOCUS Retail sample data source.

Example: Creating and Scheduling an Alert

  1. Sign in to WebFOCUS as an administrator or developer.
  2. Launch WebFOCUS Alert Assist in one of the following ways:
    1. From the WebFOCUS Hub or the WebFOCUS Home Page, open the Workspaces area and right-click the folder where you want the alert to reside. On the Action Bar, select InfoAssist and Alert to open the Alert Assist tool.

      Note: If the folder is not configured to connect to the sample data, by default, open the Properties panel and select the Server tab. Select the server where the sample data is loaded, assign the Application where the sample data resides and save your changes.

    2. From the Legacy Home Page, in the Resources tree, right-click the domain or folder where you want the alert to reside, point to New, and then click Alert to open the Tool Setup dialog box.

      Note: User access to the Tool Setup dialog box to specify WebFOCUS Reporting Server properties is controlled by a WebFOCUS security privilege. For more information, see the TIBCO WebFOCUS® Security and Administration manual.

      In the Tool Setup dialog box, select the server where the sample data is loaded, and assign the Application where the sample data resides, and click OK.

    The Alert Assist tool opens in a new browser window, as shown in the following image.

    Alert Assist
  3. Click the Test node.
  4. On the Home tab, in the Navigation group, click New, and then click WebFOCUS Test.

    WebFOCUS InfoAssist opens.

  5. From the Open dialog box, choose the wf_retail Master file.
  6. Add the following fields to your report:
    • Product Category
    • Brand
    • Cost of Goods
    • Revenue

    Before you complete your report, you must add the Where condition that defines the criteria that you want to be met.

  7. On the Data tab, in the Filter group, click Filter.

    The Create a filtering condition dialog box opens.

  8. Double-click the Double-click or press F2 to edit! text.

    The drop-down menus for Fields and Subqueries, Operators, and Values open.

  9. Make the following selections:
    • In the Field drop-down menu, click Cost of Goods.
    • In the Operators drop-down menu, click Greater than.
    • In the Value drop-down menu, click Field, and then select Revenue.

    The following image shows the finished Where condition.

    Create a filtering condition window
  10. Click OK.
  11. Save your report and close InfoAssist.

    Your report now shows under the Test node in the Alert Assist browser window.

  12. Click the Result node. On the Home tab, in the Navigation group, point to New, click New Report, and then click Report.

    WebFOCUS InfoAssist opens.

    Since your Alert Test is checking for revenue loss, in this tutorial you want the final report to have a field that highlights the loss. This field is not available by default. You can create it.

  13. From the Open dialog box, choose the wf_retail Master file.
  14. On the Data tab, in the Calculation group, click Detail.

    The Detail Field (Define) dialog box opens.

  15. In the Field input box, type Loss.
  16. In the expressions field, create the following expression, as shown in the image below:

    WF_RETAIL.WF_RETAIL_SALES.REVENUE_US -

    WF_RETAIL.WF_RETAIL_SALES.COGS_US

    Detail Field (DEFINE) window

    You can type the expression directly into the expression field or choose the fields from the data tree.

  17. Click OK.

    The Data pane refreshes and now displays the new field, Loss.

  18. Add the following fields to your report:
    • Brand
    • Quantity,Sold
    • Loss
    • Sale,Quarter

    To ensure that the Alert Result generates the correct report when the test criteria is met, you must add the same Where condition as the one you added to the Alert Test.

  19. Repeat steps 8-11 to add the Where condition.

    You can style the report that gets distributed by adding a header.

  20. On the Home tab, in the Report group, click Header & Footer, and then click Report Header.

    The Header & Footer dialog box opens.

  21. Type Brand Revenue Loss 2015.
  22. Click OK, and close the Header & Footer window.
  23. Save your report, and close InfoAssist.

    Once both Test and Result are completed, you can save the Alert procedure.

  24. In the Alert Assist browser window, click the Save button.

    The Save As dialog box opens.

  25. In the Title field, type Brand Revenue Loss Alerts, and then click Save.

    Your new Alert now displays in the Resources tree and can be scheduled.

    You can schedule the report to be distributed through email, FTP server, report library, repository, or sent directly to a printer. In this tutorial, you want a monthly email to be sent.

  26. From the WebFOCUS Home Page or Legacy Home Page, right-click the Alert that you created, point to Schedule, and then click Email.

    The ReportCaster Basic Scheduling tool opens, as shown in the following image.

    ReportCaster Basic Scheduling tool
  27. Under the Scheduling Object area, click Alert.

    The Alert Options dialog box opens.

  28. Click Continue After Alert and then click OK.

    This means that the schedule continues to run at the specified time and distribute the report each time that the Alert test is true. Other options include Automatically Reset, Deactivate Schedule After Alert, and Delay. For more information about these options, see the TIBCO WebFOCUS® ReportCaster Guide.

  29. Click Properties.
  30. In the Summary area, type This Alert procedure monitors the revenue loss by brand.
  31. Click Reoccurrence. In this example, you want to schedule the Alert procedure to run monthly on the last day of every month, as shown in the following image.
    Recurrence tab
  32. Click Distribution.
  33. Complete the To, From, and Reply Address fields with the email addresses. In this tutorial, you can use your own email address to test the Alert. In the Subject field, type Brand Revenue Loss Alerts.

    The following image shows an example of the Distribution tab.

    Distribution tab

    Additionally, you can set notifications of the Alert distribution. Click Notification and fill in the fields, as required.

  34. Click Save.

    The Save As dialog box opens.

  35. In the Title field, type Brand Revenue Loss Alert Schedule and click OK.

    The Alert Schedule now displays in the Resources tree.

  36. Close the ReportCaster Basic Scheduling Tool.
  37. To test the Alert, before it is scheduled to run, right-click the Alert Schedule, and then click Run.

    A prompt will ask you if you want to run the schedule.

  38. Click OK.

    The email addresses that you identified earlier will receive the Alert Report, shortly.

    The following images show examples of the Alert email and Alert report.

    Alert report