Skip to content

add LastPlanAddedDate__c value to all new subs to allow accurate cooling off period #7040

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnduffell
Copy link
Member

@johnduffell johnduffell commented May 29, 2025

reminder: Before merging - add the custom field in Zuora PROD

We refund supporter plus subscriptions if they are cancelled within 14 days of taking out (or switching)

This means that we need to determine the date they are taken out or last switched accurately.

At the moment, we use the charge Effective start date, however that gets updated every time there's any amendment (switch, renewal, price rise, etc etc)

Having done some research, it doesn't seem easy to find the date of the first amendment that added a given rate plan (not to mention that price rises and migrations don't count). It would be possible to follow the chain of amendments, or query all the subscriptions with the same name and check the charges, or even run an export zoql query asynchronously.

However, another solution it just to store the value on the subscription or charge as a custom field, and update it at any point where they become eligiible for any kind of refund window.

I have added a field in zuora sandbox on Subscription called LastPlanAddedDate__c
image

I didn't put it on plan in the end, because if we do a price rise or migration, we should ideally copy it over. And we only put one plan on a subscription, so we can get away with putting it at that level.

This PR makes main site acqusisition add the field to all subscriptions when they are taken out. It's only needed on S+ at present, but it makes enough sense for all subscriptions to include by default. It is the date the agreement is made, rather than the first payment date.

Everything is open to question at this stage including the field name and even the whole approach, so please comment anything and everything.

Tested in sandbox locally
https://apisandbox.zuora.com/platform/subscriptions/71a1431927d970b055171cb4b74b1069
image

Followup work

  • add similar logic to switch api (RC to S+ mainly, but membership to RC should ideally support it)
  • add similar logic to new product api
  • wait 14 days and change suporter plus cancellation api look at the field

Copy link
Contributor

Size Change: 0 B

Total Size: 1.46 MB

ℹ️ View Unchanged
Filename Size
./public/compiled-assets/javascripts/[countryGroupId]/events/router.js 92.5 kB
./public/compiled-assets/javascripts/[countryGroupId]/router.js 98.9 kB
./public/compiled-assets/javascripts/ausMomentMap.js 108 kB
./public/compiled-assets/javascripts/contributionsRedirectStyles.js 20 B
./public/compiled-assets/javascripts/downForMaintenancePage.js 69.9 kB
./public/compiled-assets/javascripts/error404Page.js 69.9 kB
./public/compiled-assets/javascripts/error500Page.js 69.8 kB
./public/compiled-assets/javascripts/favicons.js 618 B
./public/compiled-assets/javascripts/paperSubscriptionLandingPage.js 90.7 kB
./public/compiled-assets/javascripts/payPalErrorPage.js 68.4 kB
./public/compiled-assets/javascripts/payPalErrorPageStyles.js 20 B
./public/compiled-assets/javascripts/promotionTerms.js 76.2 kB
./public/compiled-assets/javascripts/subscriptionsLandingPage.js 99.9 kB
./public/compiled-assets/javascripts/unsupportedBrowserStyles.js 20 B
./public/compiled-assets/javascripts/weeklySubscriptionCheckoutPage.js 159 kB
./public/compiled-assets/javascripts/weeklySubscriptionLandingPage.js 93.5 kB
./public/compiled-assets/webpack/100.js 5.8 kB
./public/compiled-assets/webpack/231.js 20.2 kB
./public/compiled-assets/webpack/460.js 14.4 kB
./public/compiled-assets/webpack/471.js 24.2 kB
./public/compiled-assets/webpack/474.js 4.98 kB
./public/compiled-assets/webpack/476.js 6.97 kB
./public/compiled-assets/webpack/500.js 3.52 kB
./public/compiled-assets/webpack/566.js 4.36 kB
./public/compiled-assets/webpack/63.js 2.17 kB
./public/compiled-assets/webpack/649.js 34.8 kB
./public/compiled-assets/webpack/741.js 8.81 kB
./public/compiled-assets/webpack/751.js 7.1 kB
./public/compiled-assets/webpack/778.js 107 kB
./public/compiled-assets/webpack/935.js 25.5 kB
./public/compiled-assets/webpack/checkout.js 18.7 kB
./public/compiled-assets/webpack/GuardianAdLiteLanding.js 8.4 kB
./public/compiled-assets/webpack/LandingPage.js 15.4 kB
./public/compiled-assets/webpack/oneTimeCheckout.js 7.33 kB
./public/compiled-assets/webpack/ThankYou.js 43.9 kB

compressed-size-action

@johnduffell johnduffell changed the title add LastPlanAddedDate__c to all new subs add LastPlanAddedDate__c value to all new subs to allow accurate cooling off period May 29, 2025
Copy link
Member

@rupertbates rupertbates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I think the name is pretty good, tough to get a balance between general enough to be useful and specific enough to be meaningful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants