App icon indicating copy to clipboard operation
App copied to clipboard

[$250] Update NewDot report action copy to make it clear when the action is automatically (vs manually) initiated

Open maddylewis opened this issue 1 year ago • 13 comments

We currently don't show when a report was auto-exported in NewDot

Similarly to OldDot, we should differentiate when a report action is done automatically by Expensify or manually by the user account

Example Below

EXFY Accounts Payable automatically exported this report to NetSuite, but the copy doesn't specify: image image

Update Copy

Let's update the copy to more clearly identify when something is manually vs. automatically exported. We should leave the copy for manual exporting unchanged. But if it is automatically exported, we should use:

%PreferredExporterName% %time exported% automatically exported this report to QuickBooks Online via [accounting settings](link to specific help page for the applicable integration explaining auto-sync)

We should also leave the link(s) to the specific expenses that currently exist at the end of the system message unchanged when automatically exporting.

Additional input on copy changes - https://expensify.slack.com/archives/C07NZ8B1VTQ/p1733152728274999?thread_ts=1731949285.192699&cid=C07NZ8B1VTQ

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021864461454721236879
  • Upwork Job ID: 1864461454721236879
  • Last Price Increase: 2024-12-05
Issue OwnerCurrent Issue Owner: @alitoshmatov

maddylewis avatar Dec 02 '24 15:12 maddylewis

Triggered auto assignment to @joekaufmanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] avatar Dec 02 '24 15:12 melvin-bot[bot]

@joekaufmanexpensify - i believe a contributor should be able to work on this one. not sure if this is a basic improvement or if more input is required re: design or copy changes.

i left it as an improvement for now but lmk if you need any more info from me in the meantime!

maddylewis avatar Dec 02 '24 15:12 maddylewis

Current assignee @joekaufmanexpensify is eligible for the NewFeature assigner, not assigning anyone new.

melvin-bot[bot] avatar Dec 02 '24 23:12 melvin-bot[bot]

Making sure we are aligned on copy before opening this up for proposals.

joekaufmanexpensify avatar Dec 02 '24 23:12 joekaufmanexpensify

Updated based on slack discussion!

joekaufmanexpensify avatar Dec 05 '24 00:12 joekaufmanexpensify

Job added to Upwork: https://www.upwork.com/jobs/~021864461454721236879

melvin-bot[bot] avatar Dec 05 '24 00:12 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External)

melvin-bot[bot] avatar Dec 05 '24 00:12 melvin-bot[bot]

@joekaufmanexpensify, the images in the OP isn't uploaded correctly I guess, can you please update or share them?

Krishna2323 avatar Dec 05 '24 00:12 Krishna2323

Can you not see them at all? They aren't super high-res but i can still see all the words fine on my end.

joekaufmanexpensify avatar Dec 05 '24 00:12 joekaufmanexpensify

Nope they aren't loading for me.

image

Krishna2323 avatar Dec 05 '24 00:12 Krishna2323

@joekaufmanexpensify lmk if you need new screenshots. we could probs just ask jenna (those are her screenshots in the OP) to take a few more for us to add to the issue.

maddylewis avatar Dec 05 '24 19:12 maddylewis

🚨 Edited by proposal-police: This proposal was edited at 2025-01-20 15:12:54 UTC.

Edited by proposal-police: This proposal was edited at 2024-12-11 20:35:44 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Update NewDot report action copy to make it clear when the action is automatically (vs manually) initiated

What is the root cause of that problem?

This is a request for copy update no specific RCA.

What changes do you think we should make in order to solve the problem?

  1. According to OP : We should leave the copy for manual exporting unchanged, so the following text for manual exporting will remain unchanged: https://github.com/Expensify/App/blob/840c227be7fd907ab096cda7d6f28e1eef4a1d30/src/languages/en.ts#L4698 https://github.com/Expensify/App/blob/523edfed6cc83c026f31a2869a6693dd1d1c8e49/src/libs/ReportActionsUtils.ts#L1668-L1672

  2. The OP states: we should update the copy of automatic exports to: automatically exported this report to QuickBooks Online via [accounting settings](link to specific help page for the applicable integration explaining auto-sync), so here we would need to update the following copy (Also update the spanish text for the same): https://github.com/Expensify/App/blob/840c227be7fd907ab096cda7d6f28e1eef4a1d30/src/languages/en.ts#L4697 To:

                exportedToIntegration: {
                    automaticOne: ({label} : ExportedToIntegrationParams) => `automatically exported this report to ${label} via`,
                    automaticTwo: 'accounting settings',

Note that we need to create two variables automaticOne and automaticTwo because we want to link the accounting settings text to helpDot URL, so it should be linked separately.

  1. Now we will create a const for URLofHelpDotSite which will store each integration name against their helpdot link, for labels (integrations) which do not have helpdot link, we will place a empty string for those cases (this will make sure that we do not link anything).
    const linkURLofHelpDotSite: Record<string, string> = {
        "QuickBooks Online": "https://help.expensify.com/articles/new-expensify/connections/quickbooks-online/Configure-Quickbooks-Online",
        "QuickBooks Desktop": "",
        "quickbooks": "https://help.expensify.com/articles/new-expensify/connections/quickbooks-online/Configure-Quickbooks-Online",
        "NetSuite": "https://help.expensify.com/articles/new-expensify/connections/netsuite/Configure-Netsuite",
        "Xero": "https://help.expensify.com/articles/new-expensify/connections/xero/Configure-Xero",
        "Intacct": "https://help.expensify.com/articles/new-expensify/connections/sage-intacct/Configure-Sage-Intacct",
        "FinancialForce": "",
        "Sage Intacct": "https://help.expensify.com/articles/new-expensify/connections/sage-intacct/Configure-Sage-Intacct",
        "Certinia": "",
      };
  1. Now we need to update the automatic exports case in ReportActionsUtils:

Note that we already cover the manual export case here, so we only need to update the automatic export case : https://github.com/Expensify/App/blob/840c227be7fd907ab096cda7d6f28e1eef4a1d30/src/libs/ReportActionsUtils.ts#L1635-L1640

Which will be updated to:

         result.push({
            text: Localize.translateLocal('report.actions.type.exportedToIntegration.automaticOne', {label}),
            url: '',
        });
const url = linkURLofHelpDotSite[label];
        result.push({
            text: Localize.translateLocal('report.actions.type.exportedToIntegration.automaticTwo'),
            url: url || '',
        })

Include how we'll handle the possibility of label being unknown value

Note that if the label is unknown to the mapped values then we will fallback to empty string which will mean that there would be no link attaches

What alternative solutions did you explore? (Optional)

twilight2294 avatar Dec 06 '24 04:12 twilight2294

Edited by proposal-police: This proposal was edited at 2024-12-06 15:01:16 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Update NewDot report action copy to make it clear when the action is automatically (vs manually) initiated.

What is the root cause of that problem?

New feature

What changes do you think we should make in order to solve the problem?

  • We need to update the copy both EN and ES https://github.com/Expensify/App/blob/b9107bf59cbb3982d958abbae357e3b903ed4c63/src/languages/en.ts#L4696-L4697 To:
exportedToIntegration: {
    automatic: ({label, exportedDate}: ExportedToIntegrationParams) => `${label} ${exportedDate} automatically exported this report to QuickBooks Online via`,
  • Add new param inside exportedToIntegration.automatic i.e exportedDate to determine when the report is exported https://github.com/Expensify/App/blob/b9107bf59cbb3982d958abbae357e3b903ed4c63/src/libs/ReportActionsUtils.ts#L1636-L1639
let prefferedLocale: Locale = CONST.LOCALES.DEFAULT;

Onyx.connect({
    key:  ONYXKEYS.NVP_PREFERRED_LOCALE,
    callback: (val) => (prefferedLocale = val ?? CONST.LOCALES.DEFAULT),
});

...

const exportedDate = DateUtils.datetimeToRelative(prefferedLocale, reportAction.created)

result.push({
    text: Localize.translateLocal('report.actions.type.exportedToIntegration.automatic', {label, exportedDate}),
    url: '',
});
  • Update the link text here and link to accounting settings and we need to retrieve this link value from BE, so I think we need some BE changes https://github.com/Expensify/App/blob/7fbac55391cdcb62e0b568d3a75eedf1b9af42ae/src/languages/en.ts#L4699 https://github.com/Expensify/App/blob/7fbac55391cdcb62e0b568d3a75eedf1b9af42ae/src/libs/ReportActionsUtils.ts#L1643-L1646 https://github.com/Expensify/App/blob/7fbac55391cdcb62e0b568d3a75eedf1b9af42ae/src/libs/ReportActionsUtils.ts#L1616-L1618

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We should add new test here in ReportActionsUtilsTest to match the following copy:

%PreferredExporterName% %time exported% automatically exported this report to QuickBooks Online via [accounting settings](link to specific help page for the applicable integration explaining auto-sync)

Result

image

What alternative solutions did you explore? (Optional)

NJ-2020 avatar Dec 06 '24 13:12 NJ-2020

Proposal Updated

NJ-2020 avatar Dec 06 '24 15:12 NJ-2020

@joekaufmanexpensify, the images in the OP isn't uploaded correctly I guess, can you please update or share them?

@Krishna2323 I updated the images in OP!

joekaufmanexpensify avatar Dec 09 '24 15:12 joekaufmanexpensify

@alitoshmatov could you please review the proposals here?

joekaufmanexpensify avatar Dec 09 '24 15:12 joekaufmanexpensify

@joekaufmanexpensify, @alitoshmatov Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] avatar Dec 10 '24 09:12 melvin-bot[bot]

Bumped in Slack

joekaufmanexpensify avatar Dec 10 '24 14:12 joekaufmanexpensify

@twilight2294 @NJ-2020 I think both proposals got expected result wrong, I think time shouldn't be part of the text here

alitoshmatov avatar Dec 10 '24 18:12 alitoshmatov

@joekaufmanexpensify Just to clarify expected behavior did you mean like this(below image). Also

  1. What does [accounting settings] means here?
  2. Does (link to specific help page for the applicable integration explaining auto-sync) mean View out-of-pocket expenses. here? Or is it another additional link?
Screenshot 2024-12-10 at 11 56 34 PM

alitoshmatov avatar Dec 10 '24 18:12 alitoshmatov

What does [accounting settings] means here?

Good Q! Accounting settings is where someone will set whether automatic export is used. It is meant to link to help documentation that explains this. Specifically, one of these four links depending on the integration:

Does (link to specific help page for the applicable integration explaining auto-sync) mean View out-of-pocket expenses here? Or is it another additional link?

Another link! I shared the applicable links above. We don't want to change the existing links out to the expenses exported referenced here. This means if auto-export is used, there can be two links in the system message.

LMK if that makes sense and if you have any other questions!

joekaufmanexpensify avatar Dec 11 '24 14:12 joekaufmanexpensify

I think I got it.

Screenshot 2024-12-12 at 12 06 35 AM

The final message should look like this and account setting here should redirect to one of this links based on which integration is used

cc: @twilight2294 @NJ-2020 Can you update your proposal based on this

alitoshmatov avatar Dec 11 '24 19:12 alitoshmatov

The final message should look like this and account setting here should redirect to one of this links based on which integration is used

One minor note is sometimes the second link isn't View out of pocket expenses. It can also be for company card expenses too. Let's not change any of the logic related to what is displayed there. Only the account settings link needs to be added/adjusted.

I think that is what you intended, but adding just in case.

joekaufmanexpensify avatar Dec 12 '24 15:12 joekaufmanexpensify

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Dec 12 '24 16:12 melvin-bot[bot]

@alitoshmatov could you share an update on the proposal review?

joekaufmanexpensify avatar Dec 16 '24 17:12 joekaufmanexpensify

URLofHelpDotSite will be taken based on the type of accounting method used, we can use the label itself to determine the type of connection and update the URLofHelpDotSite accordingly

@twilight2294 I am curious, how exactly are you going to handle this. I see that label is string, are you sure we will receive the same set of string always?

alitoshmatov avatar Dec 16 '24 18:12 alitoshmatov

yes, label is the integration name which won't change

twilight2294 avatar Dec 16 '24 18:12 twilight2294

We can have mapping like the below we use for company cards page:

Screenshot 2024-12-17 at 12 17 48 AM

So based on the label name the URL is updated

twilight2294 avatar Dec 16 '24 18:12 twilight2294

@twilight2294 I understand this, I mean do we have the list of all available lists and are we sure they always be the same. In example you provided there is CONST.COMPANY_CARD.FEED_BANK_NAME, do we have similar constant to rely on for our use case

alitoshmatov avatar Dec 16 '24 18:12 alitoshmatov