Manage Telerik backend push notifications based on data - push-notification

I've been going around in circles today trying to figure out the best approach, but I'm still lost. Hoping someone here or the Telerik forums has the answer.
My user has a group of records with dates. I need to send a single push notification to the user for each unique date in that data.
I can create this push notification on the client side (appbuilder hybrid app) when a record is created. However, the client sdk for notifications only exposes create, not read or delete. That means -
I can't make sure there's only one notification per device, even if there are multiple records with the same date.
I can't change/remove the existing push notification if the date in a record is changed.
I thought about using Telerik Cloud Code for Data... But the sdk doesn't expose read/delete. I'd have to read all notifications for that User Id from the REST service and then determine which need to be updated/removed. That sounds like a mess of code for a scenario which I would consider somewhat normal. I'm also concerned about timing out, since there's a 5 second limit on cloud code for data.
So, what's the best way to manage my push notifications in Telerik backend services?

The question was answered in the Telerik Developer Forums here -> link

Related

Send push notification to people nearby through Firebase Cloud Function without manually managing push tokens?

Seems like majority of solutions here require the developer to manually save each user's push token in addition to Firebase saving these tokens as well, then iterate through these and send out notifications. This is not really desirable since I would be storing push tokens in two separate places and need to make sure their lifecycle management is synchronized, which is error prone 😒Is there a better way?
Some options I considered:
Give each user a person/unique topic, then map out a geolocation per topic; then filter through these locations, aggregate these topics into batches of 500 and send a push. This is probably the best option so far πŸ€·β€β™‚οΈ but seems like a silly use of topics API.
Bucket users in cities, with each city corresponding to a topic; then find all cities near a location, and send a push to those topics. This is doable, but lots of complex city mapping code without much flexibility (vs. considering a simple radius).
Manually store push token β†’ user β†’ geolocation; filter out the ones you want, then send a push to the token specifically. This is problematic for many reasons (multiple device management, push token lifecycle management, data duplication, etc.)
Ideally, there is a way to send out a push notification to a list of user IDs, without even touching push tokens, is there a way to do this?
The only way to associate a device token to a user ID is to store that mapping yourself. You should also assume that one user could have multiple devices. FCM doesn't have a concept of a "user". It only knows device tokens. Your app has to bring the concept of a user, then map that to tokens in code.
Note that any messaging solution that requires topics is not "secure". Anyone can effectively receive messages from any topic.

FCM: where best to retrieve data displayed in the notification?

I have an app where I have set up some triggers using Firebase Functions. Those triggers will send push notifications to a set of users when they go off. The notification will display some information based on the trigger that could involve getting data from one or more collections based on ids.
I now see two options:
I could retrieve the data that will be displayed in the notifications on the server side in the trigger function and send it in the notification data payload, or
I could just send the ids through the notification data payload and do the retrieval of the displayed data on the client side in onMessageReceived() before building the notification that is ultimately displayed
Is one option better than another? What considerations should I take into account for either option?
Thanks in advance for your advice.
I believe that the first option makes more sense, since the server side function is perfectly capable of performing the complete operation all by itself, and would probably be more performatic with it.
Not to mention that, if your are using Firestore for example, you would only make one read per notification, instead of two with the second option.
Another final point to be considered that advocates for the first option is that the network may fail in the middle of your operation, and the notification would either be showned incomplete, or you would have to treat any errors it might generate on the client side, if you do it all on the server side, you can simply not send a "error notification" to your users and retry the operation.

Architect website/mobile notifications generated by users activities

I am working on a mobile application, this application has some features like users can follow each others, adding comments or reviews, like something .. etc.
So the requirement is we have notifications icon in the app, when the user click on it a list of notification will show up, taken in consider those notifications should be real time.
Many things comes to my mind will reviewing this feature, like using firebase to send the notification, or I can develop internal notification service for this purpose.
The question is what do you suggest guys, do you think using firebase is a good idea for such case? or there is something else you recommend for such case
Thank you in advance.
You can try signalR more manageable than firebase but you need to know programing to manage signalR

Firebase: action after read child

I'm working on project that sell unique soft products like serials or tickets. To be fast and reliable, we going to use Firebase Real-time Database.
The problem is I want to remove or update the sold ticket after the user get it.
One way to do so is using another server to do so manage the tickets and update the Firebase Database using REST API, but I want to do it with the Firebase only.
Another way to do it, after the user get a ticket, the client side app will sent a remove request. But I'm afraid of losing the data in the middle of this process. A user got a ticket but never removed from the database. As I said the ticket is unique.
How to do it with Firebase side only?

Better way to notify the users about workflow items

I want to notify the users about their assignment list/status of their work items via notification.
Instead of sending email notification, is it possible to show the notifications in Tridion itself? Say for example: having new item like "Notifications" under shortcuts-->mytasks?
Or is there any better way to notify the users apart from email communication, because the users dont want to receive so many mails in their mail box.
Yes. The list of items shown shortcuts is extendable, just like every other list I've ever looked at in the Tridion GUI.
Have a look at this blog post from Jaime to get started. The topic of how to extend is was also covered in this question, but Jaime's tutorial is probably a better starting point.
Once you get some experience with writing this extension, you'll probably run into questions similar to the one Nuno asked here (and that was answered expertly by Jaime and Boris).
In general I like to think of workflow notification in two broad groups - Active and Passive. Under active notifications, I really only include email notification, but you could expand the concept to push notifications to an iphone app or send a text message etc. When considering active notifications, it is very common for users to get fed up of having too many alerts from the system, so it is important to design it in a flexible way that allows your users to not feel bombarded with alerts. The most successful implementation I have implemented allowed users to say how often they receive notifications. Typically they set this to every 24 hours, and they receive a summary email of their pending assignments each morning. This allows users who are very active and use their task list regularly to never receive emails, as they normally get to the items before the following day.
Moving to passive forms of notification, if you keep in mind that you can expose a user's task list using the API's the SDL have provided, you could think about implementing the following forms of passive notification:
Create an RSS feed for the Users's assignment list
Create a Widget/Portlet for a company intranet to show a user their assignments
Create some kind of desktop or mobile app which can pull the data
Set the default start screen of the CMS to be the Task List rather than the Dashboard
The last of these options has been an "out of the box" offering from Tridion for a long time (but I think it was dropped by mistake at some point with Tridion 2009 or 2011. However, #Alvin has recently answered one of my other questions, which may help solve this issue (although it may not be supported). Essentially you can set the <defaultpage> node in the CME.config to /Views/Dashboard/Dashboard.aspx#locationId=cme:workitems. This will make the UI automatically open on the work list (BUT I REPEAT... THIS MAY NOT BE SUPPORTED).

Resources