SalesforceCommerceCloud / b2c-crm-sync

... a contemporary perspective on how to integrate B2C Commerce and the Salesforce Customer 360 Platform to power frictionless customer experiences in the B2C domain.
https://salesforcecommercecloud.github.io/b2c-crm-sync/
BSD 3-Clause "New" or "Revised" License
64 stars 47 forks source link

Password Reset implementation through flows #84

Closed jbachelet closed 2 years ago

jbachelet commented 2 years ago

Introduction

This pull-request introduces a new use case asked from the issue #37: Password Reset initialization from the Core Platform.

How it works?

This new password reset workflow is working with both Account/Contact and PersonAccount models. Here are the steps on how the feature is working:

  1. Within the Core Platform, either on the Contact or the PersonAccount record page, a new Reset customer password Quick Action is introduced.
  2. When clicking on this action, a flow is starting and is displayed to the user.
  3. If multiple sites are active and have the Enable_Password_Reset__c field to true, then the user has to choose what site will trigger the password reset flow. This is important as, depending on the site, the customer might receive different emails.
  4. Once the user clicks on next, an OCAPI call is done to the B2C Commerce instance in order to initialize the password reset flow.
  5. When B2C Commerce gets the reset password request, a hook is fired at this place and an email is sent to the customer (through the plugin_b2ccrmsync cartridge, so compatible SFRA only)
  6. The user sees a confirmation screen and can close the flow.
  7. The customer receives an email with a link to be used to change the password

Screenshots

Screenshot 2021-12-28 at 9 49 26 AM Screenshot 2021-12-28 at 9 47 16 AM Screenshot 2021-12-28 at 9 48 21 AM Screenshot 2021-12-28 at 9 48 30 AM

Screenshot 2021-12-28 at 9 48 40 AM

Unit tests

This feature is :100: covered in terms of unit tests :white_check_mark:, either from Core and from B2C :white_check_mark: Screenshot 2021-12-28 at 9 42 05 AM Screenshot 2021-12-28 at 9 55 48 AM

jbachelet commented 2 years ago

@sandragolden thanks for the fix commit, love it!