Hi @alesya.m and @rsneha027!
Thank you both for your questions about the Web Push Notifications Plugin capabilities. Yes, both use cases are feasible and can be achieved, it all depends on your Bubble skills and previous experience.
Unfortunately, we don’t have a similar use case on our demo page but after consulting with the dev team, here are some general advice and recommendations that I hope will be useful and guide you in the right direction.
Answer for @alesya.m: Sending Web Notifications to Multiple Users (Golf Club Administrators)
Currently, the plugin action - Send Push Notification can send push notifications to only one user at a time. As a workaround you can create a loop that runs the workflow multiple times, dynamically changing the values each time.
-
Subscription Handling:
Each golf club administrator can subscribe to web push notifications through your Bubble app. The plugin will generate a unique subscription token for each administrator’s browser when they opt in.
-
Sending Notifications to a Group:
You can save JSON object - Push Subscription for each administrator in your database and send a notification to all of them when a booking is made.
Steps:
- After a user makes a reservation, trigger a workflow to retrieve all the subscription tokens (object - Push Subscription) of administrators for the respective golf club.
- Use the plugin’s “Send Push Notification” action in a loop or batch process to send notifications to all relevant administrators.
Example Workflow:
- Trigger event: “New Reservation Created”
- Retrieve the list of subscribed administrators (from your database)
- Loop through the list and send the web push notification to each subscription token.
This will ensure that all administrators who subscribed to notifications for that golf club will receive the alert.
Please Note: The plugin action Send Push Notification can send push notifications to only one user at a time. However, for your use case, you can create a loop that runs the workflow multiple times, dynamically changing the values each time.
I hope this helps.
Answer to @rsneha027: Sending Notifications to Specific Users Based on Events (Targeted Notifications)
Yes, the plugin supports sending notifications to specific users based on custom events or criteria, like a new booking or an update. You can achieve this by storing user-specific subscription tokens (Push Subscription Object) in your Bubble database and filtering based on their notification preferences.
Here’s how to set this up:
-
Store Subscription Tokens by User:
When a user subscribes to notifications, store their subscription token (Push Subscription Object) along with their notification preferences in your database.
-
Filter Tokens Based on Preferences:
Before sending a notification, filter the list of tokens to only include users who signed up for specific types of notifications (e.g., golf reservation updates).
-
Send Notifications to the Filtered List:
Use the plugin’s “Send Push Notification” action to send notifications to the filtered list.
Example Use Case:
- A user makes a new booking.
- Trigger an event in Bubble to filter users who signed up for “Golf Reservation Updates.”
- Send a notification to only those users.
Plugin Limitation to Keep in Mind:
The plugin doesn’t support sending Push notifications to a list of users, so you need to use Bubble solutions to handle this. You can:
-
Send notifications in a loop using Bubble’s recursive workflows.
-
Optimize the process by grouping subscription tokens for batch sending if needed.
To successfully integrate the plugin into your Bubble app, please consult carefully the supporting documentation and demo editor page.
Best regards,
Support Team
Browse all Zeroqode Plugins for bubble