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

« Previous Version 17 Next »

Table of Contents


Open questions

Business Questions

  1. Is there a business rule that demands that only verified phone numbers can be used in customer search?

Business Answers

Tech Questions

  1. Why do two different Interfaces for lookupByPhone records exist? (one in user-service and another in intl-packages)

  2. Does accessing user-service phone lookup records from intl-packages violate the current architecture?

  3. Since Admin App is not using Launch Darkly, does it have a strategy defined for Feature Toggles?

Tech Answers

  1. This is legacy from US, and neither of them are used today, since sign up via phone is disabled in international.

  2. Yes, we should create a new endpoint in user-service to search by phone number.

Business problem

This feature aims to implement the option to search for customers by phone in RBI Admin tool. This was a business request from Iberia ( IREQ-961 - Getting issue details... STATUS ), given that customer support doesn’t always have the user’s email when trying to find them.

Tech Discovery

Architecture AS-IS

Today, Admin Tool only has the option to search customers by email or Cognito ID. The search by email is exemplified by the following sequence diagram.

The most direct solution is using intl-packages, which already exposes a method to search users by phone number and DynamoDB queries for userLookupByPhone records associating phone numbers to Cognito IDs. However, there is a divergence between the records created using intl-packages and the ones created by user-service, as can be seen below:

intl-packages:

{
  pk: phoneNumber,
  pk2: cognitoId,
  sk: current/user-lookup-by-phone
  sk2: current/user-lookup-by-phone/{date} 
}

user-service:

{
  pk: phone#${phoneNumber},
  pk2: phone_user#${cognitoId},
  sk: v0_UserPhone,
  sk2: v0_UserPhoneUserPhoneLookUp,
}

The user-service record is created when a user verifies their phone number via SMS. As far as we can tell, no one is using intl-packages lookup records since its only reference is its own test.

Proposed solution n. 1

Add the option in intl-packages to search users by phone number, and change user-service API to create/update lookupByPhoneNumber records whenever there are changes in the customer's phone number.

It’s important to notice that since lookupByPhoneNumber records haven’t been created for existing users, a script will have to be developed to scan all users in DynamoDB and create their associated lookup records.

This poses a problem, given that Iberia doesn’t require the customer to verify its phone, the number of users with a verified number is extremely low, since they can use email

After that, it would be necessary to save the phone number added into the next delivery purchase (based on the user) as the validated number (when the phone does not exist).

PROS: The operator of the Admin tool can search by phone.

CONS: There will be a phone number that is not officially validated and it can generate cases where the operator will input a phone number that is not the one expected from the user, making the search not valid.

Rule on when and how to save the phone number need to be defined

Proposed solution n. 2 - deprecated

The same approach could be handled on the order side but, until now, we couldn’t find a way to connect the order with a user (no unique IDs existing).

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.