Push notifications are an efficient way to deliver real-time messages and alerts directly to a user’s mobile phone or desktop device via their chosen web browser. This feature allows applications to engage users with timely updates or important information, ensuring effective communication without requiring users to actively check for updates.
Push notifications are messages that appear in the notification bar of a device, even when the application is not actively in use. These notifications can target a specific user or all users within the same tenant by leveraging the PushNotification Rule. This rule allows the sender to define specific parameters to tailor the notification content and delivery.
Push notifications can be utilized for various scenarios, such as:
The push notification feature uses SignalR technology to deliver messages efficiently. SignalR is a robust and open-source library for Microsoft ASP.NET that enables server-side code to send asynchronous notifications to client-side applications in real time. With SignalR:
By integrating this feature into an application, users benefit from seamless access to live data, ensuring a smooth and interactive experience.
Push notifications are a powerful tool for enhancing user engagement and ensuring critical information is conveyed promptly.
Notifications can be sent using two primary methods:
Users can configure notifications through the PushNotification Rule within a form. The rule triggers notifications based on specified events or control actions. Here are the details:
Once configured, the form can be rendered, and notifications can be sent to specific users, groups, or all users within a tenant.
Fig 1: Syntax of PushNotification Rule
Push notifications can also be initiated using an API. This allows external systems to send notifications.
For details on how to configure push notifications with API, please contact AppForms Support at mailto:[email protected]
Note: Use Token-based Authentication for Forms Authentication and Basic Authentication for Windows Authentication sites.
Fig 2: Items in Notification Settings
3. Notification Settings Features:
Notifications can be sent to a single user, multiple users/groups, or all users within a tenant. Initiators can send notifications using either the PushNotification() rule or by making an API call. The rule parameters include AssignedTo, Message, Title, Icon, and HideFromNavigation, as explained in the previous section.
To send notifications to specific users, the list of recipients should be provided in the AssignedTo parameter of the PushNotification() rule.
Examples are shown below:
Fig 3: Notification to Specific User(s) – Case 1
Fig 4: Notification to Specific User(s) – Case 2
To send notifications to all users within a tenant, the value “Everyone” should be specified in the AssignedTo parameter of the PushNotification() rule.
Fig 5: Notification to All Users
In addition to regular visible notifications, notifications can also be sent as client-side notifications that are not displayed in the navigation menu. To achieve this, set the HideFromNavigation parameter to true in the PushNotification() rule, as shown below:
Fig 6: Hidden Notification
This hidden notification type is useful for triggering the NotificationReceived event, enabling the execution of specific business logic.
To receive notifications, the receiver must enable the notification bell icon as described in the “Designer Part” section above. When the receiver is actively using the web part or workflow dashboard page, notifications will be delivered instantly. If the receiver is not logged in at the time the notification is sent, they will receive it upon their next login, and the notification will be updated accordingly.
A bell icon with an alert and count will appear in the global header when a notification is received. Clicking on the bell icon will slide down a popup displaying the latest notifications. At the bottom of this section, a “View All” hyperlink is available for accessing the complete notification history.
Fig 7: Notification Popup
Fig 8: All Notifications Popup
Fig 9: All Notifications Popup with Delete Option
Notification Types
In addition to the notification popup, there are two additional ways to display notifications:
Fig 10: Glimpse Notification
Notifications are sent to the user in the form of desktop or background alerts. The user interface of these notifications depends on the browser in which the user is logged in.
Fig 11: Background Notification Received by a User in Chrome Browser