Skip to content

[PM-32853] Add Trial Initiation Metadata for Marketing or Product#7462

Open
sbrown-livefront wants to merge 7 commits intomainfrom
billing/pm-32853/add-trial-initiation-metadata
Open

[PM-32853] Add Trial Initiation Metadata for Marketing or Product#7462
sbrown-livefront wants to merge 7 commits intomainfrom
billing/pm-32853/add-trial-initiation-metadata

Conversation

@sbrown-livefront
Copy link
Copy Markdown
Collaborator

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-32853

📔 Objective

Introduces support for tracking the marketing source of premium cloud-hosted subscription purchases. It adds a new FromMarketing field to the subscription request and domain models, validates it, and ensures that Stripe subscription metadata reflects whether the subscription was initiated via marketing or product flows.

📸 Screenshots

Default Product-Initiated Workflow

Screen.Recording.2026-04-13.at.3.56.30.PM.mov

Market-Initiated Workflow

Screen.Recording.2026-04-13.at.3.54.35.PM.mov

@sbrown-livefront sbrown-livefront self-assigned this Apr 13, 2026
@sbrown-livefront sbrown-livefront added the ai-review Request a Claude code review label Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR adds a FromMarketing field to the premium cloud-hosted subscription flow, propagating it as trialInitiationPath metadata on Stripe subscriptions. The field is validated using the pre-existing MarketingInitiativeValidationAttribute, which restricts values to an allowed list (currently only "premium") or null. Two well-targeted unit tests verify both the marketing-initiated and product-initiated metadata paths. No security, correctness, or breaking change concerns were identified.

@sbrown-livefront sbrown-livefront marked this pull request as ready for review April 13, 2026 20:27
@sbrown-livefront sbrown-livefront requested a review from a team as a code owner April 13, 2026 20:27
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

Logo
Checkmarx One – Scan Summary & Details5bf3ff1d-9525-464a-ba96-a68302cf2edd

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.51%. Comparing base (e0225f9) to head (a0680de).

Files with missing lines Patch % Lines
...s/Premium/PremiumCloudHostedSubscriptionRequest.cs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7462      +/-   ##
==========================================
- Coverage   62.99%   58.51%   -4.48%     
==========================================
  Files        2066     2066              
  Lines       91104    91110       +6     
  Branches     8109     8109              
==========================================
- Hits        57389    53317    -4072     
- Misses      31721    35885    +4164     
+ Partials     1994     1908      -86     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants