Notifications

From EFrontWiki

Notifications allow for the creation of custom communication emails to selected users, triggered on a wide range of predetermined events.

eFront comes with default notifications concerning basic events of the system.

Notifications list
Notifications list

Contents

[edit] Edit notifications

The administrator is able to edit and activate/deactivate notifications at will.

Administrator can select from a range of events that trigger notifications, as well as, the text subject/body and its language.

When selecting a language, the message is created below each language tag, sending it out to all users using that language. If a user's language is not defined or no tags are used, then the default message (the first one on the top that has no tag) is used.

Edit notifications
Edit notifications

[edit] Periodically send pending notifications

Pending notifications can be easily set to be sent periodically via a system call. Below, we explain how to use linux's crontab to have notifications sent over a period of 30 minutes.

1. Create a file called 'crontab_notifications.php' and place it in a place accessible by the web server
2. Paste the following data inside this file:

<?php
$_SERVER['HTTP_HOST'] = "efront.example.com";
include "send_notifications.php";
?>

The $_SERVER['HTTP_HOST'] should be set to whatever your installation's main url is, excluding the 'http://' from the start, and any additional path to the end. For example, if you are accessing your efront installation from http://efront.example.com/efront/www/, the this setting should be 'efront.example.com'
3. execute the command "crontab -e" as root, to edit the crontab file
4. Place the following lines inside your crontab file:

MAILTO=mymail@example.com
*/30 * * * * /usr/bin/php /path/to/crontab_notifications.php

Where /usr/bin/php is the path to the php executable
5. Save the crontab file and exit. Now, you should be getting an email every 30' from cron notifying you that the job was run successfully and any pending messages in the "messages queue" will have moved to "Sent messages"

More information on crontab can be found here

[edit] Commercial Editions

Commercial editions of eFront, allow for the creation of customized communication emails, in addition to the default notifications.

[edit] Add notifications

The administrator is able to create notifications concerning dates or events.

Creating a notification based on a date enables the adjustment of its frequency. When selecting to send the notification periodically, you should define the desirable period of time.

Notification on date
Notification on date

To add an event notification, first select the relevant event from the list:

Notification on event
Notification on event

The next step is to define the users who will receive the new notification based on specific criteria set. Finally, you are ready to compose the notification message.

Notification message
Notification message