Push Notifications2 min read
Push Notifications Overview
How push notifications work in a WebAppStudio app: Firebase Cloud Messaging or OneSignal, the permission prompt, notification behavior and sending messages.
Overview
Push notifications bring users back to your app: order updates, new content, offers. In WebAppStudio you set up push in the app; you send the messages from your push provider.
| WebAppStudio does | You do |
|---|---|
| Builds the provider into your app, registers devices, shows the permission prompt, opens the right page when a notification is tapped | Create a Firebase project or OneSignal account, upload its settings, and send messages from the Firebase console or the OneSignal dashboard |
Note
There is no message composer in the WebAppStudio dashboard. For connected Shopify and WooCommerce stores, order status notifications are sent automatically.
Set it up
- Open Integrations › Push notifications.
- Turn on Enable Push Notifications.
- Choose the Push notification provider:
- Firebase Cloud Messaging: upload Firebase's configuration files. → Firebase push setup
- OneSignal: enter your OneSignal App ID. → OneSignal push setup
- Set the Permission Prompt (below).
- Choose Save push settings, then start a new build.
Push notifications must be included in your plan; otherwise the page is locked.
Permission Prompt
People must allow notifications before they receive any. Choose:
| Setting | Options |
|---|---|
| When the app asks | When the app first opens, When your website asks for it, or Only through a manual bridge request |
| Explanation shown before the system prompt | For example "Get order updates and offers the moment they happen." |
| Message if notifications are turned off | Shown to users who declined |
| Offer to open Settings | Shows a button that opens the app's system settings |
To ask from your website at the right moment:
javascript
const result = await wapp.permissions.request('notifications');Notification Behavior
| Option | What it does |
|---|---|
| Show notifications while the app is open | Displays a banner when a notification arrives while the app is in use |
| Open the notification's link | Tapping a notification opens its link in your app; see Notification links |
| Register devices with WebAppStudio | Lets WebAppStudio see which installed apps can receive notifications |
What needs a new build
- Provider and its configuration (Firebase files, OneSignal App ID): new build.
- Enable Push Notifications, behavior and permission prompt: Instant Live Update. Turning push off stops notifications in installed apps right away.