CDCgov / prime-simplereport

SimpleReport is a fast, free, and easy way for COVID-19 testing facilities to report results to public health departments.
https://simplereport.gov
Creative Commons Zero v1.0 Universal
58 stars 53 forks source link

develop implementation plan for tracking email sends to patients #8167

Open mirrorstage opened 1 month ago

mirrorstage commented 1 month ago

Description

In Metabase, we currently track Text Message Sent and Text Message Status in their respective tables. We do not, however, track email sent in support of the patient results-available notification.

As a Call to Action (CTA), an email is an important moment in the user journey where the application has nearly completed its value exchange with the user in the overall test/result loop. We also pay to send these. For both reasons, it would be useful to have our own count of emails sent. TBD if "status" is equally useful, as I/@mirrorstage don't know enough about that table's operations or intended use.

Proposed solution

Start tracking email sends, storing the data in Metabase.

Additional context

I believe we also send "Welcome to SimpleReport" emails to admins at new organizations. This could be an interesting secondary use case but needs review.

DanielSass commented 1 month ago

At first glance, it looks like similar to our sms tooling - sendgrid has webhooks that could theoretically give use similar updates: https://www.twilio.com/docs/sendgrid/for-developers/tracking-events/event

Should try to verify if there are billing implications for this feature.

mirrorstage commented 1 month ago

@DanielSass came here to ask "why do you suppose we track SMS in the first place but not SendGrid?" and discovered the answer is: Alicia wanted it -- https://github.com/CDCgov/prime-simplereport/issues/1266 -- in April 2021. but then maybe had forgotten about it by July when SendGrid was applied to this use case -- https://github.com/CDCgov/prime-simplereport/issues/2027