Weekly ingredient orders for a meal kit company
Your task
Your meal kit company delivers about 40,000 boxes a week. Each box is for 2 or 4 people and holds 3 or 4 recipes from a menu of 30. Customers can change or skip next week's box until Wednesday at 23:59.
Each recipe lists its ingredients per serving, such as 180 g of chicken thigh, 1 lime or 15 ml of soy sauce. Suppliers sell in packs, such as a case of 48 limes or a 5 kg bag of rice. Each supplier takes orders through an API. It refuses a second order with an order number it has already seen. Every order must be in by Thursday at 09:00. Last month a rerun of the old script sent one supplier the same order twice.
Which data does Thursday's ordering job read, and how does it turn boxes into packs to buy?
It covers
- Order cutoffs
- Ingredient totals
- Supplier orders