Push notifications are a direct mechanism to alert app users on Android and iOS devices.
You can customize the notification you send. Customization makes extensive use of variables. You can customize the following aspects of the notification.
Notification Device Tokens
You control who receives a push notification by specifying the email address of the recipient or recipients in the To property of the Notification configuration. AppSheet uses Notification Device Tokens to convert the email addresses in the To property into the appropriate Device Tokens for that user's mobile devices. If the user has more than one device, the notification is sent to each of the user's devices that the user has logged in from.
AppSheet handles Notification Device Tokens slightly differently for White Label versus non-White Label applications. White Label applications are very rare.
The notification recipient must be an authenticated user who has logged into at least one AppSheet application using the email address specified in the To property. The application that the user logged into, need not be the application sending the notification.
White Label applications work slightly differently. When a user logs in to a White Label application, the Notification Device Token that is creates by the login contains the AppId of the White Label application. This makes it possible for AppSheet to remember which specific White Label applications each user has logged in to and to send notifications appropriately.
For example, assume you have two White Label applications called "WhiteA" and "WhiteB". Assume you have two users "User1@gmail.com" and "User2@gmail.com". Assume that "User1" has only logged in to application "WhiteA" and that "User2" has only logged in to application "WhiteB".
A notification that originates from application "WhiteA" might specify both "User1" and "User2" in the To property, but the notification will only be sent to "User1" because only that user has logged into the application. No notification will be sent to "User2" because that user has not logged into that White Label application.
We send notifications as follows:
We translate the user email address you specify in the To property into an AppSheet User Id. That AppSheet User Id will only exist if the user has logged into at least one AppSheet application that requires user authentication using the user email address you specify in the To property. The AppSheet application that the user logged into, need not be the AppSheet application sending the notification.
We translate the AppSheet User Id into a list of one or more Google Firebase Cloud Messaging Device Tokens. If the user has a mobile device and has logged into at least one AppSheet application from that device, then AppSheet will have a unique Device Token registered for that device. AppSheet will send the notification to all of the recipient's registered Device Tokens.
If AppSheet cannot find an AppSheet User Id for the user email address you specify in the To property, or cannot find at least one Device Token for the AppSheet User Id, then the workflow entry in the Audit History will report the following warning:
"Warning: No notification sent to 'email@example.com' because no Notification Device Token is present for this user."
To: This is a list of email addresses or expressions that yield email addresses.
You can specify the To property in the following ways. Each To value must be entered on a separate line.
You can enter a specific email address, such as JohnHughes@gmail.com. If you enter an email address that contains special characters such as hyphen or plus, you must enclose the email address in quotes, such as "John-L-Hughes@gmail.com".
You can specify that the email address be taken from a field in the record that is being updated. For example, when a new order is captured, you may wish to send email to the customer who created the order. You can do this by entering an expression specifying the field name containing the customer's email address. For example, if there is a field called "CustomerEmail" in the updated record, you can specify [CustomerEmail] in the email address list.
You can specify that the email address be taken from a field in a record that is referenced by the record being updated. For example, each of your Order records might contain a reference to a Customer record. Each Customer record might contain the customer's email address. When a new order is captured, you can send email to the customer who created the order. You can do this by entering the name of the Order record field that references the customer record, followed by the name of the Customer record field containing the customer's email address. For example, assume the name of the Order record field that references the customer record is CustRef. Assume the name of the Customer record field containing the customer's email address is CustEmail. You can specify the customer's email address by entering the expression [CustRef].[CustEmail] in the email address list.
You can specify that the email addresses be taken from an entire column in another table. For example, you could create a table called PeopleToInform having two columns, Name and EmailAddress. Each time a new order is captured, you can send email to all of the people in the PeopleToInform table. Do this by entering the expression PeopleToInform[EmailAddress] in the email address list.
While the app is in test mode (i.e. it has not passed a Deployment Check), any messages sent from workflow actions will go only to the app creator.
Title: AppSheet uses a default title, but you can override that with your own title text. You can include variables in the title that are filled in by the values in the updated entry. Here is an example of a title line: '<<EmployeeName>> please pickup package from <<CustomerName>>'.
Body: You have two options when it comes to the body of the notification.
You can customize the notification body field or simply do nothing and receive a default notification body that contains:
The key value for the updated row.
Whether the updated row was added, updated, or deleted.
The name of the user that updated the row.
The time the row was updated.
Normally, you should specify a Body containing text and variables directly in the Body attribute. After the variables are replaced, the result becomes the notification body. Specifying the Body in this way allows you to control exactly what appears in the notification Body.
For example, your Body might contain:
<<[FirstName]>> <<[LastName]>> your order for <<[Quantity] * [Price]>> shipped on <<TODAY()>> and will arrive on <<TODAY() + 3>>.
DeepLink: You can specify a DeepLink to include in the notification. You can use the DeepLink to link to specific application data. Your DeepLink can link to:
Your AppSheet application
An entire View within your application
A filtered View within your application
A specific row within a View within your application
A form with pre-filled values
A custom DeepLink you specify using an expression
By default, the DeepLink links to your AppSheet application.