Versions Compared

Key

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

...

  1. Fulfillment service aggregating all fees into delivery fee for orders from food aggregators (eg. glovo, uberEats)
    This is part of the first implementation that we can see here :

    Code Block
    languagetypescript
        const deliveryFees = input.charges?.fees?.reduce((acc, fee) => {
          if (fee.type === PartnerFeeType.DELIVERY_FEE) {
            acc = fee.total?.amount ?? 0;
          }
          return acc;
        }, 0);
  2. DMP never receive the fees associated with the order
    Although DMP calculates the delivery fee in the WL during the quote workflow, this information does not persist when the order is created. Besides that, no information regarding the other fees is received by it, as we can see in the create delivery webhook documentation.

...

A simple solution is fixing the delivery fee in fulfillment calculation and altering the delivery integration to receive this information. Fixing the calculation is important since the fees returned for the POS will be used by them to create the delivery later (to be confirmed).

IMPORTANT CONSIDERATIONS:

  1. The proposed solution assumes that the POS will send the fee breakdown, either on the commitOrder endpoint or the submitOrder. This was proposed by Winrest and the ground work is already laid off in partners API given the list of fees it receives.

  2. The exact fee structure may change to include new fields in the near future, so this feature should be implemented after

    Jira Legacy
    serverSystem JIRA
    serverId255417eb-03fa-3e2f-a6ba-05d325fec50d
    keyIBFEC-1467
    is done.

  3. Although the POC focuses on aggregators, the changes will work for WL orders as well, since the create delivery process is the same.

...