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

Add fields required for Guardian Ad Lite thank you email #6642

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

tjmw
Copy link
Member

@tjmw tjmw commented Dec 19, 2024

What are you doing in this PR?

This PR adds the fields required for the thank you email. These will be provided as API trigger properties to the Braze campaign.

Trello Card

Why are you doing this?

Currently Guardian Ad-Lite emails are not configured and we want to send thank you emails to users who purchase.

How to test

I've deployed this PR and guardian/membership-workflow#561 to CODE and made a purchase. The email triggered successfully.

How can we measure success?

Have we considered potential risks?

Accessibility test checklist

Screenshots


object GuardianLightSubscriptionBuilder {
// The user isn't charged until day 15
val gracePeriodInDays = 15
Copy link
Member Author

Choose a reason for hiding this comment

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

Pulled this out to make it easy to share with the code which builds the email fields.

Copy link
Contributor

Size Change: 0 B

Total Size: 2.23 MB

ℹ️ View Unchanged
Filename Size
./public/compiled-assets/javascripts/[countryGroupId]/events/router.js 90 kB
./public/compiled-assets/javascripts/[countryGroupId]/router.js 265 kB
./public/compiled-assets/javascripts/ausMomentMap.js 108 kB
./public/compiled-assets/javascripts/contributionsRedirectStyles.js 20 B
./public/compiled-assets/javascripts/digitalSubscriptionLandingPage.js 235 kB
./public/compiled-assets/javascripts/downForMaintenancePage.js 70.4 kB
./public/compiled-assets/javascripts/error404Page.js 70.3 kB
./public/compiled-assets/javascripts/error500Page.js 70.3 kB
./public/compiled-assets/javascripts/favicons.js 617 B
./public/compiled-assets/javascripts/paperSubscriptionCheckoutPage.js 174 kB
./public/compiled-assets/javascripts/paperSubscriptionLandingPage.js 87.2 kB
./public/compiled-assets/javascripts/payPalErrorPage.js 68.6 kB
./public/compiled-assets/javascripts/payPalErrorPageStyles.js 20 B
./public/compiled-assets/javascripts/promotionTerms.js 73.3 kB
./public/compiled-assets/javascripts/subscriptionsLandingPage.js 72.6 kB
./public/compiled-assets/javascripts/subscriptionsRedemptionPage.js 127 kB
./public/compiled-assets/javascripts/supporterPlusLandingPage.js 307 kB
./public/compiled-assets/javascripts/unsupportedBrowserStyles.js 20 B
./public/compiled-assets/javascripts/weeklySubscriptionCheckoutPage.js 171 kB
./public/compiled-assets/javascripts/weeklySubscriptionLandingPage.js 87.1 kB
./public/compiled-assets/webpack/136.js 2.17 kB
./public/compiled-assets/webpack/187.js 21.4 kB
./public/compiled-assets/webpack/344.js 2.01 kB
./public/compiled-assets/webpack/643.js 22.4 kB
./public/compiled-assets/webpack/706.js 107 kB

compressed-size-action

@tjmw tjmw changed the title Add fields required for Guardian Ad Lite Add fields required for Guardian Ad Lite thank you email Dec 20, 2024
"email_address" -> state.user.primaryEmailAddress,
"billing_period" -> state.product.billingPeriod.toString.toLowerCase,
"first_payment_date" -> formatDate(
created.plusDays(GuardianLightSubscriptionBuilder.gracePeriodInDays).toLocalDate,
Copy link
Member Author

@tjmw tjmw Dec 20, 2024

Choose a reason for hiding this comment

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

@rupertbates this date logic is also here. I'm sharing the grace period value but I wonder if there's a better way of doing this? Any thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I think that's fine

Copy link
Contributor

@andrewHEguardian andrewHEguardian 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 👍

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.

👍

@tjmw tjmw merged commit 06d73dd into main Jan 6, 2025
15 checks passed
@tjmw tjmw deleted the tw/guardian-ad-lite-thank-you-email branch January 6, 2025 14:31
@prout-bot
Copy link

Seen on PROD (merged by @tjmw 11 minutes and 17 seconds ago)

Sentry Release: support-client-side, support

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

Successfully merging this pull request may close these issues.

4 participants