Creating and Scheduling an Alert

How to:

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.

Top of page

Procedure: How to Create and Schedule an Alert
  1. Sign in to WebFOCUS as an administrator or developer.
  2. In the Resource tree, right-click the folder where you want to create the Alert procedure, point to New, and then click Alert.
  3. In the Tool Setup dialog box, select the server where the sample data is loaded, and assign the Application where your data resides.
  4. Click OK.

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

    Alert Assist

  5. Click the Test node.
  6. On the Home tab, in the Navigation group, click New, and then click WebFOCUS Test.

    WebFOCUS InfoAssist opens.

  7. 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.

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

    The Create a filtering condition dialog box opens.

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

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

  10. 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

  11. Click OK.
  12. Save your report and close InfoAssist.

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

  13. 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.

  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:


    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
    • Sales,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 Resource tree and can be scheduled, as shown in the following image.

    Resource tree

    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. In the Resource tree, 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 ReportCaster manual.
  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 and Close.

    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 Resource tree, as shown in the following image.

  36. 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.

  37. 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