Previous  Next          Contents  Index  Navigation  Glossary  Library

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:

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.

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.

See Also

Creating a Periodic Alert

Creating an Event Alert

Creating Alert Actions


         Previous  Next          Contents  Index  Navigation  Glossary  Library