diff --git a/src/CONST.ts b/src/CONST.ts index d47800f69308..2b85bcb2c326 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -3551,12 +3551,11 @@ const CONST = { ONBOARDING_CONCIERGE: { [onboardingChoices.TRACK]: - "# Welcome to Expensify, let's start tracking your expenses!\n" + - "Hi there, I'm Concierge. Chat with me here for anything you need.\n" + + "# Let's start tracking your expenses!\n" + '\n' + "To track your expenses, create a workspace to keep everything in one place. Here's how:\n" + '1. From the home screen, click the green + button > New Workspace\n' + - '2. Give your workspace a name (e.g. "My business expenses”).\n' + + '2. Give your workspace a name (e.g. "My business expenses").\n' + '\n' + 'Then, add expenses to your workspace:\n' + '1. Find your workspace using the search field.\n' + @@ -3565,8 +3564,7 @@ const CONST = { '\n' + "We'll store all expenses in your new workspace for easy access. Let me know if you have any questions!", [onboardingChoices.EMPLOYER]: - '# Welcome to Expensify, the fastest way to get paid back!\n' + - "Hi there, I'm Concierge. Chat with me here for anything you need.\n" + + '# Expensify is the fastest way to get paid back!\n' + '\n' + 'To submit expenses for reimbursement:\n' + '1. From the home screen, click the green + button > Request money.\n' + @@ -3574,21 +3572,19 @@ const CONST = { '\n' + "That'll send a request to get you paid back. Let me know if you have any questions!", [onboardingChoices.MANAGE_TEAM]: - "# Welcome to Expensify, let's start managing your team's expenses!\n" + - "Hi there, I'm Concierge. Chat with me here for anything you need.\n" + + "# Let's start managing your team's expenses!\n" + '\n' + "To manage your team's expenses, create a workspace to keep everything in one place. Here's how:\n" + '1. From the home screen, click the green + button > New Workspace\n' + - '2. Give your workspace a name (e.g. “Sales team expenses”).\n' + + '2. Give your workspace a name (e.g. "Sales team expenses").\n' + '\n' + - 'Then, invite your team to your workspace via the Members pane and connect a business bank account to reimburse them. Let me know if you have any questions!', + 'Then, invite your team to your workspace via the Members pane and [connect a business bank account](https://help.expensify.com/articles/new-expensify/bank-accounts/Connect-a-Bank-Account) to reimburse them. Let me know if you have any questions!', [onboardingChoices.PERSONAL_SPEND]: - "# Welcome to Expensify, let's start tracking your expenses!\n" + - "Hi there, I'm Concierge. Chat with me here for anything you need.\n" + + "# Let's start tracking your expenses! \n" + '\n' + "To track your expenses, create a workspace to keep everything in one place. Here's how:\n" + '1. From the home screen, click the green + button > New Workspace\n' + - '2. Give your workspace a name (e.g. "My expenses”).\n' + + '2. Give your workspace a name (e.g. "My expenses").\n' + '\n' + 'Then, add expenses to your workspace:\n' + '1. Find your workspace using the search field.\n' + @@ -3597,19 +3593,13 @@ const CONST = { '\n' + "We'll store all expenses in your new workspace for easy access. Let me know if you have any questions!", [onboardingChoices.CHAT_SPLIT]: - '# Welcome to Expensify, where splitting the bill is an easy conversation!\n' + - "Hi there, I'm Concierge. Chat with me here for anything you need.\n" + + '# Splitting the bill is as easy as a conversation!\n' + '\n' + 'To split an expense:\n' + '1. From the home screen, click the green + button > Request money.\n' + '2. Enter an amount or scan a receipt, then choose who you want to split it with.\n' + '\n' + "We'll send a request to each person so they can pay you back. Let me know if you have any questions!", - [onboardingChoices.LOOKING_AROUND]: - '# Welcome to Expensify!\n' + - "Hi there, I'm Concierge. Chat with me here for anything you need.\n" + - '\n' + - "Expensify is best known for expense and corporate card management, but we do a lot more than that. Let me know what you're interested in and I'll help get you started.", }, REPORT_FIELD_TITLE_FIELD_ID: 'text_title', diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index f599208ff915..41079d20a982 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2941,8 +2941,29 @@ function getReportPrivateNote(reportID: string | undefined) { * - Sets the introSelected NVP to the choice the user made * - Creates an optimistic report comment from concierge */ -function completeEngagementModal(text: string, choice: ValueOf) { +function completeEngagementModal(choice: ValueOf, text?: string) { const conciergeAccountID = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE])[0]; + + // We do not need to send any message for some choices + if (!text) { + const parameters: CompleteEngagementModalParams = { + reportID: conciergeChatReportID ?? '', + engagementChoice: choice, + }; + + const optimisticData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.NVP_INTRO_SELECTED, + value: {choice}, + }, + ]; + API.write(WRITE_COMMANDS.COMPLETE_ENGAGEMENT_MODAL, parameters, { + optimisticData, + }); + return; + } + const reportComment = ReportUtils.buildOptimisticAddCommentReportAction(text, undefined, conciergeAccountID); const reportCommentAction: OptimisticAddCommentReportAction = reportComment.reportAction; const lastComment = reportCommentAction?.message?.[0]; @@ -3007,6 +3028,7 @@ function completeEngagementModal(text: string, choice: ValueOf { - Report.completeEngagementModal(messageCopy, CONST.INTRO_CHOICES.MANAGE_TEAM); + Report.completeEngagementModal(CONST.INTRO_CHOICES.MANAGE_TEAM, messageCopy); Report.navigateToConciergeChat(); }; diff --git a/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx b/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx index 3c7520b850b4..3056d4ec51dd 100644 --- a/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx +++ b/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx @@ -86,7 +86,7 @@ function PurposeForUsingExpensifyModal() { return Navigation.navigate(ROUTES.ONBOARD_MANAGE_EXPENSES); } - Report.completeEngagementModal(message, choice); + Report.completeEngagementModal(choice, message); Report.navigateToConciergeChat(true); }, []); diff --git a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx index 3b82a79e6c48..82f171e12f14 100644 --- a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx +++ b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx @@ -83,7 +83,7 @@ function BaseOnboardingPurpose({shouldUseNativeStyles, shouldEnableMaxHeight, on return; } - Report.completeEngagementModal(CONST.ONBOARDING_CONCIERGE[selectedPurpose], selectedPurpose); + Report.completeEngagementModal(selectedPurpose, CONST.ONBOARDING_CONCIERGE[selectedPurpose]); Navigation.dismissModal(); // Only navigate to concierge chat when central pane is visible