Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Uses existing lookup record structure

  • Search will work with both phone numbers included in the order or in the user account

  • Doesn’t require phone verification

  • Doesn’t require migration scripts, the search will work as long as the user has made one order after the feature release

...

  • A phone number can only be associated with a single customer, which will be the first one to inform the number on the platform

  • There isn’t a simple way to delete the link between an a user and a phone number recorded in a delivery order. One possibility is allowing customer support to remove the link via the support tool if it is outdated.

Implementation Proposal

The sequence diagram below represents one possible implementation of the solution where the responsibility of managing lookup records stay in the intl-users packages.

...

POC

The code below creates lookup records if they don’t exist when the order is committed.

...

  1. Commit an order with delivery.dropoff.phoneNumber +222222

    image-20240118-155822.png

  2. Validate record in database

    image-20240118-160259.png

  3. Searching phone in support tool

    image-20240118-160837.png

  4. Customer details

    image-20240118-160929.png

Solution 2

The solution Solution 2 uses the exact same strategy of as solution 1, the only difference is that it proposes to update the lookup record structure so that it can link multiple phone numbers to multiples multiple customers. Below is an a suggestion of the new record:

Code Block
{
  pk: `phone_user#${cognitoId}`,
  pk2: `phone#${phoneNumber}`,
  sk: `createdAt#${createdAt}`,
  sk2: 'createdAt#${createdAt}',
}

With these changes, the search by phone will return a list of customers instead of a single one and avoid the problem of manual record deletion that solution 1 requires. However, the support tool front end will also have to be adapted so that customer support can choose which one they want to check given the list of customers associated with that phone number.

...

  • Require the development of a new page in the support tool front end to select which customer they want to check

  • Although very unlikely, there is a scenario where a single phone number is linked to many customers and this might make the process to of finding the right one cumbersome

...