woocommerce / google-listings-and-ads

Sync your store with Google to list products for free, run paid ads, and track performance straight from your store dashboard.
https://woo.com/products/google-listings-and-ads/
GNU General Public License v3.0
45 stars 21 forks source link

Onboarding: Remove “Confirm store requirements” step if possible #2493

Open joemcgill opened 1 month ago

joemcgill commented 1 month ago

Part of https://github.com/woocommerce/google-listings-and-ads/issues/2458

Image

Once the Pre-Launch checklist is removed from the StoreRequirements page, the only thing this page is for is verifying store contact info (i.e., phone and address). In cases where we already have a verified phone number and address, we don't need to include this step in the onboarding.

If we can already determine that we have a verified phone number and an address associated with the store, don't show this step during onboarding and move directly to Campaign creation after Configuring Product listings (or whatever step comes before confirming store requirements). These values can be modified in the settings screen after onboarding if needed.

Acceptance Criteria

Implementation Brief

To check the phone and address info before setting up the setup stepper, we'll need to use the useStoreAddress() hook in js/src/setup-mc/setup-stepper/saved-setup-stepper.js. We know we have a valid phone number when both there is a phone_number value and phone_verification_status is "verified". We know the address is valid when we have a mc_address value and the is_mc_address_different value is false.

When all those conditions are met, we can update the SavedSetupStepper to remove the store_requirements step from the stepper (reference). We'll also need to update the handleSetupListingsContinue() callback so that it calls continueStep( stepNameKeyMap.paid_ads ) instead of continueStep( stepNameKeyMap.store_requirements ) if the store requirements are not being included.

Test Coverage

Update the E2E tests for step 2 of the onboarding (tests/e2e/specs/setup-mc/step-2-product-listings.test.js) to include two scenarios for the continue button:

  1. The current scenario that confirms that clicking continue results in showing the Confirm store requirements page if we don't have a verified phone and address.
  2. A new scenario that confirms that clicking continue shows the Campaign Setup step if we already have a verified phone and address.

Definition Questions

mikkamp commented 1 month ago

When the onboarding app loads, the Confirm Store Requirements step is not included if the phone number is verified and the MC address is the same as the store address.

Would it be better to get a decision from UX here? I can see reasons why we'd want to leave the step but just skip it and mark it as completed if the right conditions are met. One such reason is since they are numbered, documentation / references to step number won't match anymore. It also takes away the opportunity to manually verify the contact details are correct (if it's skipped then the Merchant can still click on the completed step to verify).

joemcgill commented 1 month ago

Good suggestion @mikkamp. I've marked as needs design so we can follow up. If we keep the step visible, we'll need to check for whether we have a valid phone number and address as part of the handleSetupListingsContinue() callback and skip directly to the paid_ads step we just won't remove the step.

joemcgill commented 4 weeks ago

After discussing with @fblascogarma, @MatthiasReinholz, and @michaeleleder, the consensus is that if we've already determined that we have a valid phone number and matching address, that this step should not show at all in the UI, so we can move forward with this task as already described in the issue description.

joemcgill commented 1 week ago

I realized that this might need a rethink during my last review of the PR being worked on here. I've left the details here: https://github.com/woocommerce/google-listings-and-ads/pull/2568#pullrequestreview-2274471828.

joemcgill commented 2 days ago

@fblascogarma and @MatthiasReinholz, I think we need to reconsider this earlier suggestion about leaving the step in the onboarding flow and automatically marking it as completed and skip to the next step if we can determine that all of the requirements are met.

Reason being, we won't know if someone has a valid phone number and address on their MC account until after they've completed step 1 (connecting their accounts). This means that most people will start the onboarding with the confirm store requirements step visible and we've found that removing that step after onboarding has begun creates an visually awkward experience (see the related conversation on the PR)