Home Forums Presentation UI Events Trigger a notification on button click

Viewing 2 reply threads
  • Author
    Posts
    • #12166
      Aditya PhatakAditya Phatak
      Participant

      Hi,

      We have a requirement to trigger a notification rule (In-app/Email) when a certain type of user clicks on a button. The usual approach would be to trigger a UI Event to set an attribute on the class which can be used in rules criteria to generate notifications.

      However while I was searching through the model, I found some events listed in SysNotification class (changeSet and send) which needs the parameters: key, user, payload and seem to be doing the exact same work of triggering a push notification.

      Not sure of how or if the class events can be utilized and whether this has been implemented anywhere currently.

      Can someone please guide me through how to implement it? If it is not feasible, is the usual approach mentioned above suitable?

       

      Regards,

      Aditya Phatak.

      0
    • #12186
      Atulan ZamanAtulan Zaman
      Participant

      Hi Aditya,

      Notifications don’t have to be configured through rules. They can be created in the server for specific users, and they will automatically receive the notification. Unless the requirement has to be implemented through rules, you can simply a bind the button with an UIEvent and make a server invocation and create the notification instance in the model event. You can use the CUDNotification’createFactory API to achieve that. For example:

       

      Thanks,
      Atulan

      0
    • #12196
      Aditya PhatakAditya Phatak
      Participant

      Hi Atulan,

      The drawback using the CUDNotification is that we cannot configure the criteria/recipients at runtime like we do from Rules. I was looking for a flexible option to just trigger the notification rule from UI Action if at all feasible.

       

      Regards,

      Aditya Phatak

      0
Viewing 2 reply threads
  • You must be logged in to reply to this topic.