Custom Notifications feature allows setting up application data queries, which will trigger automated email notifications when the predetermined conditions are met. This feature is especially useful for tracking system entries and notifying users based on a set of conditions.
Let’s take a sales quoting application. This application generates a sales quote based on items selected and amounts entered.
Generated records are then assigned to a manager user for approval. As you can imagine, it might become challenging to track unapproved quotes in the system. In this scenario, custom notifications can be used to remind the managers if there are any pending requests. To do this, we need to setup custom notifications in accordance with the date and status requirements and set a time interval for the system to check application data.
When a quote is submitted, the action button assigns the record to a specific user – in this case, the “manager” user. The manager then has to review the record and switch its status to Approved. There are currently 6 records entered at different dates for this application and some haven’t been approved yet.
The notification rules can be set up from the Custom Triggers page which can be accessed by pressing the button with the same name on the Data page.
This page will give you a list of all active notification rules. Click Add Custom Notification to add a new rule.
Adding a new custom notification will display the Add Custom Notification section on the bottom of the page. Here, you can set the email properties, rules which will trigger the notifications, and select an interval.
The Notification Name is a friendly name which will help you identify the notification and will not be visible to the end users. The email we’re intending to send is targeted to our “manager” user, so we selected the “manager” user as a static target for the Recipients. The email body explains the requirement and contains dynamic links to the record in question, as well as a link to the SpreadsheetWEB Control Panel, where the user can review and approve the quote.
Next, we need to configure the rules. We want to notify our user if there are any records that haven’t been approved, and older than 30 days. The first dropdown on the left of this section allows you to select from system fields, as well as application fields that have been defined in the database manager. We want the system to look at 2 factors, and send an email if both conditions are met. We can first select Date for the date comparison, and then select the logic operator in the next dropdown as older than (days). Finally, we enter 30 into the last field to setup the first rule. Then, we need to add another rule by clicking Add rule. This will add another rule in the same line as the first one, and here, we need to select Status Index for the data field, less for the logic, and finally 2 for the status index. Make sure that AND is selected from the top left (light blue highlight is your selection). The rule we’ve defined here will look like below.
You can find the Status Index when you click the Status Colors button on the Data page. SpreadsheetWEB considers the index of the first status listed here to be “0”, so the third status listed here in our example corresponds to “2”.
Finally, we determine the time interval at which the system will check the data for this application and send out the email notifications. Run Only Once means that the system will only run this job once, and send out emails for all matching conditions. Since we want this to be recurring process, we select Recurring Job and set the times. The selection above means that the system will check these parameters everyday at 3:00 AM local server time, and send out emails for all matching records. This can mean that multiple emails can be sent the next day, if the status of the records do not change. Let’s review the scenario we’ve created.
Given that today’s date is 1/17/2019, there are 2 records that match our criteria – The X Trade and XYZ Industries quotes. Neither have been approved, and both have been created over 30 days ago.
Note that 2 emails will be sent in this case – one email for each record that satisfies the conditions. The manager can click the links from the email to view the specific records and go to the Control Panel.