---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Create push message content

# Create push message content {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Push message content specifies additional JSON content in the push notification
payload that is sent to the push provider.

## Before you begin

Complete the following:

1. [Activate push notifications](https://servicenow-prod.fluidtopics.net/fPbiPvA0orzM4ShlqpnZ4Q "Several plugins must be activated to use push notifications. If you have the Mobile UI (com.glide.ui.m) plugin active, push notification plugins are automatically activated.")
2. (iOS only) [Upload a push certificate to your instance](https://servicenow-prod.fluidtopics.net/lU0_F2BiLNTXEWj8SZvB8A "Upload a push certificate to your instance so that you can use it later to connect your iOS device to the push notification system.")
3. [Create a push application record for your custom app](https://servicenow-prod.fluidtopics.net/Uasca9pJX3foHO5a5gEApw "Register your customized mobile application with your instance to receive push notifications for the application.")
{#t_CreateAMobileMessageLayout__ol_a5d_cpb_sjb}

You must know how to use JSON with push messages.

Role required: admin or push_admin  
Note:  
This process describes configuration used in the ServiceNow mobile app. Push Notification configuration for the current ServiceNow mobile UI can be found at [Mobile push
notifications](https://www.servicenow.com/docs/access?context=sg-mobile-push-notifications&version=xanadu&pubname=xanadu-mobile&ft:locale=en-US)

## About this task

Push message content defines the style of push notification that can be sent out for your custom app. You can add custom content, such as a picture, icons, or action buttons for the user to respond to the notification. Use the following variables in the script:

* `current`: properties of the current record.
* `message`: push message sent as the body of the entire push content.
* `attributes`: object of the push message [attributes that you define](https://servicenow-prod.fluidtopics.net/CNPz233RBWtfsmVmw_Z8rw "Push message attribute definitions allow you to create reusable properties for push message content specification.").
{#t_CreateAMobileMessageLayout__ul_ghw_r24_vs}

## Procedure

1. Navigate to AllSystem NotificationPushPush Message Content.
2. In the Push Notification Message Contents table, click New.
3. Fill out the fields on the Push Notifications Message Content form (see table).
4. Click Submit.  
   {#t_CreateAMobileMessageLayout__table_wdd_2rs_ks__entry__2}

   | Field | Description |
   |-|-|
   | Name | Enter a descriptive name for the message content. |
   | Push app | The push application the content can be used with. |
   | Push Message Generation | Enter a script that determines the message content. See the example scripts. |
   | Related list ||
   | Push Message Attribute Definitions | Select the attributes that apply to this notification. Attributes can be a value or an action. These attributes are used as default values for the content items you create in the content script. However, any attributes you create with the [push message](https://servicenow-prod.fluidtopics.net/grGlMpSNla2eMhPKosrNkQ "Before you create a push notification, create the push message with the actual message content for the notification.") can override these attributes. See [Create a push message attribute definition](https://servicenow-prod.fluidtopics.net/CNPz233RBWtfsmVmw_Z8rw "Push message attribute definitions allow you to create reusable properties for push message content specification.") for information on creating attributes. |
   [Table 1. Notification Message form fields]

   {#t_CreateAMobileMessageLayout__table_wdd_2rs_ks}

## Example

The following is an example of a content record that creates a two-button layout, one
to approve something, such as a change request, and one to decline it.  


    var json = { 
      "table" : current.getTableName(), 
      "sys_id" : current.sys_id, 
      "template" : { 
        "type": "2 button", 
        "button1" : { 
          "title" : "Approve", 
          "action" : attributes.button_action, 
          "parameters" : { 
            "response" : "approve" 
           } 
         }, 
         "button2" : { 
           "title" : "Decline", 
           "action" : attributes.button_action, 
           "parameters" : { "response" : "decline" 
           } 
         } 
       } 
    }; 
    json;

## What to do next

[Define
a push message attribute](https://servicenow-prod.fluidtopics.net/CNPz233RBWtfsmVmw_Z8rw "Push message attribute definitions allow you to create reusable properties for push message content specification.") to specify a default push action script or
string that you can use in the push message content.

*[\>]: and then


