Best way to group(plan) orders such that, their total value doesn't exceed a number.
We have a requirement to group/plan orders together in such a way that, in a single group, the total value for the orders = "n" USD or doesn't exceed "n" USD. Let's say there are 10 orders which are eligible to be planned, and sum of 1st 5 orders is 20 USD; those 5 orders would have to be clubbed or planned together by assigning a unique ship_with_group value, and a similar calculation needs to be extended to rest of the orders.
Version (include the version you are using, if applicable):
We are using 6.4.1 Onprem , but do not want to use a custom code /PL/SQL. We wish to achieve this functionality in the cloud way, just by using agents and smaller DSUs. Thanks in advance.