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

feat(btn): frm 1723 internal flow postman #7343

Merged
merged 19 commits into from
Jul 5, 2024

Conversation

KenLSM
Copy link
Contributor

@KenLSM KenLSM commented May 23, 2024

Problem

Closes FRM-1723

Solution

Migration of our SMS service from Twilio to Postman. We will want to remove Twilio completely and utilize specific Postman campaign IDs that's clearly segregated by (1) MOP and (2) INTERNAL at the SmsService level. This switches our SMS decisions to be determined by the targetted demographics[1] as opposed to sending an SMS out from the FormSG.

A new Service, PostmanSmsService, is created to allow us to control the roll outs before enabling it for all admins.

[1] This is necessary as we have a WOG mandate to ensure that ALL SMSes to MOPs must be from Postman.

#7342 implements the MOP flow of this new SMS service.

Breaking Changes

  • No - this PR is backwards compatible

Tests

Deploy Notes

sendAdminContactOtp: Admins verifying admin contact OTP should receive SMS OTP thru Postman

  • Login as admin
  • Click Profile > Emergency Contact > Verify
  • Ensure that the verification box prompts for OTP
  • Observe that postman records that an SMS has been sent
  • Ensure that the OTP number received

sendBouncedSubmissionSms: Admins with email submissions bounced should receive SMS notification thru Postman

  • Login as admin
  • Create an email form
  • Update your admin email to be a non-existent email on DB
  • Update your emergency contact number through Profile > Emergency Contact > Verify
  • As a respondent, make a submission to form
  • Ensure that SMS is received on number

New environment variables:

  • POSTMAN_INTERNAL_CAMPAIGN_ID
  • POSTMAN_INTERNAL_CAMPAIGN_API_KEY

Copy link

linear bot commented May 23, 2024

Copy link

mergify bot commented May 23, 2024

⚠️ The sha of the head commit of this PR conflicts with #7342. Mergify cannot evaluate rules on this PR. ⚠️

@KenLSM KenLSM changed the base branch from develop to feat/frm-1717-mop-flow-to-postman May 23, 2024 17:21
@KenLSM KenLSM changed the title feat: frm 1723 internal flow postman feat(btn): frm 1723 internal flow postman May 24, 2024
@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from 7daf1d7 to 6a68b77 Compare May 29, 2024 07:39
@KenLSM KenLSM requested a review from sebastianwzq June 3, 2024 03:56
@KenLSM KenLSM force-pushed the feat/frm-1717-mop-flow-to-postman branch from a9a581c to 193a1eb Compare June 17, 2024 16:38
@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from e7a4a5b to a86de0a Compare June 17, 2024 17:02
@KenLSM KenLSM force-pushed the feat/frm-1717-mop-flow-to-postman branch from 61918a0 to 753925a Compare June 18, 2024 10:53
@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from 3b9b4e1 to a805f0b Compare June 18, 2024 11:28
@KenLSM KenLSM requested a review from sebastianwzq June 20, 2024 06:09
Base automatically changed from feat/frm-1717-mop-flow-to-postman to develop June 20, 2024 06:39
@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from 1dbc994 to d567ca4 Compare June 20, 2024 06:47
@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from d567ca4 to bfdf027 Compare June 30, 2024 16:30
@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from bfdf027 to 179ee8a Compare July 5, 2024 16:49
Copy link
Contributor Author

KenLSM commented Jul 5, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @KenLSM and the rest of your teammates on Graphite Graphite

@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from 179ee8a to dcb7b4b Compare July 5, 2024 16:56
@KenLSM KenLSM force-pushed the feat/frm-1723-internal-flow-postman branch from dcb7b4b to 3eb8211 Compare July 5, 2024 17:21
@KenLSM KenLSM merged commit f8763c5 into develop Jul 5, 2024
13 checks passed
@KenLSM KenLSM deleted the feat/frm-1723-internal-flow-postman branch July 5, 2024 17:42
@KenLSM KenLSM mentioned this pull request Jul 7, 2024
35 tasks
g-tejas pushed a commit that referenced this pull request Jul 18, 2024
* add postman sms service

* feat: add user betaflag for postman sms

* add sendBouncedSubmissionSms

* test: add sendBouncedSubmissionSms cases

* add sendFormDeactivatedSms

* add sendAdminContactOtp

* add package-lock

* remove non-mop sms services, point sms.errors to postman-sms.errors

* migrate non-mop smses to use postman sms service

* update tests to remove migrated functions

* fix incorrect api key reference

* fix form.admin not populated before passing into flag field

* update test cases for bounce, sms service

* update test cases for bounce service

* update test cases for user controller

* update sms error import path

* refactor: rename mop sms to use internal api convention, fix typo on logmeta.action

* chore: fix build failures due to merge conflicts

* chore: remove redundant logs
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

Successfully merging this pull request may close these issues.

2 participants