User specific push notification in MFP

0 votes
Hi All,

I am trying to send a user specific push notification in IBM MFP build and getting below response

   "isSuccessful": true,
   "result": "No subscription found for user :: UX_G_A"

I am able to get broadcast messages in device, but not able to get user specific messages. Can anyone help on this?

, 269 views Last updated : Feb 20, 2018

1 Answer

0 votes

notifications can be either polled from the back-end system, or pushed by one. In this example, a submitNotifications() adapter function is invoked by a back-end system as an external API to send notifications.

function submitNotification(userId, notificationText) {
	var userSubscription = WL.Server.getUserNotificationSubscription('PushAdapter.PushEventSource', userId);
	if (userSubscription === null) {
		return { result: "No subscription found for user :: " + userId };
	var badgeDigit = 1;
	var notification = WL.Server.createDefaultNotification(notificationText, badgeDigit, {custom:"data"});
        WL.Server.notifyAllDevices(userSubscription, notification);
return {
		result: "Notification sent to user :: " + userId
For more go to the following link
answered Apr 23, 2017 by muneshs16

Related questions