Thursday, November 08, 2012

Alerts

If you face any issues while viewing the Screenshots then Please download the document from
below link.

Alert
Overview: You can use alerts simply to notify one person/multiple persons about an event or some data change. There are two types of alerts
·     Event based Alerts
·     Periodic Alerts 
Event based Alerts: These Alerts are fired/triggered based on some change in data in the database. Ex: If you want to notify your manager when you create an item in the inventory you can use Event based alerts. When you create an item in the inventory it will create a new record in mtl_system_items_b, here inserting a record in the table is an event so when ever a new record is inserted it will send the alert. In same alert you can also send the information related to that particular item.
Periodic Alerts: These Alerts are triggered hourly, daily, weekly, monthly or yearly based on your input. Ex: If you want to know list of all items created on that day at the end of day you can use periodic alerts repeating periodically by single day. This alert is not based on any changes to database. This alert will notify you everyday regardless of data exists or not that means even if no items are created you will get a blank notification.
What can be done with Alerts?
  • You can send notifications
  • You can send log files as attachments to notifications
  • You can call PL/SQL stored procedures.
  • You can send approval emails and get the results.
  • Print some content dynamically. 
How to create an Alert?
  • Study your Business requirement and decide what type of alert you need either periodic alert or event based alert.
  • If you are going for periodic alert decide the frequency
  • If you have chosen event based alert then find out on what event (insert, update, delete) you want to fire the alert.
  • Decide what data need to be included in the alert
  • Based on the data you want in the alert write a SELECT SQL Statement to pull the data.
  • Create a distribution list grouping all the people to whom you want to send the alert.

Navigation:
  • Go to “Alert Manager” Responsibility
  • Alert >> Define


Periodic Alert:
Enter desired Alert Name in “Name” field under a specific Application by enabling the check box.
Periodic Details TAB:
Frequency LOV contains the following values:


If we choose Every N Calendar Days, then we need enter  start date,end date and interval.
If we want to activate the alert 24/7 then we need to enter start date as 00:00:00 end date 23:59:59 .
Usually we will place interval as 00:15:00.
If we don’t want to display alert which are already displayed in the previous alert, then we need to add the below condition to the where clause.
Select next_audit_date into &next_audit_date
from xxhbc_social_compliance
where last_update_date > (select date_last_checked from alr_alerts where alert_name like ‘XXHBC_COMPLIANCE%’)




After entering the select statement , we can verify the syntax by clicking on the verify button.

Click on Run button to see the no of rows returned.
Click on Save Button.
Click on Actions Button.
Here we need to provide the action name and description.
Action Level LOV Values:
1. Detail
2. NoExceptions
3. Summary
Based on the requirement, we need to select the “Action Level”.



Click on Action Details.

If you have any predefined Message Template, then we can import it by clicking the import button.
List Creation:
Navigation : Alert Managerà Alert à Distribution List


Save and Close the window.
Click on Action Sets Button.


Click on save button. Close the window.
Click on ”Alert Details” button.
Select the oracle Id and the operating Unit in which need to activate the alert message.
Click on Save and close the window.


Now we can manually test the alert by following the below steps:
Responsibility : Alert Manager


Enter Future Time in Start Date.
Click on “Submit Request”.

Scheduling the Alerts:





We need to Activate the Periodic Alert Scheduler by clicking on Activate Button.

Creating and Testing a Event Alert in Oracle EBS / Apps
In following example I will create an Alert which will send email to  specific email ID when ever any body update or create new employee in Employee Master.
Defining an Alert :
1.  Responsibility  –> Alert Manager.
2.  Naviate to the Alerts Window.
Alert –> Define
3.  Define a Period Alert:
Application = Human Resources
Name =  xxscc_test1
Enable = Selected.
4.    Event
Application  = Human Resources
Table  = PER_ALL_PEOPLE_F
5.   Enter the following SQL statement.
select employee_number
into &emp_numfrom
per_all_people_f where rowid=:rowid



6. Verify, to check whether the syntax written is correct.
7. Save
8. Define Alert Actions:
Action Name :  send_email_notification


8. Define Action Details:
Click on Action Details Button
TO :   Give you email ID here.      Note : You can also put here also bind variable with &email if that taken in select statement.
Subject :  Give Subject of you Email.
Text :  hello this is test email &emp_num

9- Define Action Sets
Click on Action Sets Button.
Action Set Name =  Send Email Test
Go to Action Set Details –> Members.
Action =  send_email_notification  as shown bellow.

10- Define Operating Unit
Click on Alert Details Button from first Alert Window.
Navigate to Installation Tab.
Operating Unit = for me  it is  FS_OU


11- Save.
Now if you Update or Create New Employee you will received notification in given email ID.



Transfer Alert from one instance/database to other:
  • Go to Alert Manager Responsibility
  • Alert >> Define
  • Go to “Tools” Menu on top
  • Click on “Transfer Alert”
  • Enter source and destination fields and click Transfer.