Versions Compared

Key

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

Front-end

...

Similar to what we have in the current app (airtouch):

...

  • gastos de envio → delivery fee

  • otros gastos → management fee

FE tech discovery can be found here

Mapping of how delivery fee is set (BE):

  • PriceOrder

    • Calls partner service API PriceOrder to get price related info including fees.

    • Persists taxes fees into the database

  • GetOrder

    • Retrieves order related info from the database, including fees

...

  • Delivery fees are managed by the fee service ( intl-delivery-service):

    • getFeeAndDiscountByBrand

      • getFeeChargeByTier

        • It get the values from launchdarkly based on the service mode.

          • If catering , it uses tiered-catering-delivery-fees

          • Otherwise, it uses tiered-delivery-fees

        • Searches the tier list from highest to lowest key, stopping when requestedAmountCents exceeds that tier.

        • Said that, we can to analyze the following "return” to propose the management fee. Apart from that, looks like Launchdarkly existing configuration (variations) were thought to enable "free delivery” and we can leverage this approach.

          Code Block
              return {
                baseDeliveryFee: fee, --> LD fee
                deliverySurchargeFee, -->  LD expandedFees (based on delivery quotation value)
                discount, --> LD discount
                fee: fee + geographicalFee + serviceFee + smallCartFee + deliverySurchargeFee,
                geographicalFee, --> LD geographicalFee
                serviceFee, --> Calculated with LD serviceFeePercent of the requested amount
                smallCartFee, --> LD smallCartFee
              };
          We may introduce a new fee named "management fee” to fulfill the current use-case or explore existing fees.

Expand
titlelaunchdark config example (dev)

{
"0": {
"app": {
"discount": 0,
"expandedFees": {
"460": 0,
"560": 0,
"825": 265,
"999": 265,
"default": 0
},
"fee": 399,
"serviceFeePercent": 0,
"smallCartFee": 250
},
"googleFoodOrdering": {
"discount": 0,
"fee": 0,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"kiosk": {
"discount": 0,
"fee": 0,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"web": {
"discount": 0,
"expandedFees": {
"460": 0,
"560": 0,
"825": 265,
"999": 265,
"default": 0
},
"fee": 399,
"serviceFeePercent": 0,
"smallCartFee": 250
}
},
"1000": {
"app": {
"discount": 0,
"expandedFees": {
"460": 0,
"560": 0,
"825": 265,
"999": 265,
"default": 0
},
"fee": 399,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"googleFoodOrdering": {
"discount": 0,
"fee": 0,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"kiosk": {
"discount": 0,
"fee": 0,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"web": {
"discount": 0,
"expandedFees": {
"460": 0,
"560": 0,
"825": 265,
"999": 265,
"default": 0
},
"fee": 399,
"serviceFeePercent": 0,
"smallCartFee": 0
}
},
"2000": {
"app": {
"discount": 0,
"expandedFees": {
"460": 0,
"560": 0,
"825": 265,
"999": 265,
"default": 0
},
"fee": 399,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"googleFoodOrdering": {
"discount": 0,
"fee": 0,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"kiosk": {
"discount": 0,
"fee": 0,
"serviceFeePercent": 0,
"smallCartFee": 0
},
"web": {
"discount": 0,
"expandedFees": {
"460": 0,
"560": 0,
"825": 265,
"999": 265,
"default": 0
},
"fee": 399,
"serviceFeePercent": 0,
"smallCartFee": 0
}
}
}

...

  • 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)

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

...