diff --git a/src/libs/API/parameters/CreateWorkspaceParams.ts b/src/libs/API/parameters/CreateWorkspaceParams.ts index 59b7c973f121..557de5ccd744 100644 --- a/src/libs/API/parameters/CreateWorkspaceParams.ts +++ b/src/libs/API/parameters/CreateWorkspaceParams.ts @@ -20,6 +20,8 @@ type CreateWorkspaceParams = { features?: string; shouldAddGuideWelcomeMessage?: boolean; areDistanceRatesEnabled?: boolean; + bespokeWelcomeMessage?: string; + optimisticConciergeReportActionID?: string; }; export default CreateWorkspaceParams; diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 4f44b20ab5af..48499ce9578c 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -11781,8 +11781,13 @@ function prepareOnboardingOnyxData({ // Only the MANAGE_TEAM onboarding action uses the #admins room (with a guide); TRACK_WORKSPACE uses Concierge. Excludes emails that have a '+'. const shouldPostTasksInAdminsRoom = isPostingTasksInAdminsRoom(engagementChoice); - // When posting to admins room and the user is in the suggestedFollowups beta, we skip tasks in favor of backend-generated followups. - const shouldUseFollowupsInsteadOfTasks = shouldPostTasksInAdminsRoom && Permissions.isBetaEnabled(CONST.BETAS.SUGGESTED_FOLLOWUPS, betas, betaConfiguration); + // Phase 1 cohort (MANAGE_TEAM + micro company size) bypasses the beta gate — the backend + // handles gating via NVP, so all micro users get followups without needing the beta flag. + // Includes MICRO_SMALL, MICRO_MEDIUM, and the deprecated MICRO for backwards compatibility. + const isPhase1Cohort = + companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO_SMALL || companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO_MEDIUM || companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO; + // When posting to admins room and the user is in the suggestedFollowups beta (or Phase 1 cohort), we skip tasks in favor of backend-generated followups. + const shouldUseFollowupsInsteadOfTasks = shouldPostTasksInAdminsRoom && (Permissions.isBetaEnabled(CONST.BETAS.SUGGESTED_FOLLOWUPS, betas, betaConfiguration) || isPhase1Cohort); const adminsChatReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${adminsChatReportID}`]; const conciergeChat = getChatByParticipants([CONST.ACCOUNT_ID.CONCIERGE, deprecatedCurrentUserAccountID ?? CONST.DEFAULT_NUMBER_ID], deprecatedAllReports, false) ?? diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index ffb87d0db24d..888fbffa1a21 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -2901,10 +2901,19 @@ function buildPolicyData(options: BuildPolicyDataOptions): OnyxData { }, adminsChatReportID, selectedInterestedFeatures: ['areCompanyCardsEnabled'], - companySize: CONST.ONBOARDING_COMPANY_SIZE.MICRO, + companySize: CONST.ONBOARDING_COMPANY_SIZE.SMALL, }); - // Without the beta, tasks SHOULD be generated (old behavior) + // Without the beta, tasks SHOULD be generated (old behavior) — uses SMALL (not MICRO) + // because MICRO + MANAGE_TEAM users bypass the beta gate and get followups directly expect(result?.guidedSetupData).toHaveLength(3); const taskReportIDs = result?.guidedSetupData.reduce((acc, item) => {