Through the Alerts functionality, SocrateCloud provides a flexible notification mechanism that can be used to alert users when certain events take place. The alerts should be defined by a user with SQL knowledge, due to the fact that the event trigger is defined as specific information within the database.
The example in the screenshots below describes an alert used to send email notifications for invoices due for more than 10 days.
Defining alerts is done using the Alert window ,located in the Performance Measurement menu. The following fields are available:
Name, Description, Comment
Active - only active alerts will be processed and as a result, only for active alerts emails will be sent;
Valid - only active valid will be processed and as a result, only for active alerts emails will be sent. By default all alerts have Valid checked;
When processing the alerts, if the system finds any errors it will automatically uncheck the box;
Alert processor - contains parameters used to process the alerts and send email notifications. It is also responsible with validating the alerts;
Enforce Role Security - if checked, access to system data will be granted depending on the selected role.
Role - is used to define access to data. Notifications will display only data to which this role has access;
Alert Subject - text used for the notification email subject;
Alert message - text used for the notification email body. The alert data will be added after this text;
An alert can have one or more rules based on which notifications are sent. We recommend that only one rule is defined per alert in order to prevent mixed notification data. Alert Rules can be managed in the Alert Rule tab. The following fields are available:
Name
Active - only active rules are processed and used to send notification emails;
Valid - only valid rules are processed and used to send notification emails. By default alert rules have Valid checked;
When processing alerts rules, if the system finds any errors it will automatically uncheck the box;
An alert rule becoming invalid will lead to the the alert also becoming invalid;
Error Message - the field will only be available if an error was registered when processing the rule and will display the corresponding error message;
Post Processing (not available due to security issues)
SQL Select - contains the names and values that will be presented within the notification:
in the example above the following values are displayed: number of due days, business partner, currency and due amount;
Table - the queried table or view. Role security will apply;
SQL From - data source for the SQL query;
SQL Where - contains the conditions for sending notifications;
in the example, the number of due days past the due date for invoices must be greater than 10;
Other SQL Clause - is used to order for the notification data;
in the example the data is ordered by number of days, decreasing;
Post Processing (not available due to security issues)
Additional SQL syntax rules by SocrateCloud:
keywords must be written in UPPERCASE;
the JOIN prefix must always be written: LEFT OUTER, RIGHT OUTER, FULL, INNER
SELECT ...
FROM... INNER JOIN ... ON (...)
WHERE
ORDER BY
the names of tables/columns mus be written in SmallTalk (ass defined in the application dictionary);
the security parser is based on uppercase letters;
the *= =* cannot be used for join.
For a notification to be sent, one or more recipients need to be defined. The Alert Recipient tab is used to manage the recipients. The following fields are available:
Role - notifications will display only data to which this role has access. For a role the following options are available:
User - if selected, the email will be sent to the specific user;
In order to send notifications to multiple users, a record needs to be defined for each user;
Obs: in order to receive e-mails an user should have the "E-mail" value selected in the "Notification type" field;
Send mail to role users - if selected, the email will be sent to all the users to which this role was assigned;
The Alert Processor contains the parameters used to process the alerts. Alert processors can be managed in the Alert Processor window, located in the System Admin > General Rules -> Server menu. The following fields are available:
Name, Description, Active
Schedule - the execution schedule which indicates running frequency;
Supervisor (not implemented) - is used for forwarding and escalating issues for this user - or for approvals;
Days to keep Log - indicates the number of days for which logs will be kept (in the Log tab);
A process can only be run after resetting the application server. Monitoring SocrateCloud Processors can be done using the Service Monitor window from the Tools menu.
For the example display will contain the following information:
The following invoices are due for more than 10 days:
#63: ------------------
DAYSDUE = 202
BUSINESSPARTNER = TOTAL SRL
CURRENCY = RON
OPENAMT = 18927.36
------------------
DAYSDUE = 195
BUSINESSPARTNER = ABC SRL
CURRENCY = RON
OPENAMT = 1530.85
------------------
DAYSDUE = 165
BUSINESSPARTNER = EUROSPORT LTD
CURRENCY = EUR
OPENAMT = 900
------------------
...