Working With Alerts

In this section:

How to:

In the business climate today, cutting costs and increasing profitability are critical. Organizations create and distribute reports for evaluating and taking action when management-defined conditions are not met. The evaluation can largely be automated using Alert reporting.

Alert reporting automates the evaluation of a defined condition to determine whether or not a report should be submitted. Recipients of the report know before they open it that they are receiving this report because there is an exception in their area of responsibility.


Top of page

x
Alert Reporting

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. For example, a simple guideline is to alert a sales manager when an order that exceeds $1 million is entered. An example of a more complex guideline is to alert a department manager when cumulative expenses exceed budget for any category. The report sent to the manager as a result of the Alert might show the most recent transactions, the amounts, and the sources.

Alert reporting is an integrated feature of WebFOCUS Managed Reporting and ReportCaster. An Alert report can be run interactively or by authorized users. You can use ReportCaster to schedule and distribute an Alert report. Burst capability can send targeted information to the people who need it, so that there is less information for each person to analyze.

Alerts work with all email clients. They are supported on the following mobile devices: iPhone®, iPad®, BlackBerry®, and email enabled mobile phones. Alerts can also be sent to any PC or laptop computer with email capability.

Alerts provide the following:


Top of page

x
Components of an Alert

In this section:

How to:

Reference:

The Alert feature requires the following components:

An Alert consists of the following:

An Alert test is required to check whether or not a set of defined test conditions (rules) is met (true or false). An Alert test can be a WebFOCUS Test, which is a simple TABLE request that you create to define the condition to test for. Alternatively, an Alert test can be a Test for File Existence, which checks for the existence of a file that is accessible to the WebFOCUS Reporting Server to which the Alert test is submitted. The file does not need to be in the APP PATH. It just needs to be in a location where it can be found by the Reporting Server.

The Test for File Existence file does not need to be an actual file with an extension. Testing for the existence of a folder is also valid.

If the Alert test is triggered (true), returns records, the Alert result request is processed. You have the option of creating the result report or selecting an existing Managed Reporting report you are authorized to run.

Alerts Created in the Browser

When you select a new Alert from the BI Portal or BI Dashboard, the WebFOCUS Alert Assist tool opens for the creation of components. Alert Assist is a Bindows™ application that is launched in a separate browser window.

The browser tab uses the generic name Alertn, where n is an index number starting at 1. All subsequent Alerts increase by 1. If you save the Alert, the dialog box is automatically set up with this generic name. However, you can change the name as desired.

If you select WebFOCUS Test in the browser, you are prompted to create the Alert test using InfoAssist. The version of InfoAssist that is invoked does not have field styling, heading, footing, or report options, such as OLAP and On-Demand Paging. The Alert test determines whether or not a specified condition is true. It is not the report that is displayed as the result of the Alert.

You can create the Alert result using InfoAssist, this time with all the available styling and report options. Alternatively, you can select an existing Managed Reporting report.

Note: It is recommended that you select an existing report for the Alert result request, as it is available to edit, run interactively, or schedule independently of the Alert. If you create the Alert result using InfoAssist within Alert Assist, you need to use Alert Assist and select the open option again to edit the request, because the Alert test and the report to be run are contained within the Alert procedure.



x
Reference: Alert Assist Sample Code Created With InfoAssist

In the sample code that follows, both the Alert test and the report to be run (Alert result) are created with InfoAssist. To keep the sample code simple, styling and report options, such as report headings and conditional styling, are not included in this request.

Notice that after the first TABLE request, there is a –IF statement that checks if the number of lines in the Alert test is equal to zero (-IF &LINES EQ 0). This test condition determines if the second TABLE request, to execute the report, should be triggered (true).

If the number of lines is greater than zero, then there are records that satisfy the Alert test, and the report is run. If the number of lines is equal to zero, then there are no records that satisfy the Alert test, and the report is not run.

-* Created by Alert Assist
-* start of the test report
ENGINE INT CACHE SET ON
-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE ibisamp/wf_retail
SUM WF_RETAIL.WF_RETAIL_SALES.COGS_US
WF_RETAIL.WF_RETAIL_SALES.REVENUE_US
BY WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY
BY WF_RETAIL.WF_RETAIL_PRODUCT.BRAND
WHERE WF_RETAIL.WF_RETAIL_SALES.COGS_US GT WF_RETAIL.WF_RETAIL_SALES.REVENUE_US;
ON TABLE HOLD
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET CACHELINES 100
END
-* end of the test report
-* start of the test
-RUN
-IF &LINES EQ 0 GOTO ALERTEXIT;
-* end of the test
-* start of the output report
ENGINE INT CACHE SET ON
-*COMPONENT=Define_wf_retail
DEFINE FILE ibisamp/wf_retail
Loss/D12.2=WF_RETAIL.WF_RETAIL_SALES.REVENUE_US - WF_RETAIL.WF_RETAIL_SALES.COGS_US ;
END
-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE ibisamp/wf_retail
SUM WF_RETAIL.WF_RETAIL_SALES.QUANTITY_SOLD
Loss
BY WF_RETAIL.WF_RETAIL_PRODUCT.BRAND
ACROSS WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_QTR
WHERE WF_RETAIL.WF_RETAIL_SALES.COGS_US GT WF_RETAIL.WF_RETAIL_SALES.REVENUE_US;
ON TABLE SUBHEAD
"Brand Revenue Loss"
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET GRWIDTH 1
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, HFREEZE=OFF, $
TYPE=TABHEADING, LINE=1, JUSTIFY=CENTER, $
TYPE=TABHEADING, LINE=1, ITEM=1, OBJECT=TEXT, SIZE=14, STYLE=BOLD+ITALIC, $
ENDSTYLE
END
-* end of the output report
-* start of the options
-* end of the options
-ALERTEXIT
-* Finished by Alert Assist


x
Procedure: How to Access the WebFOCUS Alert Assist
  1. Sign in to WebFOCUS as an administrator or developer.
  2. In the Resource tree, right-click a folder, point to New, and then click Alert.

    The Tool Setup dialog box opens. It provides options for selecting a Reporting Server and Application Paths.

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

  3. Select a Reporting Server and Application Paths when not using the default Reporting Server specified in the WebFOCUS Client configuration or the default application path for that Reporting Server, as shown in the following image.

    Tool Setup window

  4. Click OK.
  5. WebFOCUS Alert Assist opens.


x
Alert Assist Overview

When you create an Alert in the web browser, it invokes Alert Assist and then InfoAssist. Alert Assist has a user interface similar to InfoAssist. The following image shows the WebFOCUS Alert Assist interface.

Alert Assist window

Alert Assist Main Menu

In the upper-left corner of the browser window is the Application button, which provides access to the Alert Assist Main Menu. This menu contains the Save, Save As, Run, Close, and Exit options. Some of these options are also on the Alert Assist Quick Access toolbar.

The following image shows the expanded Alert Assist Main Menu.

Alert Assist Main Menu

Save

Saves the Alert. This option is disabled until both parts of the Alert are created.

Save As

Saves the current Alert with a new name. The Save As dialog box displays a field where you can type the new name. This option is disabled until both parts of the Alert are created.

Run
Submits the Alert procedure to the Reporting Server. This option is active when both parts of the Alert have been created. The output always opens in a new browser.
Close

Closes the current Alert and prompts you to save any changes.

Exit

Exits the Alert Assist and prompts you to save any pending changes to the open Alert.

Alert Assist Quick Launch Toolbar

The Alert Assist Quick Launch toolbar contains the following buttons.

Button

Description

Save Alert icon

Saves the Alert. This option is disabled until both parts of the Alert are created.

Undo action icon

Reverts back by undoing one action.

Redo Action Icon

Moves forward by redoing one action.

FOCEXEC icon

Displays the Alert procedure code in a read-only window.

Run Icon

Submits the entire Alert procedure to the Reporting Server. This option is active when both parts of the Alert have been created. The output always opens in a new browser.

Ribbon

Under the Alert Assist Quick Access toolbar is a ribbon. When Alert Assist first opens, none of the ribbon options are activated.

You must select the Test node or Result node to activate the New option, as shown in the following image.

Active New option in ribbon

You must create a Test to activate the remaining options, as shown in the following image.

Create a Test

The ribbon contains the following options:

Navigation Group

New

Displays a menu from which you can choose to create a new WebFOCUS report or WebFOCUS test, open an existing report, or test for file existence. This button is active when the Test node or Result node is selected. You can also find these options in the shortcut menus for the Test node and Result node.

Open

Invokes InfoAssist so that you can make changes to the report when an Alert test or Alert result is selected. The Open option is only activated after a report test is created.

Edit

Opens the report on FILENAME data source dialog box when an Alert test or Alert result is selected. You can then edit the report in a text editor.

Run

Runs the report in a new browser window when an Alert test or Alert result is selected.

Delete Group

Delete

Removes the report from the Test or Result node.



x
The Life of an Alert

Authorized users can run an Alert test interactively and optionally schedule it to be distributed by ReportCaster.

The following image shows basic Alert processing.

Basic Life of an Alert diagram

  1. The Managed Reporting developer, using Alert Assist or the Alert Wizard, creates an Alert test and designs the report that is run if the Alert condition is true.
  2. If the Alert test is true, the WebFOCUS Reporting Server runs the Alert result.
  3. If the Alert test is false, the Alert result is not run.

The following image shows scheduled Alert processing.

Life of a Scheduled Alert diagram

  1. The Managed Reporting developer, using Alert Assist or the Alert Wizard, creates an Alert test and designs the report that is run if the Alert condition is true.
  2. If desired, an Alert schedule is created using ReportCaster.
  3. The ReportCaster Distribution Server checks for scheduled jobs in the WebFOCUS Repository.
  4. When the ReportCaster Distribution Server processes a scheduled Alert procedure, it is submitted to the Reporting Server to evaluate if the Alert test is true.
    1. If the Alert test is false, the Alert is returned to the queue for the next scheduled time.
    2. If the Alert test is true, the Reporting Server runs the Alert result and returns the results to the ReportCaster Distribution Server. The ReportCaster Distribution Server distributes the Alert result to the recipients, as specified in the schedule.

Top of page

x
Procedure: How to Create an Alert Test
  1. In the Alert Assist main window, right-click the Test node, and then point to New, as shown in the following image.

    New option

  2. Select one of the following options:
    • WebFOCUS Test. Allows you to create a new report in a scaled-down version of InfoAssist. Proceed to step 3.
    • Test for File Existence. Allows you to select an existing report. Proceed to step 6.

    Note: The scaled-down version of InfoAssist is used to create basic TABLE requests with HOLD (not PCHOLD FORMAT) statements. It generates procedure syntax that is written to the Alert the same way as in earlier WebFOCUS releases. The Edit option on the ribbon allows you to open the editor and manually enter the procedure code or edit existing procedure code. When the test is saved from the editor, the syntax needs to be validated as having an ON TABLE HOLD statement, a prerequisite for an Alert test.

  3. When you select WebFOCUS Test, InfoAssist opens. Select a Master File from the Open dialog box.
  4. Create your report as desired, and then save it.
  5. Close InfoAssist to return to Alert Assist.
  6. When you select Test for File Existence, type the full path to the file accessible to the Reporting Server that you want to check exists. Do not use a file name or folder path that includes spaces.

    Testing a folder for existence is also valid. Type the full path to the folder accessible to the Reporting Server. If the file is located, the Alert is triggered (true) and the Alert result report is run.

  7. Click OK to save the Alert test.

Top of page

x
Procedure: How to Create an Alert Result
  1. In the Alert Assist main window, right-click the Result node, and then point to New, as shown in the following image.

    New Option

  2. Select one of the following options:
    • New Report. Allows you to create a new report, chart, document, or dashboard, using the full version of InfoAssist. Proceed to step 3.
    • Existing Report. Allows you to choose from the existing reports in the tree. Proceed to step 5.
  3. If you select New Report, the Open dialog box opens. Select a Master File.

    InfoAssist opens, and you can create the report that will be run when the Alert test is triggered (true).

  4. Save your report, and close the InfoAssist window to return to Alert Assist. Proceed to step 19.
  5. If you select Existing Report, the Open dialog box opens, as shown in the following image. Select a report you are authorized to run from the tree.

    Open Dialog Box

  6. Click Open.

    The Open dialog box closes and the selected report appears under the Result node.

  7. Select Save from the Alert Assist menu. The Save As dialog box opens, as shown in the following image.

  8. Type the Alert Title, and click OK.
  9. Close Alert Assist to return to the BI Portal.

    The Alert result is automatically run if the Alert test report is triggered (true). If you are authorized to schedule reports for distribution, you can optionally schedule the Alert.

    Note: As you use Alert Assist to create reports, you may see messages that state Report Saved. Your changes to the report have been saved, but they are not written to the WebFOCUS Repository until the Alert is saved. If you exit Alert Assist before you click Save in the Alert Assist menu, the Alert is not saved.


Top of page

x
Procedure: How to Schedule an Alert
  1. In the Resource tree, right-click the Alert, point to Schedule, and select how the Alert report will be distributed when the Alert test is triggered (true), as shown in the following image.

    The ReportCaster Basic Scheduling tool opens in a new browser window, as shown in the following image.

    ReportCaster Basic Scheduling Tool

    For more information on the Basic Scheduling tool and distribution options, see the ReportCaster manual.

  2. Click Alert.

    The Alert Options dialog box opens, as shown in the following image.

    Alert Options dialog box

  3. Select one of the following Alert Options:
    • Automatically Reset. This option continues to run the schedule at the specified time and checks to confirm that the Alert test is no longer true before the Alert test is evaluated again. It is best to use this option when you do not want to receive the Alert result again until after the exception condition has been addressed and occurs again. For example, when the quantity in inventory is greater than 20,000, the Alert is triggered. You do not want to receive the report again until after the inventory is less than or equal to 20,000 for all products and then goes back over 20,000 again.
    • Continue After Alert. This option continues to run the schedule at the specified time and distribute the report each time that the Alert test is true. It is best to use this option when you want to be notified at the interval specified in the schedule that the Alert test is true.
    • Deactivate Schedule After Alert. This option deactivates the schedule after the Alert is triggered. The schedule has to be activated again for the Alert test to run after the Alert is triggered. It is best to use this option for one-time Alert tests. This is the default value.
    • Delay. This option is best used when you want to allow a specific period of time to address the Alert test but want to be notified again if the Alert test has not been met. You can restart the Alert after a maximum of 99 hours, days, weeks, months, or years.

    As you complete the creation of the schedule, remember to consider the burst option to distribute specific report values, instead of the entire report. When a report is burst, the distribution information must be provided in a distribution list, distribution file, or dynamic list for email distribution and an access list for library distribution. The email and library distribution options are the most effective for Alert reports because of the push versus pull notification through email. For more information on using the burst option in ReportCaster, see the ReportCaster manual.

  4. Select the Properties tab and type a title and summary for the scheduled report.
  5. Click Recurrence and specify when and how often to run the schedule.

    For more information on Recurrence options, see the ReportCaster manual.

  6. Click Distribution and specify the destination information for where you want the report to be distributed. For more information on specifying schedule distribution information, see the ReportCaster manual.
  7. If you wish to receive notifications of the Alert distribution, click Notification and specify the destination information for where you want the notification to be sent.
  8. If your Alert uses parameters, check Parameters to review and specify parameter values. Ensure that you have the correct Path, Procedure, and Server Name. For more information on specifying parameter values when scheduling a report procedure (FEX), see the ReportCaster manual.
  9. Click Save and close the ReportCaster Basic Scheduling tool.

    The schedule report now appears in the Resource tree, as shown in the following image.


Top of page

x
Checking Scheduled Alerts

When an Alert test is false (and therefore not activated), the Alert result report is not run. When an Alert schedule runs, information about the Alert test evaluation (true or false) and any error or warning messages that occur during schedule or Alert processing are written to the log file.

In order to track the completion of a scheduled Alert, or errors that occurred during processing without checking the log report for the Alert schedule, we recommend that you use the Schedule Notification option.

In the Scheduling tool, the Notification tab allows you to specify:


Top of page

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



x
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:

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


WebFOCUS