Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] [OldDot & NewDot] Allow disabling auto renew freely if you haven't been billed at least once. #53382

Open
1 of 8 tasks
trjExpensify opened this issue Dec 2, 2024 · 17 comments
Assignees
Labels
External Added to denote the issue can be worked on by a contributor Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2

Comments

@trjExpensify
Copy link
Contributor

trjExpensify commented Dec 2, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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

  1. Go to new.expensify.com
  2. Sign-up for a new account
  3. Choose "Manage my team's expenses" and complete the onboarding modal
  4. Go to Settings > Subscription > Subscription details
  5. Disable the auto renew toggle

OldDot

  1. Go to expensify.com
  2. Choose "Control expenses for a larger organization"
  3. Go to Settings > Workspaces > Group > Subscription
  4. 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
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

FS here (internal)

image

image (23)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866071159246990575
  • Upwork Job ID: 1866071159246990575
  • Last Price Increase: 2024-12-09
Issue OwnerCurrent Issue Owner: @akinwale
@trjExpensify trjExpensify added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff NewFeature Something to build that is a new item. Hot Pick Ready for an engineer to pick up and run with labels Dec 2, 2024
@trjExpensify trjExpensify self-assigned this Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

Current assignee @trjExpensify is eligible for the NewFeature assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Dec 2, 2024
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 2, 2024
@Shahidullah-Muffakir
Copy link
Contributor

Shahidullah-Muffakir commented Dec 2, 2024

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:

Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION_DISABLE_AUTO_RENEW_SURVEY);

as:

        if(!!account?.hasPurchases){
            Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION_DISABLE_AUTO_RENEW_SURVEY);
        }else{
            Subscription.updateSubscriptionAutoRenew(false);
        }

@saifelance
Copy link

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);
};

@melvin-bot melvin-bot bot added the Overdue label Dec 5, 2024
@trjExpensify
Copy link
Contributor Author

@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.

@melvin-bot melvin-bot bot removed the Overdue label Dec 5, 2024
@mountiny
Copy link
Contributor

mountiny commented Dec 6, 2024

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

@trjExpensify
Copy link
Contributor Author

@Shahidullah-Muffakir maybe you can check then. :)

@Shahidullah-Muffakir
Copy link
Contributor

@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:#51892

Screen.Recording.2024-12-06.at.9.41.18.PM.mov

@trjExpensify
Copy link
Contributor Author

Can you confirm that properly disables auto-renew? I guess, log-out and back in, or refresh or something?

@Shahidullah-Muffakir
Copy link
Contributor

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!

new.mp4

@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Dec 9, 2024
@melvin-bot melvin-bot bot changed the title [OldDot & NewDot] Allow disabling auto renew freely if you haven't been billed at least once. [$250] [OldDot & NewDot] Allow disabling auto renew freely if you haven't been billed at least once. Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021866071159246990575

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@melvin-bot melvin-bot bot removed the Overdue label Dec 9, 2024
@trjExpensify
Copy link
Contributor Author

Great stuff! Let's get that moving forward then. @akinwale can you review the proposals, please?

@akinwale
Copy link
Contributor

akinwale commented Dec 9, 2024

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.

Copy link

melvin-bot bot commented Dec 9, 2024

Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

📣 @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 📖

@Shahidullah-Muffakir
Copy link
Contributor

@akinwale , PR #54055 is ready for review, Thank you.

@akinwale
Copy link
Contributor

This was deployed to production on 2024-12-18, so it will be due for payment on 2024-12-25.

Happy holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Added to denote the issue can be worked on by a contributor Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2
Projects
Development

No branches or pull requests

6 participants