Notifications are messages sent to platformOS users (including admins) when something happens. A message can be an email, SMS, or programmatic call to a 3rd party API.
Notifications can be delayed, and you can use Liquid, GraphQL, and trigger conditions to decide if a notification should be sent. They are a powerful mechanism used for example to welcome new users, follow up after they've added their first item, or reach out to them if they have been inactive for a while.
Supported notification types
Currently, we support three types of notifications:
- API call
All notifications are defined in the
Depending on what type of notification you would like to define, you should have three subdirectories:
email_notifications: contains all Email Notifications
sms_notifications: contains all SMS Notifications
api_call_notifications: contains all API Call Notifications
Each configuration can accept different properties, but some of the main concepts are common:
|to||Depending on the alert type, it is either:
|delay||Number of minutes by which the notification should be delayed. You could use liquid to calculate the number. For example, one could easily schedule email to be sent the next day at 10 am Auckland time:
|enabled||Boolean which defines whether alert should be invoked or not. If false, it will be simply ignored.||true||false|
|trigger_condition||Liquid condition to control whether notification should be sent or not. The only value that allows notification to be delivered is
toproperty is required in SMS and API Call Notifications.
Accessing form data from the notification
Wherever you have access to Liquid inside the notification, you can access data submitted in the form which triggered the notification using the
form variable. Its structure mirrors the
fields property of the associated FormConfiguration. When in doubt, you can always use to visualize the structure. If you would like to access properties, which are not included in the
form variable, you should use a GraphQL query to fetch them. You can access the id of the resource associated with the submitted form via