Versions Compared

Key

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

...

Updated the exist search bar inside the home screen on to accept the loyalty id.

...

Add Adding a new line in this message to indicate the new kind of data (loyalty id) and a new validation to the input that will expect the LoyaltyId(UUID) format.

...

Update the admin app to consume this from loyalty APIthe loyaltyId and communicate to loyalty API. Creating a new method to communicate the AdminApp to Intl Loyalty Middleware service. This method will receive the loyaltyId and will return the specific loyalty user attributes, cognitoID(User ID) and email.

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

All this idea already validate in a POC.

Country Solution

To the above flow works, a new information is necessary. The Loyalty Service expect in all call, the country in ISO format be specified (ES, PT, UK, …). Current the Admin App doesn’t have a way to delivery this properly. After an AWS analyses, was found that majority of the users are roles admin, and this role follow this format: ISO country + “-admin”. Based on this, is possible ready this information in the search page, split this to get the country code and send with the loyaltyId, making possible all the flow without any other configuration or creation (except the code mentioned in this document).

image-20240529-201327.pngImage Added

Expand
titleDetailed solution

Schemas/Customer

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

    image-20240521-201830.png

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

    image-20240521-200957.png

    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"
    }
    • To get the User from Loyalty service, 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.

...