Using Alerts

Objective

After completing this lesson, you will be able to decide when to use predefined alerts and set up both predefined and user-defined alerts in SAP Business One.

Alerts

Alerts: Business Scenario

  • Let us look at a business example for an alert. In the example shown here, the purchasing manager wants to be notified automatically as soon as an inventory item falls below a the minimum stock quantity. On receiving the notification, the manager can decide whether to reorder stock.
  • This example is a fairly simple requirement and can easily be set up using a predefined alert in the system.
  • SAP Business One can also support more complex requirements with the addition of user queries. A creative use of alerts is as a task list or work order for a person. For example, if the purchasing manager in this scenario does not need to know immediately about the low stock, then you can create a user alert based on a query to provide a list of low-inventory items on a scheduled basis, such as once a day or once a week.

Alerts

  • The alert mechanism in SAP Business One informs one or more users instantly when a certain event or condition occurs.
  • It is important to realize that alerts do not prevent the event from occurring. The alert notifies you after the event has happened.
  • Four types of notification mechanisms are supported: internal, email, text and fax. Internal notifications appear in the SAP Business One client.
  • To receive an alert, a user must have a user account in SAP Business One. However, the user does not have to be logged into SAP Business One to receive email, text and fax notifications.

Setting Up Alerts

To set up alerts, you need the general authorization to Alerts Management.

There are two ways to set up an alert:

  • You can use one of the predefined alerts supplied with SAP Business One. In this case you simply need to configure and activate the alert The alert will provide instant notification to users when an event occurs.
  • Or, you can create your own alert based on a query. In this case the alert will trigger when the query runs and will provide the results of a query to the users. The query can be scheduled to run at a specific time and frequency.

Alert Service

  • The alert mechanism runs as a service and is managed in the Job Service area of the System Landscape Directory (SLD). The SLD is installed with the server components during the SAP Business One installation. To access the System Landscape Directory, use the path shown in the slide, then login to the SLD using the site user credentials and select the link for Job Service.
  • The settings for alerts are accessed from the link provided in the Job Service.
    • In the Alert Settings, the alert service is selectable by company database
    • The alert service must be running at all times in order for alerts to work
    • The AlertSvc user is a predefined user in SAP Business One and is automatically defined in the alert settings and functions as a technical user for connecting to the company database in order to execute alerts.
  • Note: in a SAP HANA environment, the alert service additionally requires the Service Layer to be installed in the landscape and bound with the database server. For more details about the alert server and service layer requirement, see the SAP Business One Administrator's Guide, version for SAP HANA.

Predefined Alerts

  • A fixed number of predefined alerts are provided for you. These cover common business situations where alerts are typically used.
  • To see the list of predefined alerts, open the Alerts Management window. You will see the list of alerts, and whether any of them are active.
  • You can view or edit details of an alert by choosing the arrow link next to the alert name.
  • The deviation from gross profit, deviation from commitment and credit limits, and discount alerts can be applied to sales documents.
  • The gross profit deviation is checked at the document level. The commitment and credit limit are checked against the document total. The discount limit is also checked against the document total.

The predefined alert for budget deviation can be applied to purchasing documents, payments, and journal entries. This alert is independent of the budget warning set in the General Settings.

  • The minimum stock deviation alert applies when a release document is added that takes the stock level below the minimum defined in the item master data. This alert is not issued if inventory blocking is enabled in the Document Settings.
  • The MRP alert provides a reminder if you have not released MRP recommendations into documents in time to fulfill the inventory demands. The alert is issued if the current system date is the recommendation release date.

Configuring a Predefined Alert

  • To use a predefined alert, select the arrow link next to the alert name.
  • You can optionally assign a priority to an alert (default is normal priority). When the message is received in the recipient's messages/alerts window or Microsoft Outlook window, high priority messages are flagged in red.
  • Then select each recipient and one or more preferred notification methods. You can choose an internal message, email, text, and fax. Instead of selecting each user individually you can switch to the Groups tab, and select a predefined user group (group type must be Alerts or Cross All Types). For more information on user groups, see the Users and User Defaults course.
  • In addition, select the notification checkbox for the predefined user called AlertSvc. This will ensure the alert is sent to a recipient even if the recipient is not logged into the SAP Business One client.
  • The email and fax mechanisms require the integration of these services with SAP Business One. The SMS mechanism requires the SAP Business One integration framework with the mobile scenario activated. The email addresses and phone numbers must be set up in the user account.
  • Finally, you must activate the alert for it to take effect, using the checkbox. You can also use this checkbox to deactivate an alert at any time.

Predefined Alert Conditions

  • For the predefined alerts, with the exception of minimum stock deviation, you can select conditions for the alert situation.
  • The conditions are different for each predefined alert. For example, the condition for the gross profit deviation is the profit percentage, and the condition for the budget deviation is the amount.
  • For the predefined alerts, with the exception of minimum stock deviation, you can also select the documents for the alert situation.
  • The available documents depend on the chosen alert. The alert will trigger immediately after the document is added to the system.

Alert Notifications

  • Internal alerts appear in the Messages/Alerts popup window in the SAP Business One client, and you can also access this window from the cockpit widget.
  • Select the alert row to access the document details.
  • The recipient of the alert has options to:
    • Forward the alert to another user
    • Send a reply to the user who caused the alert
    • Delete the alert row from the popup window
    • Set an out-of-office and optionally forward the alert to your email, SMS or fax

User Settings for Alerts

In the setup for a user, there are settings that affect alerts.

  • Send Alert for Activities Scheduled for Today. If set, when the user logs on they will receive an alert listing all activities scheduled for today. This is not a predefined alert, but if checked the activities will appear in the Messages/Alerts window, and the user can process activities directly from the alert message.
  • Display Inbox When New Message Arrives. This is set by default for a new user and automatically opens the Messages/Alerts window whenever a new alert is generated for the user.
  • Update Messages (Min.). This defines in minutes how often the system checks for updates to the alert inbox. The default value for a new user is 5 minutes. If you set this value to 0 the user will receive the alert notification immediately.

If not defined in the user setup screen, the settings are taken from the General Settings: Service tab.

User-Defined Alerts

If the predefined alerts do not meet business requirements, you can add user alerts.

Use Cases for User-Defined Alerts

User alerts are based on a saved user query and the query can check for multiple or unique business conditions.

As such, they can provide worklists to a user on a daily, weekly or monthly basis, for example:

  • Purchase orders over a specific limit issues for the day or week
  • Overdue sales quotations

Another use for alerts based on queries is to check the consistency and quality of new master data or documents, for example:

  • Missing fields in new business partner master data, such as tax id, credit limit, contact person, or sales employee
  • Sales orders with missing or incorrect tax codes

Before you create a user alert, check to see if there is a system report that produces similar results, as you can copy the query as the basis for your alert query. Choose Tools > Queries > System Queries.

User-defined Alerts

  • You can use the provided query tools Query Wizard and Query Generator to create and save the query. Using the query you can check multiple conditions or unique conditions specific to a business. For example, you can send the budget manager a daily list of Sales orders for today.
  • To create a new alert, choose the Actions button and then Create User Alert, in the Alerts Management window.
  • Provide a name for the new alert. Then select the saved user query. See the Queries topic for information on creating and saving queries.
  • In the Alerts Management window, select the recipients and the notification mechanisms, as well as the notification priority, in the same way as for predefined alerts.
  • You need to set the frequency for running the query (in minutes, hours, days, weeks or months). Unlike a predefined alert, a user-defined alert is not triggered when a document is added to the system. A user-defined alert is triggered when the query runs and if there are results from the query. If there are no results from the query, a notification is not sent.
  • If the frequency is days, weeks, or months you can additionally set a time of day.

Accessing the Query Results

User alerts display in the user's Messages / Alerts Overview window. The query results will show directly in this window, or you can double-click the alert row to see the results in a new window.

You can copy the results to Microsoft Excel if desired, by selecting Copy Table from the window's context menu.

User-defined Alerts - Save History Checkbox

  • For user alerts, there is a Save History checkbox in the setup window. This checkbox controls how user alerts are displayed to the user in the Messages/Alerts window.
  • If you select the Save History checkbox, a new alert message is added on a separate row each time the query runs and triggers an alert. This can quickly fill up the alerts window if the frequency of the alert is set to minutes. This is shown in the sample screenshot.
  • If you do not check Save History checkbox, each new alert will overwrite the previous alert on the same row in the Messages / Alerts Overview window, so you will only see one row for the alert. The alert will change to bold to inform the user that a new alert has occurred.

Writing Queries for User-defined Alerts

  • When you develop queries for alerts, you may need to consider matching the query to the frequency you select for running the query.
  • For example, if you want a report of new orders added for today, the query should only select documents added on the current day. Otherwise the report will include all documents in the database that meet the query criteria.
  • In such a case, the document posting date is compared to the current date.

Troubleshooting User Alerts

If the alert does not trigger:

  • Run the query independently to make sure it produces results
  • Make sure the SAP Business One alert service is running in the System Landscape Directory and the correct database is selected in the alert settings. Alternatively, make sure that in SAP Business One, in the General Settings window, under the Service tab, the Enable Alert Service box is checked.
  • For SAP HANA environments, make sure the Service Layer is active on the SAP HANA server. To check the Service Layer, use the url https://<server>:50000. If the service layer is installed you will see a link to documentation.
  • Run a query on the OALT table to see all the configured alerts on your system, including predefined alerts.

Summary

Please take a minute to review these key points:

  • There are two ways to use alerts: configure one of the predefined alerts or define a user alert based on a query.
  • All predefined alerts (with the exception of the Minimum Stock Deviation alert) have conditions and are triggered when an applicable document is added to the system. So alerts do not prevent documents being added to the system. In contrast, an approval process will prevent a document being added until it is approved.
  • Alerts can be sent internally to a user in SAP Business One, or can be sent by e-mail, text and/or fax.
  • The alert job service must run all the time so that alerts can be triggered. For SAP HANA, there is a dependency on the Service Layer being installed and bound to the database server.
  • User-defined alerts are based on saved user queries. User alerts provide a way to create routine task lists for users, or to check the consistency of data.
  • User-defined alerts are triggered when the base query is run, so you must set the frequency. An alert triggers only if the query runs produces results. The query results appear with the alert in the Alerts/Messages window.