Skip to content

[$250] [hold #91300] [CFI] Add Plaid connect/reconnect flow to NewDot #90572

@joekaufmanexpensify

Description

@joekaufmanexpensify

Coming from here, we need to add the Plaid connect/reconnect feature for business bank accounts to New Expensify. This is a feature that allows a user with a fully verified business bank account in the OPEN state to connect it to Plaid (if not already) for use with the Expensify Card OR to fix their Plaid connection if it's broken.

Details

  • There are two different cases for this in Expensify Classic today:
    • One is Connect. We show this option for business bank accounts provisioned for the Expensify Card that aren't connected to Plaid OR for a business bank account not connected to Plaid when the user has requested to use it with the Expensify Card (meaning it's on the waitlist).
    • Second is Fix. We show this for business bank accounts connected to the Expensify Card with a broken Plaid connection OR for business bank account requested to use with the Expensify Card on the waitlist with a broken Plaid connection.
    • We ONLY show these options in Expensify Classic today if the bank account is already used with the Expensify Card or is on the waitlist (meaning the user's requested it). Otherwise, they aren't shown. Even if not Plaid-connected, or if the Plaid connection is broken.
    • In Expensify Classic today, tapping one of the buttons directly prompts the user to connect to Plaid (bypassing the rest of the bank account verification flow, because the account is already verified).
    • If they successfully connect the account via Plaid, we remove the message/button on the frontend.
    • If the attempt is not successful, we continue showing the option after. I don't see we show any failure message.
    • If the bank account is already provisioned in the success case, it seems like we save/refresh Plaid token/assets and refresh the company credit limit. However, we don't seem to override a custom limit if one is set.
    • If the bank account is not provisioned in the success case (it's on the waitlist), it seems like we may try to automatically provision the card if every item on the card eligibility waitlist passes now.
  • Here's how I think we should handle this in New Expensify going forward:
    • Error should go on the bank account row on Wallet.
    • Seems fine to continue to use the same Connect and Fix buttons. Those are pretty clear.
    • We should use the new pattern from here with error and error button below the bank account row.
    • Tapping the button for a bank account in this state would open the Plaid iFrame in NewDot, same as OldDot.
    • User then connects their bank account.
    • We'll show an explicit success or failure message in a RHP after the user connects via Plaid as an improvement over classic.
    • We need a separate error case for when the user selects a different bank account in Plaid than the one we're expecting (which we don't allow). Seems like we block this on the backend already in classic, but there is no graceful error handling for it. It will follow the same error pattern as above in a RHP.
    • If the user successfully connects, we'd remove the Connect or Fix button. If not, we'd continue to show it, so they can try again.
    • For Connect, there will be no RBR or GBR leading to the button. Because while the user can connect, but they don't need to (and some people don't want to or can't use Plaid).
    • For Fix, We'll use a full RBR leading to the option, since it means they did connect to Plaid before and we want them to fix it.
    • Seems mostly fine to take the same backend actions when connecting/fixing account in NewDot as in OldDot. Only thing I would change is not trying to auto-provision a domain/workspace for a bank account on the waitlist. That seems potentially fraught for error, given Expensify card provisioning works differently in New Expensify with feeds shown at the workspace level, but curious if others agree.

Connect flow

Image Image Image

Fix flow

Image Image Image

Error cases

Image Image
Upwork Automation - Do Not Edit

Metadata

Metadata

Labels

DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHot PickReady for an engineer to pick up and run withNewFeatureSomething to build that is a new item.

Type

No type
No fields configured for issues without a type.

Projects

Status

HIGH

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions