App icon indicating copy to clipboard operation
App copied to clipboard

Combine the Category and Tag Tasks when direct accounting selection in the onboarding intent

Open davidcardoza opened this issue 1 year ago • 18 comments

Problem

During onboarding, users who select a direct accounting integration (such as QuickBooks Online) are presented with separate tasks to set up "Categories" and "Tags." However, because both categories and tags are automatically managed by the direct accounting integration, these setup tasks are redundant and can be confusing for users who don’t need to take any additional steps.

Solution

Combine the Category and Tag Setup Tasks: When a user selects a direct accounting connection like QBO, the tasks for "Setup Categories" and "Setup Tags" should be combined into a single, streamlined task that reflects their automatic setup via the integration.

  • Slack conversation for additional background - https://expensify.slack.com/archives/C07HPDRELLD/p1729708260070999
  • Related GH - https://github.com/Expensify/App/issues/48745
Issue OwnerCurrent Issue Owner: @dukenv0307

davidcardoza avatar Oct 28 '24 17:10 davidcardoza

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

melvin-bot[bot] avatar Oct 28 '24 17:10 melvin-bot[bot]

Edited by proposal-police: This proposal was edited at 2024-10-28 18:54:41 UTC.

Proposal

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

Remove Category and Tag Tasks when direct accounting selection in the onboarding intent

What is the root cause of that problem?

Enhancement

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

The default tasks come from here and are created here

We can hide the tasks based on if the user selects an integration or not. To implemt this, we can update here to filter out the tasks using below logic where, we show a new "set up categories and tags" task if a connection was selected. If no connection was selected then we show separate tasks for "set up categories" and "setup tags" like we show currently.

const filteredTasks = data.tasks.filter(task => userReportedIntegration 
	? task.type != 'setupCategories' && task.type != 'setupTags'
	: task.type != 'setupTagsAndCategoriesForConnections')
const tasksData = filteredTasks.map((task, index) => {
    ...
}

The new task will be added here.

	...
	tasks: [
		...
		{
			type: 'setupTagsAndCategoriesForConnections',
			autoCompleted: false,
			title: 'Set up tags & categories',
			description: 'Your categories and tags are automatically created based on the selected connection.'
		}
		...
	]
	...

Note: This code is just for explaination purposes. Code quality can be improved during PR.

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

jaydamani avatar Oct 28 '24 18:10 jaydamani

Proposal

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

Remove Category and Tag Tasks when direct accounting selection in the onboarding intent

What is the root cause of that problem?

Enhancement

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

We should remove the tags and categories here https://github.com/Expensify/App/blob/db592c9c9f56a6ce8208b898c1e5ba1eb864aae8/src/CONST.ts#L4756-L4778

What alternative solutions did you explore? (Optional)

We will exclude the tasksData if the type is setupCategories or setupTags https://github.com/Expensify/App/blob/db592c9c9f56a6ce8208b898c1e5ba1eb864aae8/src/libs/actions/Report.ts#L3403-L3404

const excludeTasksData = ["setupCategories", "setupTags"]
const filteredTasksData = data.tasks.filter((task) => !excludeTasksData.includes(task.type))
const tasksData = filteredTasksData.map((task, index) => {

Result

https://github.com/user-attachments/assets/9b371b08-1add-4551-ad05-133e5683da42

NJ-2020 avatar Oct 29 '24 05:10 NJ-2020

@davidcardoza I can take this one since it's related to https://github.com/Expensify/App/issues/48745#issuecomment-2345255157

nkdengineer avatar Oct 29 '24 09:10 nkdengineer

@nkdengineer What do you mean? Is it your regression?

dukenv0307 avatar Oct 30 '24 03:10 dukenv0307

@nkdengineer What do you mean? Is it your regression?

@dukenv0307 It's not my regressions. It's related to the new feature that I'm working on here so I have more context on this and I'd like to work here.

nkdengineer avatar Oct 30 '24 03:10 nkdengineer

@jaydamani

const tasksData = data.tasks.filter(task => userReportedIntegration && (task.type == 'setupCategories' || task.type == 'setupTags')).map((task, index) => {

I understand your mean here is to filter out setupCategories and setupTags if users select the accounting connection. If so, the updated code should be:

    const tasksData = data.tasks.filter(task => !userReportedIntegration || (task.type != 'setupCategories' && task.type != 'setupTags')).map((task, index) => {

Is it correct?

dukenv0307 avatar Oct 30 '24 04:10 dukenv0307

@jaydamani

const tasksData = data.tasks.filter(task => userReportedIntegration && (task.type == 'setupCategories' || task.type == 'setupTags')).map((task, index) => {

I understand your mean here is to filter out setupCategories and setupTags if users select the accounting connection. If so, the updated code should be:

    const tasksData = data.tasks.filter(task => !userReportedIntegration || (task.type != 'setupCategories' && task.type != 'setupTags')).map((task, index) => {

Is it correct?

@dukenv0307 yes, thanks for the correction. Updated proposal

jaydamani avatar Oct 30 '24 05:10 jaydamani

@jaydamani's proposal look good to me. We should hide the "Setup Categories" and "Setup Tags" in case users select an accounting connection

🎀👀🎀 C+ reviewed

dukenv0307 avatar Oct 30 '24 08:10 dukenv0307

Triggered auto assignment to @chiragsalian, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Oct 30 '24 08:10 melvin-bot[bot]

The op of the issue has been update to reflect recent conversations around combining the tasks rather than removing then. @marcaaron I looped you in per the convo in the linked Slack conversation.

davidcardoza avatar Oct 30 '24 18:10 davidcardoza

Updated proposal based on this. Also, @davidcardoza @marcaaron please share the task description/title and any other relevant details if it was discussed in the slack conversation as external contributors can not access it. I have added some placeholder strings for now.

jaydamani avatar Oct 30 '24 20:10 jaydamani

Ok, so seems like we want this for the task content @jaydamani can you update your proposal. What you have there now doesn't seem correct.

Screenshot 2024-10-30 at 12 19 17 PM

marcaaron avatar Oct 30 '24 22:10 marcaaron

Everything else looks good.

marcaaron avatar Oct 30 '24 22:10 marcaaron

Triggered auto assignment to @greg-schroeder (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

melvin-bot[bot] avatar Oct 30 '24 22:10 melvin-bot[bot]

Starting work on this but I might not be fully available due to Diwali so, expect PR to be ready for review by monday.

jaydamani avatar Oct 31 '24 14:10 jaydamani

Created draft PR

jaydamani avatar Nov 02 '24 13:11 jaydamani

@davidcardoza Is there some action that would automatically complete this task? I'm not sure what's desired here.

e.g. if a user sets up categories and tags manually then we could automatically mark this task as "done". But importing categories and tags from the integration should maybe also do this? Or are we good to have this task just be manual for now?

FE parts will be held on adding the task to the backend (and possibly also on the autocomplete logic).

marcaaron avatar Nov 04 '24 19:11 marcaaron

@davidcardoza, please confirm if the links in task description are correct,

  • connecting your accounting software will take user to Accountings page in workspace settings
  • workspace settings will take user to the first page in workspace settings

jaydamani avatar Nov 05 '24 19:11 jaydamani

Those are correct.

davidcardoza avatar Nov 06 '24 00:11 davidcardoza

If a user sets up categories and tags manually then we could automatically mark this task as "done". But importing categories and tags from the integration should maybe also do this? Or are we good to have this task just be manual for now?

Yes, it's fine to be manual for now. We agreed on the manual approach elsewhere on Slack, sorry I should have updated the GH.

davidcardoza avatar Nov 07 '24 23:11 davidcardoza

Backend PR in review https://github.com/Expensify/Auth/pull/13023

marcaaron avatar Nov 08 '24 01:11 marcaaron

Backend PR linked above was merged to prod today

greg-schroeder avatar Nov 11 '24 20:11 greg-schroeder

We should be able to proceed here now as the backend change was deployed.

marcaaron avatar Nov 12 '24 20:11 marcaaron

cc @jaydamani on the above!

greg-schroeder avatar Nov 13 '24 04:11 greg-schroeder

⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

melvin-bot[bot] avatar Nov 13 '24 04:11 melvin-bot[bot]

I didn't see a price on this issue, assuming standard $250 - please correct me if I'm wrong.

greg-schroeder avatar Nov 13 '24 04:11 greg-schroeder

@jaydamani left an update here

marcaaron avatar Nov 13 '24 19:11 marcaaron

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] avatar Nov 19 '24 12:11 melvin-bot[bot]

seems the deploy blocker is incorrect, hiding it as off topic

greg-schroeder avatar Nov 20 '24 21:11 greg-schroeder