Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.09k stars 2.6k forks source link

[TRACKING] [MEDIUM] Enable P2P distance requests #23291

Open JmillsExpensify opened 11 months ago

JmillsExpensify commented 11 months ago

DESIGN DOC ➡️

Proposal

Proposal: Add support for P2P distance requests

Problem: Expensify makes it easy to request money from a friend, split a dinner receipt with a group, or request reimbursement for a company expense. We are also building a seamless bottom up flow in wave 6 to upgrade P2P requests into a workspace requests. No matter the request type, everything is possible; except for distance requests, which can only be sent to workspaces. Not only does this create an inconsistent and confusing UX for requesting money, but the bottom up flow will also be limited to manual and scan requests. We will miss out on converting distance request users from free to paid plans, losing out on valuable revenue.

Solution: Add support for P2P distance requests whether you’re requesting from a friend, splitting expenses for a road trip, or introducing your boss to the power of Expensify for distance tracking.

Posted in #whatsnext here on 10/24/23


Long version Hey everyone! I'm excited to move forward with this project after the[ #whatsnext post](https://expensify.slack.com/archives/CC7NECV4L/p1698164341635109). Here is the expanded proposal. Proposal: Enable P2P distance requests so that the bottom up flow works for all expense types. Strategy: If someone hears about Expensify (from chalk on a sidewalk or seeing the logo as a prestigious racing sponsor), our viral growth model can convert that curious onlooker into a paying customer. No matter the type of expense they want to create: a simple request, scanning a receipt, or tracking distance; the user can jump into the app and get started. Select the start and finish points, choose who you want to send it to, and be done. When the new user's boss gets the request they click the big green "Pay" button and can select "Business bank account". As described in the[ wave 6 basic bottom up flow](https://docs.google.com/document/d/1pFEepu3ih7_NxPxudIXMa5KMF8POp4IM-ZIcANS8srY/edit), that kicks off an elegant process of creating a workspace, starting a free trial, setting up the bank account, and moving the request over to the workspace chat. Of course, the receiver may also be your carpool buddy that is a bit too comfortable with getting a ride to work everyday; or you might split the cost of your road trip with friends. The possibilities are endless with a super app, after all. Problem: Expensify makes it easy to request money from a friend, split a dinner receipt with a group, or request reimbursement for a company expense. We are also building a seamless bottom up flow in wave 6 to upgrade P2P requests into workspace requests. No matter the request type, everything is possible; except for distance requests, which can only be sent to workspaces. Not only does this create an inconsistent and confusing UX for requesting money, but the bottom up flow will also be limited to manual and scan requests. We will miss out on converting distance request users from free to paid plans, losing out on valuable revenue. If a user hears about Expensify's distance tracking feature and wants to try it out they will jump into the app, click the green plus, request money, select distance, enter their waypoints and click next. So far they are dazzled by the ease of use and our fancy Mapbox animations. However, on the next page, they enter the email address of the person who owes reimbursement for their trip, and they see a little error message saying that distance requests can only be sent to a workspace. "Huh, that's weird. What am I supposed to do now?", they think. Confused, they close the app and never come back. Solution: Enable P2P distance requests whether you’re requesting from a friend, splitting expenses for a road trip, or introducing your boss to the power of Expensify for distance tracking. First, allow individuals to be selected, as well as split with. The existing distance field can be separated into distance and rate fields on the confirmation screen; which is the last step before creating the request. The user can click “Rate” to input the rate amount and unit. It will be saved to the user's personal workspace, making it sticky for subsequent requests. An added benefit is that the user doesn't have to configure the rate separately in settings. For workspace requests the rate will also be displayed, but it will not be editable because it comes from the workspace settings and can only be changed by admins. On the backend the basic operations and format stay the same. We will extend the existing P2P and split functionality to work with distance transactions. Distance requests already use the same underlying function as the rest of the expense types, so it's mostly a matter of setting up additional parameters. Along the way there will be close collaboration with the wave 6 bottom up flow team, to ensure that our designs mesh well out of the box. The test steps will focus on the upgrade flow for distance requests since that's the most important part of the solution. Please keep an eye out in[ #wave5-free-submitters](https://expensify.enterprise.slack.com/archives/C05DWUDHVK7) for a pre-design coming soon! Best, Neil

Emailed to strategy@expensify.com on 11/6/23 with the subject Proposal: Enable P2P distance requests so that the bottom up flow works for all expense types.

Tasks

Issue OwnerCurrent Issue Owner: @neil-marcellini
neil-marcellini commented 7 months ago

Today I'm going to create threads in the wave5 room for all outstanding high level discussions.

ryanldonato commented 7 months ago

I have read and reviewed this Design Doc!

neil-marcellini commented 7 months ago

I wrote up the outstanding high level discussions in a Slack canvas. I'll post them to the Slack room tomorrow morning so that I can actively guide the discussions.

neil-marcellini commented 7 months ago

I posted the outstanding high level discussions here. Please chime in!

neil-marcellini commented 7 months ago

All the conversations there have been wrapped up and we reached some good decisions. I'm going to update the doc accordingly, request a few more mockups, and then I'll ask those who left the original comments for another review. After that I can start writing the detailed design. I'm also planning to recruit a contributor from Callstack to write the front end part of the high level to make things go even faster.

neil-marcellini commented 7 months ago

I got everything updated and asked @shawnborton for more mockups and some updates.

shawnborton commented 7 months ago

Just getting back from Thanksgiving break today, will work on these soon!

shawnborton commented 7 months ago

Hmm, Melvin, remove overdue please!

neil-marcellini commented 7 months ago

I'm the issue owner so I think it's up to me to remove overdue haha. No need to worry about it if you're not marked as the owner. I'll take a look at the updates and ask for re-reviews once I think it's good to go.

neil-marcellini commented 7 months ago

Shawn is updating the mocks and Tom and I are discussing it.

neil-marcellini commented 7 months ago

I brought the conversations to the Slack room again here in an effort to keep this moving with urgency.

neil-marcellini commented 7 months ago

Everything is resolved and updated for the high level design other than the distance rate violation mockups being discussed in Slack here, and the marketing considerations which @joaniew says she will have updated by EOD.

joaniew commented 7 months ago

It's been updated!

On Wed, Nov 29, 2023 at 1:53 PM Neil Marcellini @.***> wrote:

Everything is resolved and updated for the high level design other than the distance rate violation mockups being discussed in Slack here https://expensify.slack.com/archives/C05DWUDHVK7/p1701294682674899?thread_ts=1701215779.037409&cid=C05DWUDHVK7, and the marketing considerations which @joaniew https://github.com/joaniew says she will have updated by EOD https://expensify.slack.com/archives/C05DWUDHVK7/p1701279663425459?thread_ts=1701215779.967609&cid=C05DWUDHVK7 .

— Reply to this email directly, view it on GitHub https://github.com/Expensify/App/issues/23291#issuecomment-1832759767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6IPKHLZDGUZRXQGSVMDZ3YG6VFXAVCNFSM6AAAAAA2RXKKNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZSG42TSNZWG4 . You are receiving this because you were mentioned.Message ID: @.***>

-- Joanie Wang Director of Marketing and Brand You weren't born to do expenses http://use.expensify.com/

neil-marcellini commented 7 months ago

Update for today posted here

robertjchen commented 6 months ago

I have read and reviewed this Design Doc!

melvin-bot[bot] commented 6 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini Whoops! This issue is 2 days overdue. Let's get this updated quick!

neil-marcellini commented 6 months ago

Today I thought through the design for splits in Web-E, then P2P and split in Auth. I took notes and wrote down important design decisions and considerations in the Slack canvas for our detailed pre-design.

Tomorrow I need to walk myself through returning the necessary data, then ensuring all data can be read properly, and finally go through the update (edit) flow.

I asked @koko57 for some updates in Slack too.

neil-marcellini commented 6 months ago

I stumbled through returning / pushing the proper data. I got into the weeds a little bit trying to figure out how to reuse code that sends Onyx updates from Auth, and asked some questions about that in Slack here. As of right now we can only call queueOnyxUpdates in Auth from a command so it's hard to reuse. I'll skip over those details for now.

I still need to verify data can be read properly, go through the update (edit) flow, and deal with rate out of policy violations.

neil-marcellini commented 6 months ago

Some chores and 360s came up the last few days so I haven't had a chance to work on this. Planning to get back on it today and next week.

neil-marcellini commented 6 months ago

Remaining design considerations for pre-design research:

neil-marcellini commented 6 months ago

Notes for reading data are done, and I started looking into editing P2P rate.

melvin-bot[bot] commented 6 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini Whoops! This issue is 2 days overdue. Let's get this updated quick!

neil-marcellini commented 6 months ago

I didn't have time for this yesterday due to deploying web. Hopefully that will go faster today. This is my top focus.

neil-marcellini commented 6 months ago

My update from yesterday was posted here.

neil-marcellini commented 6 months ago

I need to update my plans for the edit flow, considering this refactor [DISTANCE] [Tracking] LOW: Refactor UpdateDistanceRequest in Auth/PHP/App to follow 1:1:1 pattern and split it out per field. I kind of forgot about that.

neil-marcellini commented 6 months ago

I made some good progress today. I finished these items:

Here's what's left

I'm aiming to send the pre-design tomorrow or Wednesday.

neil-marcellini commented 6 months ago

I ran out of time in my 4 hour day. I prioritized reviewing CRITICAL wave5 PRs.

neil-marcellini commented 6 months ago

I wrote some code for wave5 today and reviewed a bunch of PRs, so I ran out of time again. Tomorrow I'll start on this first thing!

neil-marcellini commented 6 months ago

I finished reviewing Agata's frontend notes and I left an update about my plan in Slack. I moved her frontend notes into the doc and addressed my own review comments from the Slack canvas, for about half of the notes. I want to finish cleaning that up, then write the pre-design questions.

It's taking me a bit longer than expected because so much has changed on the frontend since I last looked at distance requests super closely.

neil-marcellini commented 6 months ago

👀 squeezing in 30m to keep updating the frontend notes. Also, Agata said she's around next week.

neil-marcellini commented 6 months ago

I updated some more of the notes about the rate field. We need to figure out how we're going to store the user's selection for the customUnitRate for workspace requests. I think probably optimistically under transaction.comment.customUnit.customUnitRateID.

I'm not sure if I'm going into too much detail, but I think we should at least figure out details about how the data is stored, used, and updated on the frontend, for the full flow.

I plan to work on this for a couple of hours on Tuesday the 26th.

melvin-bot[bot] commented 6 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini Whoops! This issue is 2 days overdue. Let's get this updated quick!

neil-marcellini commented 6 months ago

Planning to work on this for a good chunk today.

neil-marcellini commented 6 months ago

I posted the pre-design here. I'm glad to be over that little hurdle.

I'll try to guide any conversations there before I go OOO, and then keep working on the frontend design with Agata. I don't think it will take much time to get the detailed doc ready for review once I get back from OOO.

neil-marcellini commented 6 months ago

We landed on some pretty significant changes as a result of the detailed pre-design. I posted a summary here.

neil-marcellini commented 6 months ago

❗ 🔥 Heads up, I'm going to be OOO working 0% from 1/1-1/12/24. I'll be back on 1/15/24. I'm planning to work 50% tomorrow 12/29. Please feel free to un-assign, re-assign, whatever. When I return I'll pick back up whatever I can and do my best to GSD in order of priority. I will also post all of my assigned issues in #engineering-chat in Slack to try to recruit volunteers.

melvin-bot[bot] commented 6 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] commented 5 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini Whoops! This issue is 2 days overdue. Let's get this updated quick!

shawnborton commented 5 months ago

Let me know if anything is needed from me here.

JmillsExpensify commented 5 months ago

Not sure what is outstanding here, though I think it's re-write the HL design based on recent discussions.

melvin-bot[bot] commented 5 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini Eep! 4 days overdue now. Issues have feelings too...

shawnborton commented 5 months ago

Chill Melv. @neil-marcellini is OOO until 1/15. Is anyone else stepping in to make progress while he is out?

shawnborton commented 5 months ago

Hmm, not sure why the Overdue label didn't get removed here.

melvin-bot[bot] commented 5 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] commented 5 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini 10 days overdue. Is anyone even seeing these? Hello?

dylanexpensify commented 5 months ago

@shawnborton this is cause Neil has the ⭐ - so only he gets impacted by the Overdue aspect!

melvin-bot[bot] commented 5 months ago

@JmillsExpensify, @shawnborton, @neil-marcellini 12 days overdue. Walking. Toward. The. Light...

JmillsExpensify commented 5 months ago

Neil is still OOO

melvin-bot[bot] commented 5 months ago

This issue has not been updated in over 14 days. @JmillsExpensify, @shawnborton, @neil-marcellini eroding to Weekly issue.

neil-marcellini commented 5 months ago

Ok I'm back, picking this up again. I will start updating the high level based on the changes we landed on from the detailed pre-design. See the summary here. After that, I will do another detailed pre-design conversation to make sure we agree on the technical aspects of we're going to implement the new plan.