Expensify Classic contains an Expense rules feature that we're migrating to New Expensify. The functionality is being migrated "like-for-like," which means that mostly everything you can do on Classic, you'll be able to do on New Expensify. The project scope looks like this:
Expense rules live in Account
If no rules are present, then we'll show an empty state. New rule will also appear in the top right. Expense rules appears below Wallet and above Preferences.

Expense rule creation
We'll use a single step flow in the right-hand pane, which allows a user to enter a merchant, and at least one change.

If a user doesn't enter a merchant or a change, we'll show an error in-line, and also confirm what's required via a standard form error above the Save button (e.g. enter merchant and one change).

If a user enters a merchant but no corresponding change, then we'll only show a standard form error

Field screens
Merchant and rename merchant feature a text input

Update category is a single-select list

Note: From this thread, clicking an option should auto-select & close the RHP for that option
Change description is a text input

Reimbursable is a single select list and consistent with our existing filters on the Reports page

Note: From this thread, clicking an option should auto-select & close the RHP for that option
Same goes for billable

Note: From this thread, clicking an option should auto-select & close the RHP for that option
Add to a report named is a text input (note: if a workspace has default naming enabled, then this report name is overridden on creation).

Rule summary table
Upon successfully saving a rule, it'll appear in a table, which has three columns: checkbox, Merchant, and Change. Consistent with other tables, we'll truncate whatever changes don't fit within the fixed width column.
- If an individual row is checked then a green
[X] selected appears in the top right of the screen, with values for Update and Delete. Update is the same as clicking on the row. Delete shows a standard delete confirmation modal before actually deleting (e.g. title: Delete rule, text: Are you sure you want to delete this rule? with a red Delete button and a grey/button color for Cancel.
- Change contains a comma separated list of the changes, such as:
Rename merchant to [value]
Update category to [value]
Change description to [value]
Reimbursable, Non-reimbursable
Billable, Non-billable
Add a report named [value]
Editing post creation
If a user wants to edit a rule by clicking that row in the table, the values for that rule will open in the right-hand pane.

Other notes
- We will not previous matching historical expenses, like we do on Expensify Classic. That can be added in a follow-up issue pending customer demand.
- The mocks above show categories, since those exist by default in the policy. Though if a policy has tags, then they will appear as an option in a
Update tags row. Tags are single-select, just like categories. Equally, policies can have multi-tags so we've got to support that case as well.
Issue Owner
Current Issue Owner: @JmillsExpensify
Expensify Classic contains an
Expense rulesfeature that we're migrating to New Expensify. The functionality is being migrated "like-for-like," which means that mostly everything you can do on Classic, you'll be able to do on New Expensify. The project scope looks like this:Expense rules live in
AccountIf no rules are present, then we'll show an empty state.

New rulewill also appear in the top right.Expense rulesappears belowWalletand abovePreferences.Expense rule creation
We'll use a single step flow in the right-hand pane, which allows a user to enter a merchant, and at least one change.

If a user doesn't enter a merchant or a change, we'll show an error in-line, and also confirm what's required via a standard form error above the

Savebutton (e.g. enter merchant and one change).If a user enters a merchant but no corresponding change, then we'll only show a standard form error

Field screens
Merchant and rename merchant feature a text input

Update category is a single-select list

Note: From this thread, clicking an option should auto-select & close the RHP for that option
Change description is a text input

Reimbursable is a single select list and consistent with our existing filters on the

ReportspageNote: From this thread, clicking an option should auto-select & close the RHP for that option
Same goes for billable

Note: From this thread, clicking an option should auto-select & close the RHP for that option
Add to a report named is a text input (note: if a workspace has default naming enabled, then this report name is overridden on creation).

Rule summary table
Upon successfully saving a rule, it'll appear in a table, which has three columns: checkbox,
Merchant, andChange. Consistent with other tables, we'll truncate whatever changes don't fit within the fixed width column.[X] selectedappears in the top right of the screen, with values forUpdateandDelete.Updateis the same as clicking on the row.Deleteshows a standard delete confirmation modal before actually deleting (e.g. title:Delete rule, text:Are you sure you want to delete this rule?with a redDeletebutton and a grey/button color forCancel.Rename merchant to [value]Update category to [value]Change description to [value]Reimbursable,Non-reimbursableBillable,Non-billableAdd a report named [value]Editing post creation
If a user wants to edit a rule by clicking that row in the table, the values for that rule will open in the right-hand pane.

Other notes
Update tagsrow. Tags are single-select, just like categories. Equally, policies can have multi-tags so we've got to support that case as well.Issue Owner
Current Issue Owner: @JmillsExpensify