pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

[spike]: Push notifications for orders placed in Venia

Open ericerway opened this issue 5 years ago • 18 comments

Is your feature request related to a problem? Please describe. Push notifications are a key experience for PWA. Beyond adding to home screen (done) Venia should address key shopping experiences (including orders) using this capability with progressive web apps. This not only demonstrates this capability for merchants but provides an important "hook" for shoppers helping them check order easily similar to how this is done with leading native applications.

Describe the solution you'd like The shopper confirms their first order, and on the order confirmation page they are asked for permission to push notifications to them. A couple of days later, they return to the Venia browser tab and as they are browsing they receive an in-app toast that their order has shipped, and they will be able to click on the order number link in the toast text to view shipping details. The toast will persist until dismissed. Additional context and UX from @soumya-ashok will be provided.

Describe alternatives you've considered They have Venia installed on their home screen and are able to receive a device notification about their order status as a stretch goal for this story.

Additional context If the shopper doesn’t have Venia installed, they would not be able to receive device notifications from Venia. Authentication considerations and other scenarios to be considered.

Please let us know what packages this feature is in regards to:

  • [X] venia-concept
  • [ ] pwa-buildpack
  • [X] peregrine
  • [X] pwa-devdocs
  • [ ] upward-js
  • [ ] upward-spec

ericerway avatar Apr 08 '19 15:04 ericerway

I am in the process of investigating how this works when the PWA or site is not added to the device's home screen both on desktop and mobile. Will update with mockups as soon as I have a better understanding.

soumya-ashok avatar Apr 09 '19 22:04 soumya-ashok

@awilcoxa and @ericerway - Please review the design for a simple push notification flow here - https://magento.invisionapp.com/share/A8RI9D97Y5Q

I've included mocks for both iOS and Android. @jimbo has already reviewed them.

The prompt to enable push notifications would appear after the shopper confirmed their very first purchase right as they are taken to the order confirmation page.

If they deny, then this prompt doesn't appear again per current standards. If they click Allow, then they see a Venia - style toast that confirms the action.

There are examples for how the push notification would appear when it first arrives, and then display on the lock screen.

Happy to answer any questions.

soumya-ashok avatar Apr 19 '19 14:04 soumya-ashok

Initial POC for push notifs: order status change (ex. order is shipped) creates a push notification for user with app installed and opt-in selected

awilcoxa avatar Feb 25 '20 16:02 awilcoxa

Hi @awilcoxa, @soumya-ashok , Could you please re-share the link for mockups? It says it reached the quota limit. Thank you!

vasilii-b avatar Mar 02 '20 15:03 vasilii-b

@vasilii-b We no longer use Invision as a tool and we are in the process of revisiting the design. Is this issue something you would be interested in working on immediately / in the near future?

soumya-ashok avatar Mar 02 '20 16:03 soumya-ashok

@soumya-ashok I'd like to work on it in the near future.

vasilii-b avatar Mar 02 '20 16:03 vasilii-b

@vasilii-b Okay. Will discuss with the team and get back to you.

soumya-ashok avatar Mar 02 '20 16:03 soumya-ashok

Will update description of issue to reflect that this is a spike with the expected outcome being research and POC that highlights a number of different approaches to providing push notifs for an order status change.

awilcoxa avatar Mar 03 '20 16:03 awilcoxa

@larsroettig to provide first draft of description changes to outline expected spike outcome.

tjwiebell avatar Apr 14 '20 15:04 tjwiebell

@larsroettig For a new customer we need to provide real-time prices so did some digging around and figured that Apollo supports something called "Subscriptions" https://www.apollographql.com/docs/react/data/subscriptions/ this looks like the functionality we are after but I'm not sure if the SW can leverage this.

Jordaneisenburger avatar Apr 16 '20 10:04 Jordaneisenburger

Placing on hold until we've refined the expected outcome for POC

awilcoxa avatar May 19 '20 14:05 awilcoxa

@Jordaneisenburger Subscriptions would be neat to build on top of, but I believe Magento 2 as a back-end is not ready for that yet as it is missing the type: image

fooman avatar Jun 15 '20 23:06 fooman

@larsroettig sorry only commented which seems to have unassigned you and I can't undo it ?!

fooman avatar Jun 15 '20 23:06 fooman

@fooman currently we can do nothing on this topic we need to define simple use case order shipment is very hard to implement for security reasons

larsroettig avatar Jun 16 '20 06:06 larsroettig

@magento export issue to JIRA project PWA as Story

sirugh avatar May 17 '21 20:05 sirugh

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-1749 is successfully created for this GitHub issue.

github-jira-sync-bot avatar May 17 '21 20:05 github-jira-sync-bot

@larsroettig Hello, May I know any update on the push notification feature? Or at least if I can know I'll get this feature on PWA's future release version, that would be great.

sanganinamrata avatar Nov 23 '22 07:11 sanganinamrata

Any update on this one ?

ash2fast380 avatar Jul 25 '24 05:07 ash2fast380