Notifications system: Real-time events & notifications (v.23)

Starting from version 2023, the notifications system in ERP.net has been improved significantly. Notifications in ERP.net aren't something new, but they're now a core part, deeply integrated with Social ERP.

Additionally, there's now a distinction between a notification as a persistent object in the database and a real-time event as a "live message".

ERP.net notification system

This is a general term that summarizes the ability of ERP.net to create, manage and send (live) notifications. It also provides a public access to the so-called notifications framework, so this way you can create (and send) a notification by yourself. Programmatically via Domain API.

Without going into too much detail, here are some of the key points:

  • A centralized system for persistent and live non-persistent notifications on the fly.
  • Deep integration with Social ERP.
  • Improved persistent notifications - support for new notification classes.
  • A whole new set of business rules, managing social interactions.
  • Receive real-time events anywhere - both in the desktop client and in the web client.
  • Ability to create notifications programmatically.

One moment.

You're talking about real-time events and notifications. What exactly is the difference?

Real-time event and notification. The difference

Notification

ERP.net notification is an entity, part of the communities namespace. It's just a persistent object, saved in the database.

This isn't something new, it existed before. Here's an example of one notification:

notification.png

This is a single notification with its attributes.

Notification classes

A more special notification attribute is the "Notification Class". It's used to classify the notification type (i.e., its notification class).

This attribute is not introduced now, but the new thing is that it's now actively used. Here are some existing notification classes:

  • NT_SOC_NEW_POST - notification of a new post or comment in an object you follow.
  • NT_SOC_REPLY - someone replied to your comment.
  • NT_SOC_REACTION - someone reacted to your comment (i.e., liked it).

The full list of notification classes is available in our documentation,

https://docs.erp.net/tech/modules/community/social-interactions/notifications/index.html#notification-classes

Real-time event

As a user experience, the real-time event is also sort of notification. But there's one significant difference.

The real-time event is a non-persistent object. It exists for a limited time, just to notify you about something.

The real-time event MAY contain a (persistent) notification. Like this,

notification-toast.png

This picture shows a toast in the ERP.net web client. This toast represents one real-time event. And in this case, the real-time event contains (i.e., its payload is) a notification. Actually, this is the same notification, shown above.

But the purpose of real-time events goes far beyond simply carrying notifications. Take a look at this one,

Real-time event

Yes, this is also a real-time event, but it notifies you of something else- there will be a system shutdown.

The real-time event possibilities don't end here. There's a variety of types such as:

  • Activity reminders
  • Incoming email and calls
  • Warnings and system messages

For more information, refer to our documentation,

https://docs.erp.net/tech/advanced/concepts/real-time-events.html

Developers

It's possible to create a notification yourself via the Domain API. This way, your external applications can go to an entirely new level. I.e., to create user interactions.

Here's just a crumb- an example Domain API query, creating a notification:

POST ~/api/domain/odata/Crm_Customers(79f3f74e-098a-4d91-9714-c4f845c2dc62)/CreateNotification

{
"user": {
"@odata.id": "Systems_Security_Users(9da64839-a8d0-491d-aebb-4d18fa42b014)"
},
"subject": "Hello"
}

Or in other words,

Create notification about a customer and send it to the specified user.

Something more. In addition to creating a notification, a real-time event, containing this notification will also be created so the target user will see it immediately (of course if is logged in).

You can find more information in this separate dev topic,

https://docs.erp.net/dev/domain-api/common-tasks/create-notification.html

 

---

More information is available in our official documentation:

https://docs.erp.net/tech/advanced/concepts/real-time-events.html

https://docs.erp.net/tech/modules/community/social-interactions/notifications/index.html

https://docs.erp.net/model/entities/Communities.Notifications.html

https://support.erp.net/hc/en-us/articles/6016788601372

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk