lookit / lookit-api

Codebase for Lookit v2 and Experimenter v2. Includes an API. Docs: http://lookit.readthedocs.io/
https://lookit.mit.edu/
MIT License
10 stars 18 forks source link

Add email template text to Contact Participants page #1361

Open becky-gilbert opened 6 months ago

becky-gilbert commented 6 months ago

TL;DR

On a study's 'Contact Participants' page, we should show researchers the actual text that will emailed to participants, including anything we add to the email.

Description

As part of the changes to the ways email from researchers to participants are sent, we decided to add automated text about the relevant study/lab and contact info to the researcher message template (see #1359). It would be helpful for researchers if they could see the full email text on the 'Contact Participants' page.

Implementation options

There are two general approaches to this:

  1. We can add some automated text to all researcher-sent emails, and just display that text to the researcher somewhere on the page. Researchers would see this text but would not be able to edit it.
  2. We can pre-fill the message text box with the default text, which would encourage researchers to include it, but they would be able to remove it if they want to.

I believe we're going with 1, but we could switch to 2 if there's a good reason to do so.

One thing to consider about implementing this is that it would probably be more difficult to display the actual text that is sent to each individual participant, since information such as the child name will change when a message recipient is added/changed on the page. Also, it's possible for researchers to add multiple recipients to the same message, so we need to account for that case as well.

Thus the easiest solution might be to just display the template text with variables such as [CHILD_NAME]. We could either use similar static variable names for the study-specific information ([STUDY_NAME, LAB_EMAIL]). Or, since that information should be the same for all messages on a given study's Contact Participants page, it might not be too difficult to replace that information in the template text that is displayed on the page. Something like this:

Each message sent to participants will include the following text above/below your message:

"This is an email for [CHILD_NAME] from Fake Lab for "Awesome fun study!". You may reply to this email to message directly with the researchers at Fake Lab or email them at fakelab@email.com if you have other questions.

(YOUR MESSAGE HERE)

Update your CHS email preferences Unsubscribe from all CHS emails Questions or feedback for Children Helping Science?"

Screenshots

Here is a screenshot of the existing Contact Participants page, along with some suggestions for where we could add info about the additional default text that will be added to each email (or has been added to sent emails).

Screenshot 2024-03-07 at 1 47 11 PM

Question: How does the 'Previous Messages' table work when a message is sent to multiple recipients? Does it appear as a single row, or one row per recipient?

becky-gilbert commented 6 months ago

Update: this issue is on hold until we figure out whether/how to (1) handle emails sent to multiple families and (2) add the child's name to the view/message context. See also #1359