Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Problem

In the flow of delivery, in the moment of open cart and calculate the price with the function priceOrder the app can take some fees in the fulfillment-service through of some Features Flags on Launch Darkly. But at the moment the flow arrive in the delivery-service in the function applyQuote where they use one of two flows, Bringg or Partner.

In case use the Partner flow, the partner removes some values of Fees, putting the value zero. And in case use the Bringg flow, the system gets the values on Launch Darkly again.

Current flow

Currently, the flow for partners return only fees fixed in the code, and these fees are zero.

image-20240117-115152.pngimage-20240117-114909.png

Solution

For this solution, we can use the same function of bringg-dispatcher, because the bringg gets the fees of LaunchDarkly through the fee.service, so we can use the same function for this, we just need to add the fee.service in the constructor of partner-dispatcher and user the function.

image-20240119-105109.png

Task

Task 1 - Create a new feature flag in back-end

  • Create new feature flag for adding in the function getFees in Partners-dispatch file.

  • This Flag must be customized, for control by brand, market and stage (dev-plk-es)

  • suggest of name flag - enable-get-fees-launchdarkly (in case change the name, update this doc)

Task 2 - Import fee.service and use the function to get the fees of Launch Darkly

  • Import fee.service in the constructor - analyze impacts

  • Use the function getFeeAndDiscountByBrand to get fees of Launch Darkly

  • Important - Maintain the values of baseDeliveryFee and fee, because these values are of DMP and need maintained. (look up img 1)

  • Adjust unit tests

Question

We have some features flags with fees, are we going to use these flags or create a new?

R: Use the same flags.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.