Open joemcgill opened 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).
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.
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.
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.
@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)
Part of https://github.com/woocommerce/google-listings-and-ads/issues/2458
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
ContactInformation
card with both phone and address cards visible.Implementation Brief
To check the phone and address info before setting up the setup stepper, we'll need to use the
useStoreAddress()
hook injs/src/setup-mc/setup-stepper/saved-setup-stepper.js
. We know we have a valid phone number when both there is aphone_number
value andphone_verification_status
is"verified"
. We know the address is valid when we have amc_address
value and theis_mc_address_different
value isfalse
.When all those conditions are met, we can update the
SavedSetupStepper
to remove thestore_requirements
step from the stepper (reference). We'll also need to update thehandleSetupListingsContinue()
callback so that it callscontinueStep( stepNameKeyMap.paid_ads )
instead ofcontinueStep( 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:
Definition Questions