plugins/woocommerce/src/Internal/PushNotifications/ROADMAP.md
This document is intended to describe the purpose and planned changes for the WooCommerce: Self-driven Push Notifications project, to assist folks in reviewing related PRs and understanding the wider context of the changes.
The following terms have been used in this post to mean:
We are adding the ability for WooCommerce to trigger its own Android and iOS push notifications. The reasons are discussed in more detail in this post, but briefly, the goals of this will be:
The new functionality will be available for sites that:
This section summarises the way WooCommerce push notifications currently work.
Push token registration:
Push notification trigger/send:
Push notification retries:
This section summarises the way WooCommerce push notifications will work when this project is complete.
Push token registration:
Push notification trigger/send:
Push notification retries:
wc_push_token) - based on existing data in WordPress.com, we expect most users to have less than 10 push tokens each (usually 1-3)apple, android, or browsercom.woocommerce.android, com.woocommerce.android:dev, com.automattic.woocommerce, or com.automattic.woocommerce:devwc_push_notification_preferences) - content is a JSON encoded list of enabled notifications or map of notifications to enabled status (true/false)This library will be in the src/Internal directory and is not intended to be used by external users/developers.
Register token:
POST /wp-json/wc-push-notifications/push-tokensUnregister token:
DELETE /wp-json/wc-push-notifications/push-tokens/{id}Get notification preferences:
GET /wp-json/wc-push-notifications/preferencesSave notification preferences:
POST /wp-json/wc-push-notifications/preferencesAsync send triggered notifications:
POST /wp-json/wc-push-notifications/sendAdd foundations to support the push notification functionality
Add token registration/unregistration endpoint:
Add asynchronous internal send endpoint:
** Add get notification preferences endpoint:**
Add update notification preferences endpoint:
Add send functionality:
woocommerce_new_order and woocommerce_order_status_changed to send a new order notification for orders with one of the following statuses: processing, on-hold, completed, pre-order, pre-ordered, partial-paymentcomment_post to send a review notification for comments of the type reviewAdd retry functionality:
Add new booking notification:
Update notification setting controls:
These users won't receive push notifications - this is the same as the existing behaviour, which also requires a Jetpack connection.