Building the "Order Management" Training App : Creating in-app notifications
Prerequisite : You have a basic understanding of the Simplicité platform, and the steps in "2. Expanding your app" are completed
What are Notifications?
Notifications allow to alert users, via different channels, when an event linked to a business object occurs... Learn more
Creating a notification for a Validated Order
To create a notification for a Validated Order, follow the steps below :
- In the User interaction > Notifications > Notifications menu, click Create

- Fill in the Notification fields like so :
-
Name : TrnOrderValidated
-
Object : TrnOrder
-
Action : Update
-
Expression :
[OLDVALUE:trnOrdState] == 'P' && [VALUE:trnOrdState] == 'V'Configuration

-
- In the Broadcast channel panel, click Create

- Fill in the Broadcast channel fields like so :
- Channel : Internal
- Click Save & Close
- In the Content panel, click Create

- Fill in the Content fields like so :
- Language : English
- Subject : empty (corresponds to the subject of an email or the title of a Web Push notification)
- Content : The order [VALUE:trnOrdNumber] has been validated
- Click Save & Close
- In the Recipients panel, click Create
- Fill in the Recipients fields like so :
- Order : 10
- Type : Group
- Group : TRN_SUPERADMIN
- Click Save & Close
Adding the NOTI_USER group to the TRN_SUPERADMIN profile
To add the NOTI_USER group to the TRN_SUPERADMIN profile, follow the steps below :
- In the Users and rights > Groups menu, open TRN_SUPERADMIN
- In the Profile members panel, click Create

- Select the
NOTI_READERgroupIf the
NOTI_READERgroup isn't visible, remove the Module filter - Click Save & Close
Testing the notification with usertest
- Clear the platform's cache and log in using
usertestFor a detailed step-by-step, see : Testing the User
- Pin the Notifications counter in the platform's header

When validating an order, the notification bell in the platform's header is updated

The notification is displayed when clicking on the bell
