Versions Compared

Key

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

...

FE tech discovery can be found here

Figma: https://www.figma.com/file/RtD0UFtwuwXx14lbLCAPlr/branch/4JKHiBl13JOyOqh88dSPkV/Burger-King?type=design&node-id=20699-1728&mode=design&t=AEfdHRE0DnQ6879D-0

Mapping of how delivery fee is set (BE):

...

  • SNS: dev-plk-delivery-quote-outcome

    • SQS: aws-rbi-dev-plk-apply-delivery-service-quote

      • Lambda: sls-rbi-dev-plk-orders-delivery-service-apply-quote ( intl-orders-service)

        • Which get the message and updates the current order in the database (dynamodb)

...

BE Proposal

  • Enhance this lambda function (dev-plk-delivery-on-apply-quote) to not overwrite discount and service fees with zeroes. It should keep the value from launchdarkly.

  • Configure launchdarkly to fit business needs enabling FE to show fees and discounts properly.

    • discount <> 0

    • serviceFee <> 0

    • fee <> 0

    Image Removed
Lucidchart

FE impacts

...

pageCount1
autoUpdatefalse
alignleft
typerich
autoSize1
macroId676d3a59-c584-4c18-883a-4170ecca3358
instanceId920ae5b1-83d6-3e36-b794-1710780f64f3
pages
width700
documentTokenv2_a14568386f6935b40621989bae5a6103e7e06649d9381712b6ad0cb391a44874-a=133831322&c=920ae5b1-83d6-3e36-b794-1710780f64f3&d=078ef0e7-5034-4e83-a1ff-a31bb14dda99&p=4387570600
documentId078ef0e7-5034-4e83-a1ff-a31bb14dda99
updated1703260480589
height500

...

Note

Note: The calls to the BE in priceOrder is being executed through intl-gateway-service in the envs (enable-fulfillment-service-price-order = true) for Iberia Prod markets. Since in both flows (gateway and graphql) the impact is in intl-delivery-service, no major issues may be found with intl-whitelabel-graphql, but a double check plus tests are needed to ensure no major issues.

Proposal validation with transactions team:

https://rbidigital.slack.com/archives/C04D0V74P0D/p1702672116251489

FE impacts

When discount, fee and service fee come to FE, intl-whitelabel-app can be changed to display FREE fees as according to UX (figma). The design screens should be adapted to consider them accordingly. In such case, depending on the launchdarkly config ( fee tier), we may have a different value for fee, service and discount. In principle, to minimize BE impacts, we may continue using a single field for discount. It’s up to the FE display "FREE” for the related use-cases. E.g:

...

Expand
titleIntegration for store 3385 (fuenlenbrada) - exists mocked DELIVERY_QUOTE - returning hard coded fee value
Code Block
{
  "integrationId": "e5ef1f71-caa0-4ba8-888f-4d937b64f50f",
  "partnerId": "7425a4c0-f5bb-4f10-9bf0-6918b319525a",
  "secret": "4b26e43f0d7c7a51fbc6581d33549921",
  "stores": [
    {
      "country": "ES",
      "storeId": "3385"
    }
  ],
  "webhooks": [
    {
      "type": "DELIVERY_CREATE",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/delivery/create?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "DELIVERY_EVENT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/delivery/events?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "DELIVERY_QUOTE",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/delivery/quote?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "GENERAL_SUPPORT_TICKET_EVENT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/tickets/events?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "MENU_EVENT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/menu/events?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "MENU_PRICES_AVAILABILITY_UPDATE",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/menu/updated?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "MENU_UPDATED",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/menu/updated?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "ORDER_COMMIT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/orders/commit?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "ORDER_EVENT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/orders/events?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "ORDER_FIRE",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/orders/fire?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "ORDER_PRICE",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/orders/price?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "STORE_HEARTBEAT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/stores/status?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "STORE_SUPPORT_TICKET_EVENT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/tickets/events?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    },
    {
      "type": "TICKET_EVENT",
      "url": "https://euw3-dev-plk-mock-partners-integrations.rbictg.com/tickets/events?mock_secret=4b26e43f0d7c7a51fbc6581d33549921"
    }
  ]
}

...

Possible existing bugs

...

During this discovery, strange behaviors were detected. They are detailed here

Hints:

How to run local lambdas:

  • Example:

    • yarn start:function on-apply-quote

A suggestion from trx team is to use partners-service repo as reference, where it shows also how to mock local events simulating (local queues). It ensures that you will be able that your lambda “consumer” will really read the event (and not the lambda that is AWS).