Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Configure push notifications for mobile activity stream mentions

Enable users to alert their contacts, through the use push notifications, that they are mentioned in a thread. The user enters the @ character followed by the contact's name in a record's activity stream, for their contact to be alerted.

Before you begin

Role required: admin

Procedure

  1. Create the push notification message content, which defines where you are pushing the notification to.

    1. Navigate to System Notification > Push > Push Message Content in the filter navigator.

    2. In the Push Notification Message Content form, select New.

    3. On the form, fill in the fields.

  
NameName of your push message content record. This name is not visible to your users.
ApplicationScoped application associated with this record. This field defaults to the current application.
Push appMobile app that uses your push notification.- Enter ServiceNow Mobile Application for the Mobile Agent app. - Enter ServiceNow Request Application for the Now Mobile app.
4.  In the **Push Message Generation** field, copy the following sample JSON code and paste it in the field.

    ```
    (function buildJSON(/*GlideRecord*/ current, /*String*/ message, /*Object*/ attributes) {

        var layoutFieldGenerator = new global.NotificationLayoutFieldGenerator();
        var json = {};
        var deepLinkGenerator = new global.MobileDeepLinkGenerator("<client type>");

        var link = deepLinkGenerator.getFormScreenLink('<form_screen_sys_id>', current.getValue("table"), current.getValue("document"));
        json = {
            "aps" : {
                "sound" : "default"
            },
            "Link": link
        };

        return json;

    })(current, message, attributes);

    ```

    Customize the values in the code:

    1.  Locate the sys\_id of the record screen by right-clicking on the screen name and selecting **Copy sys\_id**.
    2.  Replace the `<form_screen_sys_id>` portion of the code with the sys\_id.
    3.  Define a client type in the variable `global.MobileDeepLinkGenerator` Possible values are:
        -   agent
        -   request
        -   onboarding
5.  Select **Submit**.
  1. Create a message for the user's contacts to receive when they are mentioned in a record's activity stream.

    1. Navigate to System Notification > Push > Push Messages.

    2. In the Push Notification Message form, select New.

    3. On the form, fill in the fields.

  
NameName of your push message content record. This name is not visible to your users.
ApplicationScoped application associated with this record. This field defaults to the current application.
Push appMobile app that uses your push notification.Note: Make sure to enter the same mobile app entered in the Push app field in the Push Notification Message Content form.
Push Message ContentSelect the push message content you created.
TableTable containing the records relating to your notification. Select `live_notification`.
MessageMessage that appears to the user's contacts, informing them they are mentioned.
4.  Select **Submit**.
  1. Create the push notification and define when to send it, who receives it, and what it contains.

    1. Navigate to System Notification > Push > Push Notifications.

    2. In the Push Notification view form, select New.

    3. On the form, fill in the fields.

      FieldDescription
      NameName of your push notification. This name is not visible to your users.
      ActiveOption for determining whether the push notification is active. Select this option.
      TableTable containing the records relating to your notification. Select the same table as the push notification view form, live_notification.
      Push Message OnlyOption that determines whether to send a push notification to a mobile device. This field is automatically selected and is read-only by default.
      CategoryCategory to which this notification belongs. A category identifies and groups related notifications. This category defines which actions are available in the push notification.
    4. Select the When to send tab and then select Inserted.

    5. Select the Who will receive tab and then select the lock icon (

Image omitted: lock-icon.png
Lock icon.\) in the **Users/Groups in fields**.
6.  Move **User** to the selected list.

    **Note:** If the notification is addressed to a user with an inactive record in the User \[sys\_user\] table, the notification is not sent.

7.  Select the **What to send** tab and select the lock icon \(
Image omitted: lock-icon.png
Lock icon.\) next to the **Push Messages** field.
8.  Select the reference lookup icon \(
Image omitted: reference-lookup-icon.png
Reference lookup icon.\) to open the Push Notification Messages page.
9.  Select the push notification message you created.

    The push notification is listed as one of the available messages in the **What to send** tab.

10. Select **Submit**.
  1. Enable your mobile app settings for notifications.

    1. Select the Settings icon (
Image omitted: GearIcon.png
Settings icon.\) and select the **Notifications** tab.
2.  Verify that **Allow Notifications** is enabled.

3.  Verify that the mobile app you selected to receive notifications is enabled by noting the setting of either the **ServiceNow Mobile Application** or **ServiceNow Request application** field.

Parent Topic:Configure notifications for mobile activity stream mentions