SBOhub Search

Setting Up Alerts in SAP Business One

Alerts are a great way to keep people informed on important things happening within the SAP Business One system. Alerts are powered by saved SQL queries in the Query Manager. Good uses for alerts are sending daily reminder reports, data validation, or conditionals.

If you'd like to learn more  how these alerts work from a user perspective check out our previous post on "Using Alerts in Sap Business One."

Preparing an Alert Query

We are going to be setting up an alert to notify a group of users when a sales quotation has been added to the system over $5,000. We will be using the query below so copy the query into a query window and save it. Name the query "Quote Entered Over 5000".

SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[DocTotal], T0.[GrosProfit], T1.[SlpName], (T0.[GrosProfit]/ T0.[DocTotal]) AS 'GP%' FROM OQUT T0
INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode
WHERE T0.[DocDate] = CONVERT(CHAR(8), GetDate(), 112) AND T0.[GrosProfit] <> 0 AND T0.[DocTotal] > 5000

The key to writing a good alert query is that the results must be relevant. We want to know within a reasonable amount of time when we have a big deal come in so we can make adjustments quickly to win the sale. In this case, the alert query is written to show quotes created today only. If you are good with Microsoft SQL you can write some very creative alerts.

Setting Up Alerts

Alert Setup Window
Alert Setup Window

To begin, navigate on the SAP Business One main menu to Administration -> Alerts Management. You will be presented with the screen for setting up an alert. The setup window will open up in "Find" mode so you must click the "Add" icon on the main icon toolbar at the top of the screen.

Enter a name for your alert in the name box. This will serve mainly as the title of the alert that the user will see in their "Messages/Alert Overview" window. Name the alert "Quote Entered Over $5,000". Click on the button labeled "Open Saved Query". Here is where you will select your saved query to use in the alert. The "Query Manager" will open up and double click on "Quote Entered Over 5000" query. Now you have added a query to the alert.

Select the priority drop down box and choose your priority. High will accompany each alert with a red exclamation mark in the alerts window. For this example, we are going to choose high because this alert is important to us. Then we set the frequency of which the alert will run the query to see if there are any results. I'm going to set this query to run every 10 minutes. You can set the frequency as small as 1 minute, but excessive alerts can cause performance issues.

Now we are going to select the users that will receive the alerts if the query finds records to report. Check the boxes next to the user and select which contact methods you want to use. The "Internal" option is best for people that use SAP B1 all day as this will notify the user inside the client. Use email, fax, or SMS for road users.

Complete Alert Setup
Completed Alert Setup

The "save history" check box will produce a new alert message every time the query is run with records found. Without the box checked it will overwrite the previous alert in the messages/alert window. I don't usually use this option. I find that overwriting the messages is better for organization purposes.

Select the "Active" check box to make sure the alert is running and click the "Add" button. Your new alert is now completely setup. The next time a quote is entered into the system over $5,000 the selected users will receive their alert in the "Messages/Alert Window".

Stock SAP Business One Alerts

Open up the "Alerts Management" screen again by navigating to Administration -> Alerts Management. This screen works like many other SAP B1 forms by being able to cycle through the alerts you have setup. Click the right green arrow on the icon toolbar to see the available stock alerts that come pre-installed. These work a little differently as they have custom SAP programming that allow you to do some interesting things. Check them out and see how you might be able to employ them in your business. The available stock alerts are:

  • MRP Recommendation Due
  • Deviation from Budget
  • Deviation from Discount (in %)
  • Deviation from % of Gross Profit
  • Deviation from Commitment Limit
  • Deviation from Credit Limit
  • Minimum Stock Deviation

Alert Query SQL Ideas

Here are a few ideas to get your started on thinking about how you can utilize SAP Business One alerts in your business.

  • Orphan Purchase Order/Request Report - if a sales order is canceled then this alert will notify the purchasing department so any PO's or PO Requests can be canceled as well.
  • Past Due Document Report - this alert can trigger if an order has not been delivered in a certain amount of time.
  • Marketing Documents with Missing Tax Codes - if you are planning on automatically assigning tax codes this alert will help you track down the problems.
  • Orders Tagged With Dropship Shipping Type In Standard Warehouse - If the order is designated as shipping via dropship and the item rows are coming out of your main warehouse this can cause major inventory issues.

Feel free to ask questions or comment with your ideas for SAP Business One alerts!

Author Info

Peter Canale
Peter Canale Follow Connect

Co-founder of SBOhub, starter, experienced executive, and probably having the best day ever.


  • Tom F

    Hi Peter

    Thanks for the well-written article, really useful. It’s great to have some easy to understand guides on SAP B1 out there.

    One quick question:

    When does an alert in SAP B1 get triggered, I assume it’s when the query (linked to that alert) returns any results?

    How often does SAP attempt to run this query and check for a result? I.e. in your example above, how long after the sales quote of > $5,000 was added, would the email get triggered?

    Many thanks,

    • Peter Canale

      Hi Tom – thanks for the nice comment. The alerts setup like this will run on a time based schedule that you set in the alert. When the timer is reached it will run the query. If there are records found it will send an alert using the data in the query. As you noted, if there are no results then no alert will be triggered.

      I have since created a new way of doing this which is much more complicated but works much better. Maybe I’ll sit down soon and write it out.

      Thanks! Peter

  • thiri

    Thanks for your nice contribution. I did create a user defined alert as your way. It emailed me the result. But the problem is that it is not complete result. I mean my query result is 714 rows count but the alert message contains only 141 rows. What could be the issue?

  • Azra Cader

    Where can I see the alerts in the system.
    I did not get the email.what could be the problem?

  • Jose Angel Labbad

    Hello Peter, great post, loved it!

    I already made my query, it runs good on Query Manager and always shows about 13 rows. Then i define my alert via email, but it doesn’t work. I never receive the email… There are other alerts defined that sends email without problems.

    Do you have any idea or suggestion to check in order to solve this problem?


  • Febrianto

    Hello Peter , Great Post..

    I have any question,How to change the sender’s name on the email? My client don’t want to show as ‘Server’ as the sender’s name.

    Thank You