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

Change SMS templates to comply with the new DLT Guidelines #1741

Open
djamg opened this issue Jun 8, 2023 · 13 comments
Open

Change SMS templates to comply with the new DLT Guidelines #1741

djamg opened this issue Jun 8, 2023 · 13 comments
Assignees

Comments

@djamg
Copy link
Contributor

djamg commented Jun 8, 2023

According to the new DLT guidelines, an SMS template can not contain more than 2 variables (in some cases 3) and any 2 variables cannot be consecutive. This has resulted in the blacklisting of our current templates, which must be modified.

For example - The current project start notification template looks like this:
{project.title} starts at {project.start_time}. {project.link} {unsubscribe_link} to stop - Hasgeek

This example contains four variables and one place with 2 consecutively placed variables.

What should the updated template look like?

@djamg djamg assigned jace and djamg Jun 8, 2023
@jace
Copy link
Member

jace commented Jun 8, 2023

Our templates typically have four variable components:

  1. Context for where something happened
  2. Context for what happened
  3. A content link
  4. An unsubscribe link

This will now be reduced to two:

  1. Context for where and what, combined
  2. A single content link

To roll the unsubscribe link into the content link, we can:

  1. Use a single link in the form https://has.gy/<shortlink>/<unsubscribe_token>. The split form allows keeping notification metadata separate from the content shortlink, and can be used to insert a banner for managing notification preferences
  2. Use only a content link in the form https://has.gy/<shortlink>. There is still some context for the notification in the utm_source tag. However, one click unsubscribe will no longer be possible.
  3. Use a static link https://bye.li in the registered text. This will merely redirect to the notifications page, and once again does not offer one-tap unsubscribe. It will require the user to login to see their preferences. However, we can highlight notifications that have been recently active.

@jace
Copy link
Member

jace commented Jun 8, 2023

Candidate template for project/session starting:

Python: {project} is starting at {time}: {link}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} is starting at {#var#}\n\nhttps://bye.li to stop - Hasgeek

This assumes time + ': ' + link fits into 30 chars. Links are in the form https://has.gy/1234 and have exactly 19 chars (in the shorter 4 char variant that we use for SMS). The separator is an additional 2 chars, leaving 9 for the time. A timestamp in the form 10:30 AM is 8 chars.

If we include an unsubscribe token in the shortlink, the math changes to 24 chars for the link, 2 for the separator, and only 4 for the time. This will force military-style time in the form …is starting at 1030: https://…

Update: Template variant with more static text:

✅Approved
Python: Reminder: {project} is starting soon. Join at {link}\n\nhttps://bye.li to stop - Hasgeek
DLT: Reminder: {#var#} is starting soon. Join at {#var#}\n\nhttps://bye.li to stop - Hasgeek

Update: Implemented in #1742.

@jace
Copy link
Member

jace commented Jun 8, 2023

Options to shave some chars in the link:

  1. Use http:// instead of https://. Saves one char and redirects to HTTPS anyway. Since HSTS is enabled, the device browser will automatically translate it to HTTPS. However, there is risk of some users worrying about an unencrypted link.
  2. Drop the prefix and use a raw link as has.gy/<code>. This will need testing in multiple SMS clients to verify if such URLs are recognised.
  3. Same but use //has.gy/<code> in the hope the // is recognised as a URL
  4. Try hasgeek.com/+<code> or hasgeek.com/@<code> in the hope unprefixed .com URLs are recognised. This is a 13 char prefix, versus 14 or 15 for the fully prefixed .gy TLD.

These tests don't need registered SMS templates. A regular SMS will work.

@jace
Copy link
Member

jace commented Jun 12, 2023

Candidate templates for project registration:

✅Approved
Python 1: You have registered for {project}, scheduled for {datetime}. For more information, visit {url}.\n\nhttps://bye.li to stop - Hasgeek
DLT 1: You have registered for {#var#}, scheduled for {#var#}. For more information, visit {#var#}.\n\nhttps://bye.li to stop - Hasgeek

✅Approved
Python 2: You have registered for {project}. For more information, visit {url}.\n\nhttps://bye.li to stop - Hasgeek
DLT 2: You have registered for {#var#}. For more information, visit {#var#}.\n\nhttps://bye.li to stop - Hasgeek

Variant 1 has three variables. If this becomes a problem, we can try a static link variant: You have registered for {project}, scheduled for {datetime}. Manage your registrations and notifications at https://hasgeek.com/account - Hasgeek

@jace
Copy link
Member

jace commented Jun 14, 2023

Required templates by notification:

  1. rsvp_yes
  2. comment_reply
  3. comment_proposal
  4. comment_project
  5. user_password_set
  6. update_new
  7. proposal_received
  8. proposal_submitted
  9. project_starting (with and without an upcoming session timestamp)
  10. comment_report_received
  11. rsvp_no
  12. organization_membership_granted
  13. project_crew_membership_granted
  14. organization_membership_revoked
  15. project_crew_membership_revoked
  16. New: project_published

@djamg
Copy link
Contributor Author

djamg commented Jun 14, 2023

New comment notification for different document types:
✅Approved
Comment reply:
Python: {actor} has replied to your comment: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} has replied to your comment: {#var#}\n\nhttps://bye.li to stop - Hasgeek

✅Approved
Project:
Python: {actor} commented on a project you are in: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} commented on a project you are in: {#var#}\n\nhttps://bye.li to stop - Hasgeek

✅Approved
Proposal:
Python: {actor} commented on your submission: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} commented on your submission: {#var#}\n\nhttps://bye.li to stop - Hasgeek

Unknown:
Python: {actor} replied to you: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} replied to you: {#var#}\n\nhttps://bye.li to stop - Hasgeek

@djamg
Copy link
Contributor Author

djamg commented Jun 14, 2023

Update notification:
Python: Update in {project}: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: Update in {#var#}: {#var#}\n\nhttps://bye.li to stop - Hasgeek

The above text contains consecutively placed variables that aren’t permitted according to the DLT guidelines. Here is an updated version
Python: {project} has an update: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} has an update: {#var#}\n\nhttps://bye.li to stop - Hasgeek

✅Approved
New update notification
Python: There is an update in {project}: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: There is an update in {#var#}: {#var#}\n\nhttps://bye.li to stop - Hasgeek

@djamg
Copy link
Contributor Author

djamg commented Jun 14, 2023

Proposal Notification:

✅Approved
Proposal received:
Python: There's a new submission from {actor} in {project}. Read it here: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: There's a new submission from {#var#} in {#var#}. Read it here: {#var#}\n\nhttps://bye.li to stop - Hasgeek

✅Approved
Proposal submitted:
Python: {project} has received your submission. Here's the link to share: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} has received your submission. Here's the link to share: {#var#}\n\nhttps://bye.li to stop - Hasgeek

@djamg
Copy link
Contributor Author

djamg commented Jun 22, 2023

- Hasgeek is not required if the brand name is registered with the template because it will get appended to the template message.

It is not clear when to attach the brand name to a template. It depends on the customer service agent.

@jace
Copy link
Member

jace commented Jun 23, 2023

Maybe we just stop putting it in our text and let VILPower decide whether to append. We started doing that only because Airtel demanded it.

@jace
Copy link
Member

jace commented Jul 21, 2023

New template for MNRL notice (related: #1786 and #1810):

Hi {user}, your number has appeared in the Mobile Number Revocation List and has been removed from your Hasgeek account for your safety. If this is wrong, mark it active at {url}. See https://mnrl.trai.gov.in/ for details.

@djamg
Copy link
Contributor Author

djamg commented Mar 26, 2024

Project/Event Starting Notification:

✅Approved
Default 10-minute reminder template:
Python: Reminder: {project} is starting soon. Join at {link}\n\nhttps://bye.li to stop - Hasgeek
DLT: Reminder: {#var#} is starting soon. Join at {#var#}\n\nhttps://bye.li to stop - Hasgeek

✅Approved
Template with venue:
Python: {account} has an in-person event tomorrow at {venue}. Details here: {url}\n\nhttps://bye.li to stop - Hasgeek
DLT: {#var#} has an in-person event tomorrow at {#var#}. Details here: {#var#}\n\nhttps://bye.li to stop - Hasgeek

✅Approved
Template with location:
Python: Reminder: {#var#} has an in-person event tomorrow in {#var#}. Details here: {#var#}\n\nhttps://bye.li to stop -Hasgeek
DLT: {#var#} has an in-person event tomorrow in {#var#}. Details here: {#var#}

@jace
Copy link
Member

jace commented Mar 27, 2024

We need to change all our templates to have a single link, to allow for link preview in SMS apps. This affects the unsubscribe link:

  1. Earlier we had direct unsubscribe links, but this required an extra DLT variable. The current https://bye.li is indirect as it requires login, which is not user friendly. This is causing people to report unwanted messages as spam instead.
  2. We can include an unsubscribe token with the shortlink itself using the method described in Integrated unsubscribe in SMS shortlinks #1914.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants