[OldDot & NewDot] Allow disabling auto renew freely if you haven't been billed at least once.
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.69-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @trjExpensify Slack conversation: #convert thread
Action Performed:
NewDot
- Go to new.expensify.com
- Sign-up for a new account
- Choose "Manage my team's expenses" and complete the onboarding modal
- Go to Settings > Subscription > Subscription details
- Disable the auto renew toggle
OldDot
- Go to expensify.com
- Choose "Control expenses for a larger organization"
- Go to Settings > Workspaces > Group > Subscription
- Disable the auto renew toggle
Expected Result:
This is an improvement.
If the user hasn't been billed at least once, toggling off auto-renew should be allowed without having to complete the retention survey.
Actual Result:
The retention survey is shown to the user, which is confusing because none of the options make sense to a new user who hasn't been billed yet.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Standalone
- [ ] Android: HybridApp
- [ ] Android: mWeb Chrome
- [ ] iOS: Standalone
- [ ] iOS: HybridApp
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
FS here (internal)
Current assignee @trjExpensify is eligible for the NewFeature assigner, not assigning anyone new.
Edited by proposal-police: This proposal was edited at 2024-12-02 14:59:59 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Currently, users who attempt to toggle off auto-renew are shown a retention survey, even if they haven't been billed yet. This is confusing for new users who do not identify with the survey options, as they haven't experienced the product enough to provide meaningful feedback.
What is the root cause of that problem?
improvement
What changes do you think we should make in order to solve the problem?
Introduce a check to determine if the user has billing history (via account?.hasPurchases). If they do, navigate to the retention survey; otherwise, skip it. change this: https://github.com/Expensify/App/blob/2337870c001d8c12f4c0328418cadba0a3e8884f/src/pages/settings/Subscription/SubscriptionSettings/index.tsx#L37
as:
if(!!account?.hasPurchases){
Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION_DISABLE_AUTO_RENEW_SURVEY);
}else{
Subscription.updateSubscriptionAutoRenew(false);
}
Proposal
Please re-state the problem that we are trying to solve in this issue.
Users who have not been billed yet encounter a retention survey when attempting to disable the auto-renew feature. This is unnecessary and confusing because the retention survey options do not make sense for new users who have not incurred any charges.
What is the root cause of that problem?
The current logic for disabling auto-renew does not differentiate between users who have been billed and those who have not. As a result, all users are shown the retention survey regardless of their billing history.
What changes do you think we should make in order to solve the problem?
src/pages/settings/Subscription/SubscriptionSettings/index.tsx
Determine Billing Status:
Add a check to determine if the user has been billed at least once.
The privateSubscription object should include a property (e.g., hasBeenBilled) to track whether the user has been billed. This information can be derived from the server or the subscription details.
Modify handleAutoRenewToggle:
Update the logic to bypass the retention survey if the user hasn't been billed yet:
const handleAutoRenewToggle = () => {
if (!privateSubscription?.autoRenew) {
Subscription.updateSubscriptionAutoRenew(true);
return;
}
if (!privateSubscription?.hasBeenBilled) {
// Allow disabling auto-renew freely if user hasn't been billed
Subscription.updateSubscriptionAutoRenew(false);
return;
}
// Navigate to the retention survey if the user has been billed
Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION_DISABLE_AUTO_RENEW_SURVEY);
};
@mananjadhav @rushatgabhane @mountiny I labelled this as internal, because the retention survey is also shown in this case on OldDot, and I suspect that simply skipping the survey isn't enough to actually disable autoRenew properly. Keen for a second opinion on that.
Makes sense to me but I think the the contributors can also check out their solution if it works with purely frontend change. I am not sure if we require the the survey response in BE
@Shahidullah-Muffakir maybe you can check then. :)
@trjExpensify @mountiny I believe FE changes should be enough, as we can use account?.hasPurchases for billing history the same way, we used it here:https://github.com/Expensify/App/issues/51892
https://github.com/user-attachments/assets/4c09e3bf-5a82-4246-9187-7de471cc0d35
Can you confirm that properly disables auto-renew? I guess, log-out and back in, or refresh or something?
Can you confirm that properly disables auto-renew? I guess, log-out and back in, or refresh or something?
Yes, I tested it, and it's working properly!
https://github.com/user-attachments/assets/ac02b7a9-0f1e-489c-ade7-70ef3147fd5d
Job added to Upwork: https://www.upwork.com/jobs/~021866071159246990575
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)
Great stuff! Let's get that moving forward then. @akinwale can you review the proposals, please?
After reviewing both proposals, we can move forward with @Shahidullah-Muffakir's proposal since it was posted first and it reuses an approach that already exists in the codebase.
πππ C+ reviewed.
Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @Shahidullah-Muffakir You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing π
@akinwale , PR https://github.com/Expensify/App/pull/54055 is ready for review, Thank you.
This was deployed to production on 2024-12-18, so it will be due for payment on 2024-12-25.
Happy holidays!
Friendly bump for pending payment.
Payment complete to @Shahidullah-Muffakir
@akinwale due $250 via ND manual request for C+ work.
Will leave this open for you to close @trjExpensify
Thanks for handling that, @bfitzexpensify. @techievivek will you take on the OldDot side of this issue?
$250 approved for @akinwale
Bump on this, @techievivek.
Aaah, sorry, I missed the ping, I can take a look into it tomorrow.
Thank you!
I saw this near the top of the Hot Picks list - @techievivek you got it covered or are you looking to hand off?
Hi, @amyevans, please feel free to take over, I have few other pressing tasks on my plate. Thanks.
PRs are into review.
Auth PR: https://github.com/Expensify/Auth/pull/13874 Web PR: https://github.com/Expensify/Web-Expensify/pull/45183
The OldDot portion is live now too so I believe we're all set to close!