Send Push Notification Smart Service

The Send Push Notification smart service is used to send notifications to one or more Appian for Mobile Devices application users. You can specify a title, a message, and a link to open when users tap on the notification.

Mobile push notifications are only available on Appian Cloud and are encrypted end-to-end.

Properties

  • Category: Communication

  • Icon: /Smart Service Icons/Send Push Canvas

  • Assignment Options: Unattended

See also: Smart Services

Configuration Options

This section contains tab configuration details specific to this smart service. For more information about common configurations see the Process Node Properties page.

Node Inputs

Name Data Type Description Required Multiple
Recipients User Or Group Recipients of the push notification. Even if users are included multiple times, they receive a single notification. Yes Yes
Title Text The title to display in the notification. The title text is truncated starting at 49 characters on some devices. Yes No
Body Text The message to display below the title. The body text is truncated starting at 140 characters on some devices. No No
Link Link The link to open when the user taps on the notification. Supported link types are a!newsEntryLink(), a!processTaskLink(), a!recordLink(), a!reportLink(), and a!userRecordLink(). Yes No

Exceptions

An exception is thrown which pauses the process at this node if:

  • Invalid expression specified in the Recipients, Title, Body, or Link fields
  • Any of the required fields cannot be resolved (expression evaluates to null or empty)
  • An unsupported link type is specified

a!sendPushNotification()

Sends a push notification with the specified title, body, and link to one or more Appian for Mobile Devices application users. This function will only execute inside a saveInto.

Syntax

a!sendPushNotification(recipients, title, body, link, onSuccess, onError)

Inputs

  • recipients (User or Group): List of users and/or groups who are the intended recipients of the push notification.
  • title (Text): The title to display in the notification.
  • body (Text): The message to display in the notification below the title.
  • link (Link): The link to open when the user taps on the notification. Supported link types:
  • onSuccess (Any Type): A list of saves or an HTTP response to execute after the smart service executes successfully. Created with a!save() or a!httpResponse().
  • onError (Any Type): A list of saves or an HTTP response to execute when the smart service does not execute successfully. Created with a!save() or a!httpResponse().

The maximum number of people that a push notification is sent to is defaulted to 100. You can adjust this from the maximum notification recipients setting.

Example

Copy and paste an example into the INTERFACE DEFINITION in EXPRESSION MODE to see how this works.
Replace FIELD_WORKERS, Record Type, and Record Identifier for your application. User(s) in the FIELD_WORKERS group need to have the server account configured on the Appian for Mobile Devices iOS or Android app and be previously logged in to receive the push notification.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  a!buttonArrayLayout(
    buttons: {
      a!buttonWidget(
        label: "Send Push Notification",
        style: "NORMAL",
        saveInto: {          
          a!sendPushNotification(
            recipients: cons!FIELD_WORKERS,
            title: "New Inspection",
            body: "Perform Inspection for Mr. Ragnar Lothbrok",
            link: a!recordLink(
              recordType: 'recordType!{687c7860-2c7c-4e19-8d1f-c2104295cce4}Home Inspection',
              identifier: "1"
            )
          )
        }
      )
    },
    align: "START"
  )
}
Open in Github Built: Thu, Feb 23, 2023 (02:59:22 PM)

On This Page

FEEDBACK