cancel
Showing results for 
Search instead for 
Did you mean: 

Launchpad Notification without navigation action (click event) not possible

jreimann
Participant

Hi community,

we send notifications from our NodeJS application to the Launchpad service. As we only want to give the user an information that a backend task was whether successful or not, we don't want to have a "click" event on the navigation list item.

Do you have any information about how we can achieve that the notification isn't clickable? Or is this a use case which shouldn't be possible by design?

So it shouldn't be possible to click here.

The notification type looks like this:

{
    "Templates": [{
            "Subtitle": "",
            "TemplateGrouped": "Template Grouped Text",
            "TemplatePublic": "Der Job '{{jobName}}' wurde ausgeführt.",
            "TemplateSensitive": "Der Job '{{jobName}}' wurde ausgeführt.",
            "TemplateLanguage": "Mustache",
            "Language": "de"
        }, {
            "Subtitle": "",
            "TemplateGrouped": "Template Grouped Text",
            "TemplatePublic": "The job '{{jobName}}' was performed.",
            "TemplateSensitive": "The job '{{jobName}}' was performed.",
            "TemplateLanguage": "Mustache",
            "Language": "en"
        }
    ],
    "Actions": [],
    "NotificationTypeKey": "jobPerformedNotificationKey",
    "IsGroupable": true,
    "NotificationTypeVersion": "0.1"
}

The notification we send looks like this:

{
    "OriginId": "my-origin-id",
    "NotificationTypeId": "<some-guid>",
    "NotificationTypeKey": "jobPerformedNotificationKey",
"NotificationTypeVersion": "0.1", "Priority": "None", "NavigationTargetAction": "", "NavigationTargetObject": "", "Properties": [{ "Key": "jobName", "Language": "de", "Value": "MyJob", "Type": "String", "IsSensitive": false }, { "Key": "jobName", "Language": "en", "Value": "MyJob", "Type": "String", "IsSensitive": false } ], "Recipients": [{ "RecipientId": "my.email@random.com" } ] }

The properties which are responsibile for the navigation of the press event of the notification list item are NavigationTargetAction and NavigationTargetObject of the notification we send.

When leaving the properties empty...

"NavigationTargetAction": "",
"NavigationTargetObject": "",

...the click event of the notification list item routes the user to the launchpad homepage no matter which app he has opened.

When setting the properties null or undefined...

"NavigationTargetAction": null,
"NavigationTargetObject": null,

...the click event of the notification list item tries to route the user to a #NTA-NTO site and an error occurs since this site does not exist.

We called the v4/NotificationService.svc/Notifications endpoint to find out more about the notifications which are displayed:

{
    "@odata.context": "$metadata#Notifications",
    "value": [{
            "Id": "<some-other-guid>",
            "OriginId": "my-origin-id",
            "CreatedAt": "2022-10-18T13:16:20.492Z",
            "IsActionable": false,
            "IsRead": false,
            "IsGroupable": true,
            "IsGroupHeader": false,
            "NavigationTargetAction": "",
            "NavigationTargetObject": "",
            "NavigationIntent": "navigationIntent",
            "NotificationTypeId": "<some-guid>",
            "NotificationTypeKey": "jobPerformedNotificationKey",
            "ParentId": "<some-guid>",
            "Priority": "NEUTRAL",
            "SensitiveText": "The job 'MyJob' was performed.",
            "Text": "The job 'MyJob' was performed.",
            "GroupHeaderText": "",
            "NotificationCount": 0,
            "SubTitle": "",
            "NotificationTypeDesc": "Leave request app",
            "Actor": {
                "Id": null,
                "DisplayText": null,
                "ImageSource": null
            }
        }
    ]
}


We thought that maybe the property IsRead has something to do with type of the notification list item (if it's clickable or not). So we set it to true in our notification type. But it had no effect on the notification list item.

At this point were also wondering why the NotificationTypeDesc property has the default value "Leave request app" as we don't set in our application. Shouldn't it be empty?

Thank you & kind Regards
Johannes

0 Kudos

The same question happened to me. Hope someone to give an answer.

jreimann
Participant

I created an incident. When I get feedback, I'll answer here.

View Entire Topic
jreimann
Participant
0 Kudos

According to the incident I created (ID: 776926 / 2022) the use case of a notification without a target application (no click event) wasn't considered initially. The support team told me that a fix for this use case was/will be implemented with SAP UI5 Version 1.109.0 that an empty string or a null/undefined value in the "NavigationTargetAction"/"NavigationTargetObject" fields will no longer trigger a navigation and thus causing an error. The pointer cursor when hovering such a notification (the hand symbol) will not be removed from the notifications with this fix.

Regarding the default value of "NotificationTypeDesc": I pointed out that it's confusing that the default value is "Leave request app" when we pass "" or null. If this is still the desired behavior, it should be documented somewhere so that other developers are not also confused because of default value "Leave request app".

gregorw
Active Contributor
0 Kudos

I guess you mean SAPUI5 1.109.0 or?

jreimann
Participant
0 Kudos

Hi gregorw, yes. I corrected the answer. Thank you.