Context
As described in the technical refinement for the search by phone feature, the implementation consisted of creating phone lookup when a new order is committed. These lookup records enable the search in admin app.
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.
Phone number parsing
When creating the phoneLookupRecord, the user service parses the number value, and if it doesn’t include an international code, it automatically includedes one, using the sanitizePhoneNumber function.
0 Comments