Versions Compared

Key

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

...

Zenuml sequence macro lite
uuidfa485ed8-da3e-44af-a585-8ea8cb28e0e6
customContentId4598038727
updatedAt2024-03-27T18:26:56Z

PhoneLookupRecord

The phoneLookupRecords created to enable the search have the following structure:

Code Block
languagejson
{
  "pk":"phoneLookupUser#{cognitoId}",
  "sk":"phoneSource#{source}#phoneNumber#{phoneNumber}",
  "cognitoId":"{cognitoId}",
  "phoneNumber": "{phoneNumber}",
  "pk2": "phoneLookupNumber#{phoneNumber}",
  "sk2": "phoneSource#{source}#phoneUser#{cognitoId}",
  "source": "{source}"
}

They are structured in this manner to support two access patterns:

  1. Get phone numbers associated to a cognito id (search using primary index)

    1. Optionally, the local sort index can be used to retrieve only records originating from a single source (eg. order phones, user phones, verified phones)

  2. Get cognito ids associated with a phone number (search using brand-index)

Launch Darkly

The only feature toggle associated with this feature is the enable-search-by-phone, that controls if the phoneLookupRecords will be created after the order commit or not. The feature activation in an specific market can be controlled using the country parameter.

Currently, admin app uses a universal search bar, where the support agent can type a number or a word, therefore it doesn’t need a feature toggle. If the records don’t exist, the search will return the other searches (eg. phoneNumber, storeId, credit card, …) transparently.

...