Add count of users passing fraud review to Identity Verification Report#9251
Conversation
changelog: Internal, Reporting, Add count of users passing fraud review to Identity Verification Report
| when Events::FRAUD_REVIEW_PASSED | ||
| event_users[Results::FRAUD_REVIEW_PASSED] << user_id if success == '1' |
There was a problem hiding this comment.
we could also add this filtering to the CW query itself? similar pattern as these:
| filter (name = %{usps_enrollment_status_updated} and properties.event_properties.passed = 1)
or (name != %{usps_enrollment_status_updated})
in hindsight the other branches here could have maybe been done similarly
There was a problem hiding this comment.
I also just realized. this branch is redundant because we have
event_users[event] << user_id
above. and since these are sets, it will not be duplicated
| 'IdV Reject: Doc Auth' => 3, | ||
| 'IdV Reject: Phone Finder' => 1, | ||
| 'IdV Reject: Verify' => 1, | ||
| 'Fraud: Profile review passed' => 1, |
There was a problem hiding this comment.
this is an "event", like a literal CW event name right? so we put it up above?
There was a problem hiding this comment.
Thanks for the guidance. I was trying to figure out the patterns here, and adding success = 1 to the query is what I was missing.
There was a problem hiding this comment.
I changed the code to print out the query and then tested it out in cloudwatch. Fixed one problem, thanks for the suggestion.
Started to amend this part of the query and left stray paren. Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
| def successfully_verified_users | ||
| idv_final_resolution_verified + gpo_verification_submitted + usps_enrollment_status_updated | ||
| idv_final_resolution_verified + gpo_verification_submitted + usps_enrollment_status_updated + | ||
| fraud_review_passed |
There was a problem hiding this comment.
In CloudWatch, I see that the Fraud: Profile review passed rows have the computed value identity_verified set to 1, so I checked whether adding the fraud_review_passed count here will double count them. Looks like identity_verified is only used for the final_resolution event, so the code should work as is. Tests pass.
🎫 Ticket
LG-11027
🛠 Summary of changes
Add a line to Identity Verification Report for users who have passed fraud review, using the new event added in #9194.
Incidentally fix spelling in the report.
📜 Testing Plan