I have configured multiple rules to send push notifications to multiple users with no limit (because push notifications does not provide any limit how much notifications system send to user). I would like send push notification to particular user with limit of 4 notification for some extent of time. If user get lot more notification he remove app from mobile or frustrate. Anybody have any idea how this can be achieved.
1 Answer
A simple way to do this is to add a user field. This field will keep track of the number of push notifications sent and will increment every time you send a new push notification to the user.
In your rule, add a condition that checks the value of the field and execute the actions if value <= 4. Then, in the action part of the rule, increment the value of the field by one.
-
-
-
But also need to set time limit where within one hour 4 push notifications would be sent. Over it can send after one hour or two hours per user / token. Commented Aug 6, 2015 at 10:32
-
You can set a cron job or a rules scheduler to reset the value of the field to 0 every X hours– MikeCommented Aug 6, 2015 at 10:52