Forum Moderators: buckworks

Message Too Old, No Replies

Shipping Calculations Frustrations

         

dpd1

10:08 am on Sep 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For years now I've tried to figure out the best way to automatically calculate shipping through the site, and I've about given up. I've come to the conclusion that in many cases... either I will get less than I should, or the customer will pay more than they should.

We have mainly long, awkwardly shaped items. But we also have very small accessories that people sometimes want to purchase with those large items. Problem is... Sometimes those smaller items will fit in the larger one, and sometimes they won't. Then when people purchase multiples of the large items... Sometimes they will fit in one box, and sometimes they won't. What I've been doing is requesting people contact us for package orders, but of course many people just ignore that.

Of course it could be fixed with a simple percentage factor, where it just increases by each item. But I just hate doing that, because then some people pay way more than they should. Which is going to lead to abandonment.

Just wondering if anybody has any method they've been successful with.

gpilling

3:17 pm on Sep 11, 2010 (gmt 0)

10+ Year Member



It is a tough problem. One way I dealt with it in the last company I ran was to use the QB/UPS Worldship integration and have UPS Ws send the shipping cost back to QB and then we were just charging the actual ship cost. This was done as a manufacturer and not for ecommerce, and it was STILL very cumbersome.

If you have some products that never ship with anything else, you could make them 'free' shipping or modify your cart to indicate it is always a 1 box item. This will still give you headaches when a person orders it along with a couple smaller items.

You could make a price (and dimensions/weight) for the larger items as multiples and have that available to buy. So instead of ordering 2 of the singlewidget, they could order a two-pack of the singlewidgets and save!

You could have the cart assume it is all going into one box and price it accordingly. It would then lockup on orders over 150 pounds, because UPS won't calculate that. The Interspire cart does this (and eBay), and it causes me headaches since my parts are often 50-80 pounds. You would lose the individual box charge on orders with two items that shipped separate but were priced together, but perhaps you can live with eating $9 or so on a larger order.

It is worth noting that this is a pretty hard problem. Amazon has not even bothered to figure it out. The variable combinations make the equation get out of hand.

jwolthuis

11:47 pm on Sep 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Each of our products has a shipping weight, and an optional attribute to indicate the "style" of packaging that it requires. Each order is split into these styles, and individual weights are summed.

For example, we sell:

- long, thin, lightweight widgets (long style, typically a Priority Mail tube),

- regular widgets (regular style, typically a Priority Mail box),

- fragile widgets that require special cushioning (fragile style, typically a double-walled corrugated box), and

- media items (qualifying for Media Mail rate).

We divide a shoppers cart into styles, add the weight of the dunnage, and call the USPS Rate Calculator webtool with the weight of each style. We sum these, discard any incomplete rates (for example, a package weighing 14oz that doesn't qualify for a first-class parcel rating) and present shipping options to the customer.

It's not a perfect solution, because smart box-packers will always find ways to combine items into one box, but errs to the merchants advantage.

rocknbil

5:48 pm on Sep 12, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We have mainly long, awkwardly shaped items. But we also have very small accessories that people sometimes want to purchase with those large items.


We have the exact same thing - think everything from swords to earrings. You may need a custom solution. I struggled with it for almost three months and finally programmed something that works. :-) It's really close. Sometimes a dollar over, sometimes a dollar under, but most of the time it's very close.

The logic is roughly like so.

We integrate with both the USPS and UPS API. We've dumped UPS, working with them in this area is burgeonsome and USPS woks out much better for us - but this system connects to both in real time. (But we still get emails: "You want too much for shipping." Doh.)

The first presets are series of "maximums" - for example, anything over x lbs or a certain set of dimensions places an oversize fee on the parcel, and it's different between the two API's. So the goal is to shoot for multiple boxes if the weight or dimension maximums are reached.

Each item has a SHIPPING dimension entered into the database. So earrings are say, 1" X 3" X 3", basically a padded envelope that can go first class. A sword, 6" X 6" X 42". We weigh the items themselves and this is also attached to each item, but not a shipping weight because of the very reason you mention - combining items in one parcel. Final shipping weight is managed in the calculator.

We have presets for box weight, I think it's like .005 oz per square inch (or something) and there is a global setting for a percentage of padding weight.

Now the fun starts. I organize the items from longest to shortest, secondly by widest to narrowest.

6X6X42
12X14X16
8X6X14
6X6X14
3X4X6
2X2X3

I begin stacking the items in the virtual box by width. If the next item will fit behind the previous item and not exceed the longest item, in it goes, otherwise it adds to the packed width. When the maximum box width is reached it starts another "layer" until the maximum box height is reached. At any point, if maximum weight is exceeded, new box. Based on the sum of the item weights and dimensions of the box, a padding weight factor and the box wieght factor is added in for this parcel's total weight. This box's dimensions and weight goes in an array.

Next box, and next, until the order is complete. We pass the number of boxes, weight of each (and dimensions, in the case of UPS) to the API. User sees links for each:

Choose your shipping method:

first class = $2.95, 7-10 day delivery
parcel post - $6.05, 7-10 day delivery
priority mail - $12.95, 3-5 day delivery
express mail - 28.95, 1-2 day delivery

In the case of multiple boxes:

parcel post - $36.05 in 3 boxes, 7-10 day delivery
priority mail - $48.95 in 3 boxes, 3-5 day delivery
express mail - 120.95 in 3 boxes, 1-2 day delivery

These numbers are arbitrary, just for example. International priority mail is supported, as well as insurance and signature confirmation.

I've never found anything that comes close, and some day I'll sell it, it's on my list. :-) Maybe this might give you ideas to pass on to your programmer or start coding it yourself.

gpilling

8:33 pm on Sep 12, 2010 (gmt 0)

10+ Year Member



@rocknbil Wow.

jwolthuis

6:20 am on Sep 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I begin stacking the items ...


Where does your box inventory enter into the algorithm? You only have a fixed number of different-sized boxes to select from.

Using your example, the 42" item forces you into one or two specific sizes of boxes that you stock. If you must choose between the 45x8x8 box or the 45x20x12 box, how do you decide which one to pack?

If a large box triggers Priority Mail Balloon Rate, do you avoid it, and try to use two-or-more boxes? Or do you run the algorithm multiple times, using different box combinations, trying to achieve the lowest shipping cost?

What about maximum weight per box; does it vary by box size, based on structural integrity, i.e. bursting strength? I could imagine a large box having a lower maximum-weight (say, 35 lbs) than a large flat-rate box (70 lbs, or if-it-fits-it-ships).

dpd1

9:55 am on Sep 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the suggestions... If that works as good as it sounds Rockn, you probably SHOULD try selling it. I think this is one of the few things where people can still do the best job. It's a very complex issue. But I'm sure there's a demand for a decent automation.

rocknbil

3:43 pm on Sep 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where does your box inventory enter into the algorithm?


That's the funny thing, and oddly enough, it all works out. What I began to discover - and what let to the final solution - is even though my "calculated box" and the actual boxes we use are not the same, the box volume *is* the same - and what equalizes it in final shipping. The volume and weight are what really balances it out.

For example, let's say (using sword and earrings) it calculates to 7"x6"X42". We don's stock those boxes, but we use 6 X 6 X 42's, and obviously the earrings will fit in with the sword without a problem. By twiddling with the box weight over time and comparing against real shipments, we got it down to a very small margin of error. Is the customer paying more for shipping? Marginally, I recall comparing values and the difference was a dollar or less due to the difference in box weight.

If you must choose between the 45x8x8 box or the 45x20x12 box, how do you decide which one to pack?


I think this might kick a second box on calculation, I'd have to test it - I'm pretty sure it would. 45 X 20 X 12 would exceed the oversize parcel settings. It's done by a calculation of length and girth - the length + girth cannot exceed a specific number. So the "actual box" can vary in dimension.

If a large box triggers Priority Mail Balloon Rate, do you avoid it


If it does not exceed the max. weight or max. dimensions, no, we just output the choices . . . and let the customer decide.

As for single items that are oversize to begin with, fortunately we have none - by my plan for that was to immediately hook those as separate parcels. Since they'd be largest, they would be first off the stack. The API does return oversize calculations, but the current programming automatically avoids any oversize surcharges.

What about maximum weight per box;


See above. If you had, say, a parcel of two 25 lb dumbbells and the max weight is 35 lbs (for ex., can't recall ATM) it would hit them as two boxes. This also is a situation I've never had to deal with, but I'd planned to approach it with flat rate shipping. Which is probably why I've never tried to deploy it, still a lot of unknowns to work out. But for "the average shipping stuff" with odd sizes it's been running with reliability for 5 years or so. Seldom surprised. :-)