diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts index 2428fe9e514..8086452f45f 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts @@ -345,6 +345,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy type: "Organization", id: this.organizationId, plan: this.sub.plan.type, + productTier: this.sub.plan.productTier, }, }); diff --git a/apps/web/src/app/billing/shared/offboarding-survey.component.ts b/apps/web/src/app/billing/shared/offboarding-survey.component.ts index db13302e76c..6e0aaa8d3e3 100644 --- a/apps/web/src/app/billing/shared/offboarding-survey.component.ts +++ b/apps/web/src/app/billing/shared/offboarding-survey.component.ts @@ -7,6 +7,7 @@ import { FormBuilder, Validators } from "@angular/forms"; import { BillingApiServiceAbstraction as BillingApiService } from "@bitwarden/common/billing/abstractions/billing-api.service.abstraction"; import { PlanType } from "@bitwarden/common/billing/enums"; +import { ProductTierType } from "@bitwarden/common/billing/enums/product-tier-type.enum"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { @@ -25,6 +26,7 @@ type OrganizationOffboardingParams = { type: "Organization"; id: string; plan: PlanType; + productTier: ProductTierType; }; export type OffboardingSurveyDialogParams = UserOffboardingParams | OrganizationOffboardingParams; @@ -76,32 +78,31 @@ export class OffboardingSurveyComponent { private platformUtilsService: PlatformUtilsService, private toastService: ToastService, ) { + const isBusiness = this.isBusinessPlan(); + this.reasons = [ - { - value: null, - text: this.i18nService.t("selectPlaceholder"), - }, + { value: null, text: this.i18nService.t("selectPlaceholder") }, { value: "missing_features", - text: this.i18nService.t("missingFeatures"), + text: this.i18nService.t(isBusiness ? "cancelSurveyDidntMeetNeeds" : "missingFeatures"), }, { value: "switched_service", - text: this.i18nService.t("movingToAnotherTool"), + text: this.i18nService.t( + isBusiness ? "cancelSurveyTeamPrioritiesChanged" : "movingToAnotherTool", + ), }, { value: "too_complex", - text: this.i18nService.t("tooDifficultToUse"), + text: this.i18nService.t(isBusiness ? "cancelSurveyOrgRestructuring" : "tooDifficultToUse"), }, { value: "unused", - text: this.i18nService.t("notUsingEnough"), - }, - this.getSwitchingReason(), - { - value: "other", - text: this.i18nService.t("other"), + text: this.i18nService.t(isBusiness ? "cancelSurveyDidntUseIt" : "notUsingEnough"), }, + ...(isBusiness + ? [{ value: "too_expensive", text: this.i18nService.t("cancelSurveyNotInBudget") }] + : [this.getSwitchingReason(), { value: "other", text: this.i18nService.t("other") }]), ]; } @@ -130,6 +131,15 @@ export class OffboardingSurveyComponent { this.dialogRef.close(this.ResultType.Submitted); }; + private isBusinessPlan(): boolean { + return ( + this.dialogParams.type === "Organization" && + [ProductTierType.Teams, ProductTierType.Enterprise, ProductTierType.TeamsStarter].includes( + this.dialogParams.productTier, + ) + ); + } + private getSwitchingReason(): Reason { if (this.dialogParams.type === "User") { return { diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index e7cefb0dc2b..7d7251738f4 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -10375,6 +10375,26 @@ "message": "Switching to free organization", "description": "An option for the offboarding survey shown when a user cancels their subscription." }, + "cancelSurveyDidntMeetNeeds": { + "message": "It didn't meet our needs", + "description": "An option for the offboarding survey shown when a Teams or Enterprise organization cancels their subscription." + }, + "cancelSurveyTeamPrioritiesChanged": { + "message": "Our team or priorities have changed", + "description": "An option for the offboarding survey shown when a Teams or Enterprise organization cancels their subscription." + }, + "cancelSurveyOrgRestructuring": { + "message": "Our organization is restructuring or closing", + "description": "An option for the offboarding survey shown when a Teams or Enterprise organization cancels their subscription." + }, + "cancelSurveyDidntUseIt": { + "message": "We didn't end up using it", + "description": "An option for the offboarding survey shown when a Teams or Enterprise organization cancels their subscription." + }, + "cancelSurveyNotInBudget": { + "message": "It's not in our budget right now", + "description": "An option for the offboarding survey shown when a Teams or Enterprise organization cancels their subscription." + }, "freeForOneYear": { "message": "Free for 1 year" },