Skip to content

[Improving System Messages] Add suspicious Expensify Card activity notifications to NewDot #70683

Description

@NicMendonca

Background

When our system detects an Expensify Card transaction as suspicious, the domain(s) and cardholder are notified via email, and a task is added to their Inbox asking if they recognize the change.

What the button looks like in Classic:

Image

Currently, this isn't available in NewDot.

Solution

Move this notification to NewDot for NewDot users. Let's replace the email and notification with the following actionable system message in the policy expense chat:

I identified suspicious Expensify Card activity for your Expensify Card ending in $cardLastFour. Do you recognize these charges?

[Transaction details]

[Yes] [No]

If "Yes" is clicked, then we can send this to the chat, with the actor being whoever clicked "Yes":

cleared the earlier suspicious activity. The card is reactivated. You're all set to keep on expensin'!

If "No" is clicked, then we can send something like this to the chat:

the card has been deactivated. [Please reorder a new one?]

Technical details

  1. In UpdateExpensifyCardFraudInfo.cpp, when we create the notification EXPENSIFY_CARD_INDIVIDUAL_FRAUD_ALERT, if the user is using NewDot, then create a system message. We need to make it actionable with the Yes/No buttons.
  2. We will need to queue an offline email for this using ReportUtils::createNotifyOfflineUsersAboutActivityJob($reportID, (int) $actionableForAccountID, false, false, true); where $reportID is the policy expense chat, perhaps around here, or in Notification_ExpensifyCardIndividualFraudAlert.

Metadata

Metadata

Labels

DailyKSv2NewFeatureSomething to build that is a new item.ReviewingHas a PR in review

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions