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.
To: This is a list of email addresses or expressions that yield email addresses.
Notification Device Tokens
When the notification is sent, we automatically convert each email address into the appropriate Device Token for that user's mobile device. If the user has more than one device, the notification is sent to each of the user's devices.
The notification recipient must be an authenticated user who has logged into at least one AppSheet application using that email address. The application that the user logged into, need not be the application sending the notification.
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 'firstname.lastname@example.org' because no Notification Device Token is present for this user."
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.