Skip to main content

Notifications

What are Notifications ?

Notifications are used to notify users of events that occur in the platform. They are triggered by an action (create, update, delete) on a business object and can optionally have an execution condition in the form of an expression. They can be sent through multiple broadcast channels to multiple recipients. It's content is defined per language and can be overridden for a particular channel and/or recipient.

Configured recipients are concerned by all of the notification's channels or be set up individually for a more precise configuration per recipient.

Configuration

FieldDescription
NameUnique identifier
ObjectThe business object linked to the notification
ActionThe action that triggers the notification (create, update, delete)
ExpressionThe condition that must be met for the notification to be sent

In order to receive internal notifications, users must be part of the NOTI_USER system group.

Recipients

A named user of the platform

If the notification is not mandatory, recipients have the option to subscribe or unsubscribe from the notifications they receive (via the Subscriptions button on their notification list).

Channels

The counter of a bell icon visible in the platform's header is updated with each new notification. Notifications are stored in a system table

By default, notifications are sent through all configured channels to all configured recipients, but optionally, a channel can be limited to some of the configured recipients.

Using Notifications in code

preNotification hook

The preNotification hook is called before the notification is sent. It can be used to modify the notification's content or cancel the notification when an error message is returned.

public class MyObject extends ObjectDB {

@Override
public String preNotification(Notification notification) {
notification.addContent("ENU", "A new notification has been created");
return null;
}
}

postNotification hook

The postNotification hook is called after the notification is sent. It can be used to perform actions after the notification is sent.

public class MyObject extends ObjectDB {

@Override
public void postNotification(Notification notification) {
// TODO: implement
}
}

Manually triggering a notification

Notifications can be triggered manually by invoking the push method of the NotificationTool class.

public class MyObject extends ObjectDB {

public void customTriggerMethod() {
Notification n = this.getNotification("MyNotification");
NotificationTool nTool = new NotificationTool(n);
nTool.push(this);
}
}

End-user features

  • Users granted to the NOTI_USER group have access to a Notification shortcut that can be pinned to the platform's header.

  • When clicking on the bell icon, the list of notifications is displayed.

  • Notifications can be discarded by clicking on the Check button on a line or by clicking the Mark all as read button.

  • When clicking on a notification, the linked record is opened.

  • The Customize button allows to subscribe or unsubscribe from notifications :

    • Users can only unsubscribe from non-mandatory notifications (configured at the broadcast channel level)

Read more