/
Tech Refinement - Showing fee savings

Tech Refinement - Showing fee savings

Problem

We currently send a single discount to the front end as the delivery discount, and we aim to display the service fee discount separately. Essentially, we want to show the original amount, crossed out, and place the word "free" next to it in a prominent highlight.

Solution

Add a new field in LaunchDarkly to store the discount value. The field will be named serviceFeeDiscount with a value of N cents that will discount the calculated serviceFee by that amount in cents.

A second new field will be added in LaunchDarkly named serviceFee that if populated will override the calculation previously used the calculate the serviceFee. After reviewing the code this feature already exists. As long as serviceFeePercent is null or 0 the value used will be the value stored in serviceFee.

Technical Solution

https://rbictg.atlassian.net/browse/IBFEC-1534

Sequence diagram of solution flow

https://lucid.app/lucidchart/078ef0e7-5034-4e83-a1ff-a31bb14dda99/edit?view_items=GEf4NsjQf79F7Xvm3RQbRNhB5t4%3D&invitationId=inv_25ece892-d639-4ab5-bc91-65b1c1331107

Note that the proposed changes have synergy with the refinement to show the service fees in DMP: Show delivery fees in DMP

Detailed flow

Simplified flow

image-20240221-134736.png

 

Related content

Tech Refinement - Back End
Tech Refinement - Back End
More like this
Improving delivery fee UX
Improving delivery fee UX
More like this
2024-04-10: Add fee field to create delivery webhook
2024-04-10: Add fee field to create delivery webhook
Read with this
Breakdown of fees with Free Labels
Breakdown of fees with Free Labels
More like this
New Service Fee
New Service Fee
Read with this
Progress Bar
More like this