A code example for invoice based promotion engine.
I've to implement the code to applies a promotion to an invoice. There are many requirements which I think also need some clearification.
You can find applyPromotions
function in index.js
file. The steps inside the function are as follow:
- Filter promotions (matched promotions) that can be applied to a given invoice.
- Try to apply all the filtered promotions to invoice to see the possiblity
- Find the best optimized applied promotion
MIT