Versions Compared

Key

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

...

Be able to search a customer using the loyalty ID and add a new line on search labels.

This should follow the user permissions, where users can search in countries where they are admins.

Examples

  • Admin user ESP, only can access ESP loyalty customers

  • Admin user ESP and PT, can access ESP and PT loyalty customers

...

Figma

https://www.figma.com/design/Ti8Qr6jeSEPaencIDyYfcJ/branch/iS2eu3wihqpTUjXoJPXkbK/Burger-King?node-id=1218-356&t=EZP7GwsI6H6Bsmbn-0

Solution

Enhance the existing search bar on the home screen to accept the loyalty ID. Then create a new backend method to communicate with the loyalty API to get the customer cognito ID. With the cognito ID the Admin app can show the customer information correctly.

Zenuml sequence macro lite
uuid21edafca-167a-456d-9207-3d2ea87845e1
customContentId4766433306
updatedAt2024-06-05T18:26:03Z

Tasks breakdown

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"
    }
    • To get the User from Loyalty service, can be used this provider

    image-20240522-191903.pngImage Added

 

queries/customers

Create a new query inside the customers queries

...

Create a use query for consume the customerByLoyaltyId

...

Add on the map section the new query

...

universal-search/searchInstructions

Add new descriptions to this list for loyalty id

...

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