Rule for shipping box in delivery note

Hi everyone,

I am wondering how you guys manage your inventory of delivery boxes. Do you consume them manually or you don’t have inventory of them?

I would like to create a rule in my delivery note so that it adds the box in the item child table automatically. Exemple :

5 or less of Item A or Item B or Item C = BOX 1

6 to 10 of Item A or Item B or Item C = BOX 2

1 or more of item D = BOX 3

1 of Item A or Item B or Item C and 1 of item group D = BOX 4

This is only an example, but you see what I am looking for.

I am on the cloud so I only have access to client side script and not server side.

Thank you!

Not sure how to script it, however I wonder if the boxes could be added when Sales Order or Picklist is prepared? Seems like there’s many of combinations possible and the picklist , manually, might be worth considering.