String
Packing and dimensions

A Bag of Coffee Isn't a Box, and It Isn't Water Either: Handling Bags and Pouches in Automated Box Selection

Published

Short answer: Automated box selection has to treat bags and pouches as malleable. Most packing tools give you two setups, and neither fits. A box setup treats a bag as a rigid block, so orders can end up in a bigger box than they need. A volume setup treats it like water, so it can pick a box the bags won’t actually go into. ShipStation’s Recommend Package rule works from rectangles too, so check its plans on anything soft. String’s Pro Automation handles bags as products that give, based on what actually fits in your boxes.

Measure one bag of coffee and you get a nice, clean length, width and height. Then put a dozen of them in a box, and those numbers stop meaning much.

Why a box setup gets it wrong

A box setup takes the dimensions you entered and packs them like Tetris pieces. But a bag isn’t a block. It settles, it flattens, and it fills corners a block can’t.

So the software adds up the gaps it can’t use and reaches for the next box size. Your packer looks at the recommendation, knows it’s too big, and swaps it. Do that often enough and your team stops trusting the recommendation at all, which brings you back to choosing boxes by hand.

Why a volume setup gets it wrong

Volume sounds like the fix. Add up the bags, compare the total to the box, and you’re done.

But that only works for water. A bag of coffee is malleable, not liquid. It gives until it doesn’t, and the last bag decides whether the box closes. Volume can also say a box has room when a long bag doesn’t fit its shape at all, or say there’s no room when the bags would go in fine, as the numbers below show.

What happens with real bags

Here’s a coffee roaster I work with. Its 310 g bag measures 8.25 × 5.125 × 3 inches, and its 775 g bag measures 9.75 × 7.125 × 3.625. These orders all go in one box:

OrderTotal measured volume of the bagsInside of the boxBox volume
4 × 310 g507 in³5.9 × 6 × 10354 in³
6 × 310 g761 in³5.9 × 8 × 10472 in³
8 × 310 g1,015 in³5.9 × 10 × 10590 in³
5 × 775 g1,259 in³8 × 10 × 10800 in³
1 × 310 g + 1 × 775 g379 in³5.9 × 6 × 10354 in³

On paper, every one of those is impossible. Eight bags measure about 72% more than the box they ship in. Treat them as rigid blocks or add up their volume, and either way the software rules that box out and sends the order to a bigger one. But the bags go in, because a tape measure records a bag at its widest points, and a bag doesn’t stay that shape.

Another roaster ships seven 12 oz bags in a 10 × 8 × 6 box. On USPS cubic pricing, that’s the 0.3 tier. Its next box up, 12 × 9 × 6, is the 0.4 tier, so a wrong box costs a tier on the label.

How String handles it

String’s packing logic treats a malleable product the way it actually behaves. It tries squishing the bag in different ways. Where you squish it, it gets smaller, and it bulges out everywhere else. That’s the part a volume setup misses: the bag doesn’t flow into the corners like water, it just changes shape.

There’s also a limit, because a product can only be squished so far, and the logic stops there. I start with a base percentage that works for most products. When one behaves differently, I go through a few specific orders with the customer and set its limit from those. Sometimes I also adjust the size the logic works from, until its answers match what the team actually fits.

The same logic applies to mixed shipments, and it doesn’t change with the size of the product.

I also pack to about 90% full, so the box still closes in whatever order the bags come out. A plan that only works when everything goes in one exact way doesn’t hold up at a pack station during peak.

It isn’t only coffee

The same thing applies to anything soft, including tea, candy, pouches and apparel. Each one gives differently, so the numbers have to come from your products. When soft products share a box with rigid ones, as grain and glass carboys do in homebrew supply orders, the soft ones also have to pack around the hardware.

Bottles and bins have the opposite problem. They’re rigid, with usable space that a rectangle counts as solid. The full picture of what a dimensions-only model can’t see is in the cartonization post.

How to check your own orders

Pull your last few weeks of orders with several bags in them. Compare the box your system chose with the box your team actually used. If they often differ on the same products, your box selection is treating those products as something they’re not.

If you’re on ShipStation, turn on Recommend Package for a week and compare. If it holds up, you may not need anything else. If your packers keep overriding it on the bags, that’s the gap String is built for.



For operations past what rules can do

Bags breaking your box selection?

String's Pro Automation packs bags and pouches as products that give, tuned to your actual bags and boxes and run by me.