Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush the email with unread message summary and send a separate email notification for money requests #34167

Closed
anmurali opened this issue Jan 9, 2024 · 83 comments
Labels
Engineering Hot Pick Ready for an engineer to pick up and run with Weekly KSv2

Comments

@anmurali
Copy link

anmurali commented Jan 9, 2024

Context here
Summarizing what we want with email notifications for money requests:

  • We want to continue to notify the user immediately via email when they receive a money request

  • We want to use a subject line for this notification, which is different from the report title so as to make it cleaner, more legitimate and more appealing to the receiver

  • We will update NotifyOfflineUsersAboutActivity to recognize when someone sends a money request -- and in that case:

    1. Set a custom subject
    2. Insert HTML formatted to mimic what it looks like in chat (being reworked in https://github.com/Expensify/Expensify/issues/364323)
    3. Make the CTAs automatically bring the user logged in to the action, which is handled here
    4. Send that one comment by itself as a nicely stylized, custom formatted, immediately delivered email that you can still reply to and otherwise functions just like any other comment notification
  • We want this subj line to be satisfying, i.e. it should ideally say who is asking you, and how much they are asking for. So in this case, the custom subject line will read <Sender> requests <currency><amount>

  • Sender - Use first and last name if available or fall back to sender's email/ SMS login info

NOTE: Here is the last solution we agreed upon.

@anmurali anmurali added Daily KSv2 Planning Changes still in the thought process labels Jan 9, 2024
@anmurali anmurali self-assigned this Jan 9, 2024
@melvin-bot melvin-bot bot added the Overdue label Jan 11, 2024
Copy link

melvin-bot bot commented Jan 12, 2024

Triggered auto assignment to @shawnborton (Design), see these Stack Overflow questions for more details.

@melvin-bot melvin-bot bot removed the Overdue label Jan 12, 2024
@anmurali
Copy link
Author

I will work on mocking this up first with @shawnborton and then we can apply the engineering label

@melvin-bot melvin-bot bot added the Overdue label Jan 14, 2024
@shawnborton
Copy link
Contributor

Not overdue, on my plate for this week.

@melvin-bot melvin-bot bot removed the Overdue label Jan 15, 2024
@shawnborton
Copy link
Contributor

@anmurali is there any more context that you are planning to provide before I dig it? Just responding to your comment "I will work on mocking this up first"

@anmurali
Copy link
Author

@shawnborton sorry I have not had a chance to jump in here since last week but I will provide more context on this tomorrow. This is also categorized as Low, so I am going to switch it to a Weekly

@anmurali anmurali added Weekly KSv2 and removed Daily KSv2 labels Jan 17, 2024
@shawnborton
Copy link
Contributor

Sounds good, just keep me posted!

@anmurali
Copy link
Author

anmurali commented Jan 17, 2024

Ok, so the scope of this issue is just to refactor the email notification that goes out when a money request is sent (DM or workspace chat).

This is what it looks like today
image

What we want to do is reuse the unreadMessage notification, specifically when custom subject lines are used.

This is what an email notification for a message that uses custom subject line looks like:

Chat view (Highlighted message):
image

Email view
image

To reuse this construct for money request notifications:

Title/ Subj: Sender requests $amount
Use Sender first and last name if available, fall back to sender email or phone number if not available

Body: We want this to be HTML and look exactly like the money request in the DM
image

Footer: This message was sent from Expensify. You can reply directly to this message, or pay by clicking on the Pay button

@shawnborton can we mockup this email and how the money request will look using custom subj line in the chat itself?

@shawnborton
Copy link
Contributor

and how the money request will look using custom subj line in the chat itself?

This part tripped me up a bit. Does this mean we'd be adding a custom subject line to every single money request in the app?

@shawnborton
Copy link
Contributor

To get the conversation started though, here is a first stab at this:
image

  • The email comes from Expensify ([email protected])
  • The body of the email looks pretty close to a chat with the actual chat UI
  • Footer message included as you requested

We might also consider doing something like a small intro blurb to our emails, something like:
image

or even add more logo power:
image

Then we can get even crazier and consider how we might just group together multiple outstanding items that need your attention:
image

(relevant thread in Slack about that idea above here, cc @RobertLadue @LLPeckham)

@anmurali
Copy link
Author

This part tripped me up a bit. Does this mean we'd be adding a custom subject line to every single money request in the app?

Yes, that's the idea. So maybe we should also add a mockup that shows how that looks in product?

Then we can get even crazier and consider how we might just group together multiple outstanding items that need your attention:

This will be the actual unread message summary. The custom subject line kicks off a realtime email notification of that specific message, which is the money request and nothing but the money request. But the general unread message summary, which is still sent when you're not active in the product would combine all the outstanding items (chats/ requests and everything else you missed)

I personally like the intro blurb without the logo power but if you look at the one with the logo power, it says Expensify so many times that it looks weird! What do you think @shawnborton
image

Speaking of intro blurb, should we also include a subtext to say what our product is/ does? Like Venmo does?
image
They have a lot, we needn't add ALL that - they do cause their MTLs require them to I think. But just a single sentence saying what our product is might be good? cc @GabiHExpensify

@shawnborton
Copy link
Contributor

I really don't think we should start adding subject lines above money requests - it definitely makes that flow feel way heavier. I think it's fine if the email subject exists but a subject doesn't exist in the product flow. Curious if @Expensify/design has any thoughts here too.

CleanShot 2024-01-21 at 19 16 31@2x

@shawnborton
Copy link
Contributor

I personally like the intro blurb without the logo power but if you look at the one with the logo power, it says Expensify so many times that it looks weird! What do you think @shawnborton

I agree with this in this particular case. So maybe something like this feels nicest?
image

Though I wonder if we want to see how all of this will interact with the work that Lindsey and Bob are doing with the combined daily summary? It feels like there is some overlap here.

@shawnborton
Copy link
Contributor

Speaking of intro blurb, should we also include a subtext to say what our product is/ does? Like Venmo does?

I don't feel too strongly here, but I can see where this is beneficial for users who have never heard of Expensify before and are receiving a request for the first time. I wonder if we could detect that in the notification and add this blurb for when we send something to a user who has never interacted with Expensify before?

@dubielzyk-expensify
Copy link
Contributor

I really don't think we should start adding subject lines above money requests - it definitely makes that flow feel way heavier. I think it's fine if the email subject exists but a subject doesn't exist in the product flow. Curious if @Expensify/design has any thoughts here too.

I agree with this

@dannymcclain
Copy link
Contributor

☝️ Same.

@anmurali
Copy link
Author

Don't we NEED that custom subject line above the money request to leverage the custom subject line logic on unreadMessage summary? I am wondering if your design feedback effectively means back to the drawing board on the plan itself #34167 (comment), especially 1 and 2?

@shawnborton
Copy link
Contributor

Don't we NEED that custom subject line above the money request to leverage the custom subject line logic on unreadMessage summary?

Can't we just send whatever we want as an email subject? Like right now we are just choosing a subject that doesn't come from the chat messages right?

I am wondering if your design feedback effectively means back to the drawing board on the plan itself #34167 (comment), especially 1 and 2?

I'm not entirely sure what you mean by this. I do think we can:

  • make the email look more like the real chat, by including the preview card
  • send whatever email subject we think is best in this particular case, even if the message itself doesn't have a subject

@anmurali
Copy link
Author

Bringing this discussion to Slack here

@anmurali
Copy link
Author

anmurali commented Jan 24, 2024

Ok based on that discussion above, I updated the issue description. Final mockup:

image

@MitchExpensify - I believe you will make sure this issue gets assigned to an engineer now?

@cristipaval
Copy link
Contributor

^PR up that makes the pending email with the activity to be flushed before the email with the money request

@cristipaval cristipaval changed the title Removing the separate email notification for money requests and refactoring unread message summary to include it instead Flush the the email with unread message summary and send a separate email notification for money requests Jun 20, 2024
@cristipaval cristipaval changed the title Flush the the email with unread message summary and send a separate email notification for money requests Flush the email with unread message summary and send a separate email notification for money requests Jun 20, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 21, 2024
@cristipaval
Copy link
Contributor

I'll continue on this one after finishing my #newdot-quality issue from my plate

@melvin-bot melvin-bot bot removed the Overdue label Jun 24, 2024
@cristipaval cristipaval added Weekly KSv2 and removed Daily KSv2 labels Jun 24, 2024
@melvin-bot melvin-bot bot added the Overdue label Jul 2, 2024
@cristipaval
Copy link
Contributor

I'm writing the detailed section for the Instant Submit for Control plans, which has higher priority

@melvin-bot melvin-bot bot removed the Overdue label Jul 3, 2024
@melvin-bot melvin-bot bot added the Overdue label Jul 12, 2024
@cristipaval cristipaval added the Hot Pick Ready for an engineer to pick up and run with label Jul 15, 2024
@cristipaval cristipaval removed their assignment Jul 15, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jul 15, 2024
@cristipaval
Copy link
Contributor

cristipaval commented Jul 15, 2024

I'm stepping back from this as I have a critical #newdot-quality issue and other wave-control stuff on my plate.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

This issue has not been updated in over 15 days. eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Aug 7, 2024
@trjExpensify trjExpensify added Weekly KSv2 and removed Monthly KSv2 labels Aug 9, 2024
@trjExpensify trjExpensify moved this from Release 2: Summer 2024 (Aug) to HOT PICKS in [#whatsnext] #wave-collect Aug 9, 2024
@trjExpensify
Copy link
Contributor

@cristipaval it would be helpful if you could provide a quick summary of what's left to do for this issue, now it's back in the pool. I see the Web PR is deployed: https://github.com/Expensify/Web-Expensify/pull/42416

But then, it's unclear what needs to happen next?

I'll continue on this one after finishing my #newdot-quality issue from my plate

@cristipaval
Copy link
Contributor

cristipaval commented Aug 12, 2024

I think this is where we're at:

Proposal: Send the current batch of unread messages before sending a separate custom email for new money requests

Background:

When a user requests money from another user we currently:

  • Queue an immediate notification (i.e. NotifyOfflineUsersAboutActivity will run as soon as possible)
  • The subject line will get updated to read <Sender> requests <amount>
  • The report link takes you to the parentReportID i.e. the “parent” workspace or DM chat of the request
  • The “Pay” button takes you directly to the expense report itself

Problem:

If there are already unread messages for the user we are notifying those will also display in this same email. This unnecessarily hides comments inside an email that appears to notify you of about one thing.

Solution:

  • Flush any existing notifications for other report actions first (without the request action)
  • Queue a separate notification for the request action with the custom subject and correct report link

Does that sound correct to everyone?

This is the PS that we all agreed on, here.

From the above, we partially implemented the Solution as follows:

  • Flush any existing notifications for other report actions first (without the request action)

This was implemented in this PR

  • Queue a separate notification for the request action with the custom subject and correct report link

We already have a separate email notification for the money requests. We need to audit to make sure it has the correct title and also verify where the Pay button links to: the parent report (policy chat) or the IOU/expense report.

@trjExpensify
Copy link
Contributor

The subject line will get updated to read requests

Marc updated that a while back here I believe.

The “Pay” button takes you directly to the expense report itself

Vivek fixed that here.

So this is how it looks:

image

One caveat, it's now not sending at all because of this change, but we're talking about how to resolve this here.

@cristipaval
Copy link
Contributor

Are we good to close this issue then? 🤔

@trjExpensify
Copy link
Contributor

If that's all you were doing as a next step, yep. Go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Hot Pick Ready for an engineer to pick up and run with Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests