Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Necessary changes - summary

  • User Service API: Adapt GET user endpoint to also search by phone number

  • User Service API: Adapt the create method in user service to create a lookupByPhoneNumber record if a phone number is informed

  • User Service API: Adapt update-user lambda to update or create a lookupByPhoneNumber record if the phone number changed

  • User Service API: Add a isPhoneNumberVerified field to lookupByPhoneNumber interface. This is important to avoid impacting https://rbictg.atlassian.net/wiki/spaces/EGMT/pages/4329078785/Solution+Phone+Number+Authentication+for+BK+SA#Customer-support-tool

  • User packages: Change getByPhoneNumber to use User Service API instead of directly accessing the database

  • Admin App Backend: Create a GraphQL query to request customers by phone number

  • Admin App Frontend: Add the option to search customers by phone using the new query

  • DynamoDB: Develop a migration script to create lookupByPhoneNumber for existing customers

Diagrams

Search customer by phone sequence diagram:

Necessary changes - details

intl-user-service

  1. Include the isVerified field in IUserLookupByPhone Interface: https://github.com/rbilabs/intl-user-service/blob/master/src/users/user-lookup-by-phone.repository.ts#L25-L30

export interface IUserLookupByPhone {
  pk: string;
  pk2: string;
  sk: string;
  sk2: string;
  isVerified: boolean;
}
  1. Create lookupByPhoneNumber record after creating the user in dynamo inside the pre-signup lambda, but only if a phone number is informed: https://github.com/rbilabs/intl-user-service/blob/master/src/cognito-lambdas/pre-signup.service.ts#L135

  2. Update the lookupByPhoneNumber record if an user update is triggered and includes the phone number: https://github.com/rbilabs/intl-user-service/blob/master/src/users/update-comm-pref.service.ts#L150

  3. Adapt the get user endpoint to have an phoneNumber query field, that searches by phone: https://github.com/rbilabs/intl-user-service/blob/master/src/users/users.controller.ts#L124

  4. Create a LaunchDarkly Flag and request it via a backend query (https://github.com/rbilabs/intl-admin-app/blob/master/src/remote/queries/launch-darkly.ts )

intl-packages

This changes are already implemented in this git branch: https://github.com/rbilabs/intl-packages/pull/961

intl-admin-app

  • Create a GraphQL query that uses the searchByPhone method exposed by intl-packages

  • Update the UI to display the search by phone number option

These main changes are implemented in this git branch: https://github.com/rbilabs/intl-admin-app/pull/242

  • No labels