Customizing Alerts

This chapter tells you how to further customize the alerts you define so that they perform the exact kind of exception reporting your organization needs.

This chapter covers the following topics:

Overview of Alert Customizations

Whether you create simple or complex alerts, you can further tailor the alerts to best suit your needs. For example, you can:

You can also implement other customizations, such as duplicate checking and action escalation, by saving alert history. See: Overview of Oracle Alert History.

Defining a Distribution List

Distribution lists let you predefine a set of message recipients for use on many actions. If a recipient changes, you need only adjust it in the distribution list, not in the individual message actions.

To define a distribution list

  1. Navigate to the Distribution Lists form.

    The Distribution Lists Window

    the picture is described in the document text

  2. Enter in the Application field, the name of the application that owns the distribution list.

  3. Enter a name for the distribution list that is unique within the application (up to 30 characters). See: Oracle Alert Naming Conventions.

  4. Enter a description of the distribution list (up to 240 characters).

  5. In the Mail Recipients region, enter the electronic mail IDs of the recipients, separated by a space, or a comma (,), or a combination of the two. You can enter as many mail IDs as you want (up to 240 characters).

    The To field lets you list primary recipients. The Cc field lets you list recipients to whom you want to send a copy of the message. The Bcc field lets you list recipients to whom you want to send a blind copy of the message, that is, recipients in the To and Cc field cannot see who the recipients listed in the Bcc field are.

    Tip: We do not recommend using alert outputs in a distribution list. Since you can use distribution lists for many alerts, and each alert can have different outputs, an output you use in a distribution list for one alert could result in an error when used in another alert.

  6. In the Print Options region, enter in the For User field, the names of the recipients for whom you want to print a copy of a message. Separate the names with commas and do not use blank spaces within a single name. You can enter as many names as you like, up to 240 characters.

  7. Enter in the Printer field, the name of the printer to which you want Oracle Alert to direct the message. For each name you specify in the For User field, the printer prints a copy of the message preceded by a burst page with the name specified.

To delete a distribution list

  1. Display the existing distribution list in the Distribution Lists form.

  2. Choose Delete Record from the Edit menu.

  3. If the distribution list is currently used in a message action, an error message followed by a References window appears.

    You can also choose References from the Tools menu in the Distribution Lists window at any time to display the References window.

    The References Window

    the picture is described in the document text

  4. The References window shows you which actions reference the current distribution list.

    You must navigate to the Action Details window of the Alerts form and remove the distribution list from those actions that reference it before you can delete the distribution list.

  5. Once you delete your distribution list, save your changes.

Formatting Summary Message Actions

Oracle Alert can perform a summary message action on a combination of the exceptions found during an alert check, rather than on each exception found. You determine the combination of exceptions, and define the summary message action you want Oracle Alert to perform for each combination. You can take advantage of sophisticated formatting options in summary message actions and create alert messages that look exactly how you want them to look.

You have complete control over the layout of your summary message. When you create your alert you may need a particular message format; for example, you may want to recreate the layout of a purchase order in your alert message. You can define your summary message action so that Oracle Alert sends a separate summary message for each purchase order found during an alert check.

You specify the format of a summary message in two Oracle Alert windows:

To format summary message actions

The Alerts Window: Periodic Tab

the picture is described in the document text

  1. Display the alert that you want to format summary actions for in the Alerts form.

  2. Choose Alert Details.

    The Alert Details Window

    the picture is described in the document text

  3. In the Outputs tabbed region, specify the maximum number of characters that you want Oracle Alert to display for each output used in your alert. You indicate how many characters of data you want Oracle Alert to display for each output in detail actions, and how many characters you want Oracle Alert to display in summary actions.

  4. Save your changes.

  5. Choose Actions in the Alerts form.

  6. Select the summary message action you want to format.

  7. Choose Action Details in the Actions window.

    The Action Details Window

    the picture is described in the document text

  8. Enter a value in the Max Width field to specify the maximum width of your message. Select 80 for portrait format, 132 for landscape format, and 180 for compressed landscape format. The default is 80.

  9. Choose Wrap or Truncate in the Column Overflow field to specify whether you want Oracle Alert to wrap exception data that exceeds your defined column widths.

    A "column" in a message action is the space you allot for Oracle Alert to display the data it substitutes for an output. Use column wrap so that you can display large amounts of data within your summary message.

    If you choose Wrap, Oracle Alert uses as many lines as necessary to display the output value. If you choose Truncate, Oracle Alert truncates a column at the start of the next column, or at the page width (right margin), if it is the last column.

    When Oracle Alert constructs a message, each column starts at the ampersand (&) of the output name and ends two characters before the next output. Oracle Alert always leaves one blank space between columns.

    Oracle Alert considers the rightmost column in an alert message to start with the ampersand of the output name and end with the last character allowed by the defined message width. If the last column contains numeric data, the width of that column can be a maximum of 15 characters. If you want a numeric column to be wider than 15 characters, place the column in a location other than the last column of the message.

    Note: Oracle Alert does not wrap numeric data within a column. If the number cannot fit within the column, Oracle Alert displays "###" across the width of the column. You should expand the width of this column within the message definition.

    Oracle Alert ignores any columns that you place outside the defined message width. For example, if you define a message width of 132 characters, then place an output beginning in column 140, Oracle Alert ignores it and does not include that information in the message.

    If you choose column wrap, Oracle Alert appends a hyphen to the end of each line that ends in the middle of a word, to indicate that the word continues on the next line. If a line ends on a space or on the last letter of a word before a space, Oracle Alert does not add a hyphen, but simply wraps the remaining words onto the next line. For example, an output value might appear in a column as follows:

     Mai-
                    ling
                    list
                    for 
                    ale-
                    rts
    

    Suppose you have an output with a defined maximum length of 60, and you place the output in the Summary Message Template. You format your summary message such that there are 22 characters between the first character of the output and first character of the next output, keeping in mind that Oracle Alert always leaves one blank space between columns and appends a hyphen to the end of a line when the line break occurs in the middle of a word. During an alert check, the exception data that Oracle Alert substitutes for the output is more than 60 characters long. Because you have turned column wrap on, Oracle Alert displays 60 characters of the data on three lines of 20 characters each. Oracle Alert "wraps" the data so that 60 characters of it is displayed in your summary message.

  10. Constant text is any non-output text that you include in the summary message. You can place constant text within the summary message template instead of, or in addition to, any column headings you include outside the summary template. For example, you may want to precede a money column with "$," or you may want to label a column "Purchase order line:".

  11. Oracle Alert automatically prints your summary messages in an appropriate format. If a message is narrower than 80 characters, Oracle Alert prints it in a standard portrait orientation. If a message is between 81 and 132 characters wide, Oracle Alert prints it in landscape orientation, with the 132 columns along the long edge of the paper. If a message is between 133 and 180 characters wide, Oracle Alert also prints it in a landscape orientation, but compresses the font or character size. You never need to worry about not being able to see the information in your messages.

  12. Save your changes.

    Example

    Suppose that you are creating an alert that sends a message to the responsible purchasing agent informing that agent of unapproved purchase orders. You have several possible message formats you can define.

The Select Statement

Your alert Select statement looks like this:

 SELECT      h.po_number,
                        v.vendor,
                        h.description,
                        a.email_address,
                        l.line_number,
                        l.item,
                        l.quantity,
                        l.price 
INTO            &PO,
                        &VENDOR,
                        &DESC,
                        &AGENT,
                        &LINE,
                        &ITEM,
                        &QTY,
                        &PRICE 
FROM            po_headers h,
                        po_lines l,
                        po_vendors v,
                        po_agents a 
WHERE           h.header_id             =       l.header_id,
                        h.agent_id              =       a.agent_id,
                        h.vendor_id             =       v.vendor_id,
                        h.approved_flag =       'N'  

Your Summary Message Format

You can define your summary message to include all of a purchasing agent's purchase orders into one summary message, or you can send a separate summary message for each purchase order.

For a single summary message per purchasing agent, you can define your summary message action as shown below. Notice the use of constant text within the summary message template.

To: &AGENT
Cc:
Bcc:
Subject: Your unapproved purchase orders
=**= Enter summary template below this line =**=
**      PO Number:      &PO Vendor: &VENDOR
        Description:    &DESC
        Line:           &LINE       Item:           &ITEM
        Quantity:       &QTY        Price:          $&PRICE
=**= Enter summary template above this line =**= 

Using this definition, Oracle Alert will send one message to each purchasing agent that lists that agent's unapproved purchase orders. Each exception that Oracle Alert lists in the message will be an individual purchase order line from an unapproved purchase order.

If you want to send a separate summary message to the purchasing agent for each unapproved purchase order, you can define your summary message action like this:

To: &AGENT
Cc:
Bcc:
Subject: Unapproved purchase order &PO
        PO Number:      &PO Vendor:    &VENDOR
        Description:    &DESC
        Line    Item Description                Quantity        Price
        ----    ----------------                --------        -----
=**= Enter summary template below this line =**=
**      &LINE       &ITEM                               &QTY         $&PRICE
=**= Enter summary template above this line =**=  

In this example, Oracle Alert constructs a distinct message for each unapproved purchase order. That is, Oracle Alert constructs a separate message for each unique combination of exceptions substituted for the outputs you place outside the summary message template. You can change the construction of the message simply by moving an output inside or outside the summary message template.

Related Topics

Creating a Periodic Alert

Creating an Event Alert

Creating Alert Actions

Overview of Summary Threshold

Oracle Alert can automatically determine whether to perform a detail or summary action, depending upon the number of exceptions found by the alert Select statement. If you define a summary threshold, Oracle Alert performs a detail action for each exception found by the Select statement, but if the number of exceptions found exceeds the summary threshold, Oracle Alert performs a summary action. You need to first define a detail and a summary action, include them in a threshold group, and then specify a summary threshold.

You may find that defining a summary threshold is useful for your alerts that return varying amounts of data from your database. If your alert typically returns few exceptions, but on occasion returns many exceptions, Oracle Alert can automatically switch from performing a detail action for each exception to performing a summary action for each group of exceptions. Oracle Alert performs the most efficient alert action automatically, without requiring further intervention from you.

Related Topics

Defining a Summary Threshold

Defining a Summary Threshold

To define a summary threshold, you first create an alert in the Alerts form and define one detail action and one summary action for the alert in the Actions window of the Alerts form.

To define a summary threshold for your alert

  1. Navigate to the Alerts form and create a new alert or display an existing alert that you want to define a summary threshold for. See: Overview of Alerts.

  2. In the Alerts form, choose Actions.

  3. In the Actions window, define a detail action and a summary action that you want Oracle Alert to perform depending on the number of exceptions it finds for your alert. You will add these two actions to a threshold group. You can define message, SQL statement script, operating system script, or concurrent program request actions, but both detail and summary actions must be of the same action type.

  4. In the Alerts form, choose Threshold Groups from the Tools menu.

    The Threshold Groups Window

    the picture is described in the document text

  5. In the Threshold Groups window, give your threshold group a name (up to 80 characters) and description (up to 240 characters). See: Oracle Alert Naming Conventions.

  6. In the Type field, choose the type of action you want to use in the group (Message, SQL Statement Script, Operating System Script, or Concurrent Program).

  7. In the Action field of the Threshold Group Members block, display a list of the predefined actions for this alert. Choose a detail action and a summary action to include in this threshold group.

    You can choose only actions created for this alert with the same action type as the group.

  8. Check the Enabled field to enable the action in the threshold group.

  9. Enter a current or future date in the End Date field if you want to disable an action in the threshold group by a certain date.

  10. Choose Action Sets from the Alerts window.

    The Action Sets Window

    the picture is described in the document text

  11. In the Action field of the Members tabbed region, enter the threshold group you want to include in your alert's action set.

  12. In the Summary Threshold field, enter a number that represents the maximum number of exceptions that the alert Select statement can find before Oracle Alert switches from performing the detail action in the threshold group to performing the summary action. You can define a summary threshold for each threshold group that resides in an action set.

    For example, suppose you define an action set with a summary threshold of five. If, during an alert check, the alert Select statement locates between one and five exceptions, Oracle Alert performs the threshold group's detail action once for each exception found. If the Select statement locates six or more exceptions, however, Oracle Alert performs the summary action once for all the exceptions found.

    Important: You can only define a summary threshold for an action set member that is a threshold group. You cannot define a summary threshold for an action or an escalation group.

  13. Save your work. Your alert is now ready to use summary threshold.

To define a summary threshold with dynamic distribution

If you are combining dynamic distribution with summary threshold, keep in mind that Oracle Alert groups exceptions before it determines whether to perform a detail or a summary action. That is, if you use an output to represent your message action's distribution, Oracle Alert first substitutes the appropriate exception value for the output, then based on the number of exceptions substituted, performs either the detail or summary action in the threshold group.

For example, suppose you define a message action that uses an output to dynamically distribute information to a group of managers, and you define a summary threshold of 3 for your action set. Suppose that during an alert check, the alert Select statement returns 7 exceptions, 3 of which must go to one manager, 4 of which must go to another manager. Using the defined summary threshold of 3 exceptions, Oracle Alert sends three detail messages to the first manager, and one summary message reporting 4 exceptions to the second manager.

To delete a threshold group

  1. Display the existing threshold group in the Threshold Groups window of the Alerts form.

  2. Choose Delete Record from the Edit menu.

  3. If the threshold group is an active member of an action set, an error message followed by a References window appears.

    The References Window

    the picture is described in the document text

    You can also choose References from the Tools menu in the Threshold Groups window at any time to display the References window.

  4. The References window shows you which action sets reference the current threshold group.

    You must navigate to the Action Sets window and remove or disable the threshold group from those action sets before you can delete the threshold group.

  5. Once you delete your threshold group, save your changes.

Related Topics

Creating a Periodic Alert

Creating an Event Alert

Creating Alert Actions

Creating an Action Set for an Alert

Creating Self-Referencing Alerts

You can create an alert that checks your database for only those exceptions that are new since the last time the alert was checked - without saving history. A "self-referencing" alert uses its own "date-last-checked" value as the starting point when it checks your database for new exceptions.

A self-referencing alert compares the value of a date and time column with the value of an implicit input called :DATE_LAST_CHECKED in the WHERE clause of the alert Select statement. An implicit input is an input that Oracle Alert automatically provides the value for. The value of the implicit input :DATE_LAST_CHECKED is character. When checking a self-referencing alert, Oracle Alert automatically provides the date and time as the value for :DATE_LAST_CHECKED.

When Oracle Alert checks your alert, it uses the date and time information in the column you specify in your Where clause to determine whether the exceptions returned by the alert Select statement were created or updated since the date the alert was last checked. Your self-referencing alert returns only those exceptions that occurred more recently than the date and time value of :DATE_LAST_CHECKED. Then, Oracle Alert updates the value of :DATE_LAST_CHECKED with the date and time information from the current alert check. See: How Oracle Alert Checks Alerts.

Oracle Alert never displays :DATE_LAST_CHECKED in the Inputs tabbed region of either the Alert Details window or the Action Sets window in the Alerts form.

To create a self-referencing alert

You create a self-referencing alert the same way you would create any other alert, but you tailor your alert Select statement by adding to the Where clause a comparison between the values in the implicit input :DATE_LAST_CHECKED and the column that contains the date and time information that you want your alert to reference.

Example

Suppose your Select statement contains the following lines:

 .
        .
        WHERE ...
        AND creation_date > TO_DATE(:DATE_LAST_CHECKED, 
                'DD-MON-YYYY HH24:MI:SS') 

In this example, Oracle Alert compares the date and time information in the column CREATION_DATE with the date and time information in :DATE_LAST_CHECKED to determine which exceptions are new.

Related Topics

Creating a Periodic Alert

Creating an Event Alert

Creating Alert Actions

Creating an Action Set for an Alert

Overview of Oracle Alert History

Defining a Periodic Set

You can create a set of periodic alerts that Oracle Alert checks simultaneously. Use the Request Periodic Alert Check window to check the periodic set. Note that each periodic alert you include in a periodic set continues to run according to its individually defined frequency.

Before you define a periodic set, make sure you define one or more periodic alerts. See: Creating a Periodic Alert.

To define a periodic set

  1. Navigate to the Periodic Sets form.

    The Periodic Sets Window

    the picture is described in the document text

  2. Enter the name of the application that owns the alerts you want to define as a set.

    You can define alerts as members of a set only if they are periodic alerts owned by this application. However, the Oracle Alert Manager responsibility can define and check a periodic set that includes periodic alerts from any application, provided that Oracle Alert is the application you select in this field.

  3. Enter the name of your periodic alert set. The set name cannot be the same as the name of any other periodic set or alert owned by this application. See: Oracle Alert Naming Conventions.

  4. Enter a description of your periodic set (up to 240 characters).

  5. Assign the periodic alerts to the set in the Periodic Set Members block. You can include as many periodic alerts in your periodic set as you want, and you can even include periodic sets in a periodic set.

  6. Oracle Alert automatically enters the next available number in the Seq field. You can accept the default number or change it. A sequence number need not be unique unless you prefer a particular check order. Oracle Alert checks all of the sequence 1 members first, then all of the sequence 2 members, then all of the sequence 3 members, and so on.

  7. Enter the name of the application that owns the alert in the Application field. If the application that owns the periodic set is any application other that Oracle Alert, this application is the same as the application that owns the periodic set. You can only enter another application in this field if the application that owns the periodic set is Oracle Alert.

  8. Enter the name of a periodic alert or periodic set in the Name field. You can choose from the list of periodic alert and periodic sets owned by the application that owns the set. You cannot add a disabled alert to a periodic set.

    The Type field displays Alert if the member is a single alert, and Periodic Set if the member is another periodic set.

  9. Check Enable if your want Oracle Alert to check this member when checking the periodic set. If you uncheck this check box, Oracle Alert ignores this member when checking this periodic set.

    Note: This Enabled check box does not affect the enabled status of the periodic alert itself as defined in the Alerts form or of the periodic set itself as defined in the Periodic Sets block.

  10. Enter a current or future date in the End Date field if you want Oracle Alert to disable this periodic set member by a certain date. After this date, Oracle Alert does not check this alert or set when checking the periodic set.

  11. Save your work.

Related Topics

Checking a Periodic Alert