Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

🛠️ Potential Solutions

Update the exist Enhance existing search input to accept and search by loyalty ID , and communicate with loyalty service to get the consumer information.

✅ Proposed Solution

...

  • Enhance the

...

  • existent search bar inside the home screen

...

  • to accept the loyalty id.

...

    • For that, it can be added a new line

...

    • to

...

    • highlight the new

...

    • type of data (loyalty id) and a new validation to the input that will expect the LoyaltyId(UUID) format.

...

    ...

    • Enhance admin app to consume

    ...

    • the loyaltyId and communicate to loyalty API.

      • For that, it can be created a new method in AdminApp to communicate with Intl Loyalty Middleware service.

      • This method will receive the loyaltyId and country and will return the customerId and email. With the customerId FE is already prepared to fetch customer related data as it does for other input searches.

    Zenuml sequence macro lite
    uuid21edafca-167a-456d-9207-3d2ea87845e1
    customContentId4737171649
    updatedAt2024-05-24T1729T19:37:39Z

    Add new graphQl call FE to BE in Admin App.

    ...

    35:01Z

    This idea is validated in this POC

    How to get the input data?

    Since loyaltyId information are stored in distributed tables per country. Loyalty Middleware API requires country as part of the inputs. E.g.: loyalty-es-users-plk-dev

    For that, proposed solution intends to pass the operator country using the following logic:

    • Go through all operators user groups and check one-by-one the <country>-admin groups.

    ...

    Based on that, admin-app needs to provide this country as part of the inputs.

    What if there are more than 1 country?

    Then admin-app needs execute one query per country and stop the search once it finds a customer. E.g.: In Iberia region (euw3) there are only 2 countries ( Portugal and Spain). Since it’s a support tool with few operators, no issues with performance is expected.

    Expand
    titleDetailed solution

    Schemas/Customer

    • Update the Query with the new method customerByLoyaltyId and update graphQl queries

      image-20240521-201830.pngImage Added

    • Create a new method customerByLoyaltyId inside the Query resolvers section (with the same signature and name of query above)

      image-20240521-200957.pngImage Added

      and this is the loyalty response

      Code Block
      {
        "createdAt": "string",
        "id": "string",
        "name": "string",
        "updatedAt": "string",
        "clientUserId": "string",
        "dateOfBirth": "string",
        "email": "string",
        "emailVerified": true,
        "expirationBuckets": [
          {
            "expirationDate": "string",
            "pointsToExpire": 0
          }
        ],
        "loyaltyTier": {
          "loyaltyTierExpiryDate": "string",
          "loyaltyTierKey": "Tier_1",
          "pointsEarnedInTimeConstraint": 0,
          "startAt": "string"
        },
        "metadata": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        },
        "offerRedemptionAvailability": {
          "availableAfter": "string",
          "transactionId": "string"
        },
        "phoneNumber": "string",
        "phoneVerified": true,
        "points": 0,
        "pointsEarningDisabled": true,
        "pointsExpiryDateKey": "string"
      }

    ...

    Expand
    titleDetailed solution

    Schemas/Customer

    • Update the Query with the new method customerByLoyaltyId and update graphQl queries

      image-20240521-201830.pngImage Removed

    • Create a new method customerByLoyaltyId inside the Query resolvers section (with the same signature and name of query above)

      image-20240521-200957.pngImage Removed
      • To get the User from Loyalty serivceservice, can be used this provider

      image-20240522-191903.png

    queries/customers

    Create a new query inside the customers queries

    image-20240522-195309.png

    Create a use query for consume the customerByLoyaltyId

    image-20240522-194947.png

    Add on the map section the new query

    image-20240522-195002.png

    universal-search/searchInstructions

    Add new descriptions to this list for loyalty id

    image-20240522-204049.png

    The text for loyaltyId already exist in Lokalize, avoiding the necessity of create a new string text.

    ⚠️Potential Challenges

    Was made a POC to map all the challenges and no one appear.Not applicable

    💰 Cost

    No additional cost will be necessary.Not applicable

    🎛️ Configuration

    No configuration will be necessaryOperators needs to be assigned to <country>-admin user groups.

    📈 Metrics

    Note

    To be defined by Design/Data Team.

    ...