How Smart Packaging works | Calcurates for Magento

Smart Packaging: get dimensional rates based on pre-packing the order

Overview

The idea behind Smart Packaging is to virtually pre-pack order items into available packages in optimal way and/or based on your custom Packaging Rules.
The result can be the one or multiple packages.
AlertSome carrier services (USPS and some FedEx services) rate only one package per request. When the order is packed into several packages, Calcurates requests a rate for each package and adds the rates up. See Max package quantity.
This approach helps to get the most precise rates from the carrier, because they are requested by packages weight and dimensions.

Smart Packaging: Popular Scenarios

Check some popular scenarios perfectly solved with Smart Packaging:
  1. Pack in the best way according to products' weight and dimensions (the default Smart Packaging algorithm)
  2. Use Packaging Rules for other packaging algorithms:
    1. Pack in the best way according to products' weight only
    2. Pack in the best way according to products' quantity
    3. Pack certain items individually into own package(s)
    4. Pack certain items into specific package(s) by Quantity
    5. Pack certain items inside the specific package(s) of a main product when both are in the cart

Smart Packaging: Configuration Steps

Info
Before you start:
Product dimensions must be set in your Store admin (ignore this if your packaging is NOT based on product dimensions):
- Shopify: use Decimal, Integer or Dimension metafields
- Magento: use decimal or integer product attributes
- WooCommerce: use decimal or integer product parameters

Step 1: Complete Smart Packaging mapping settings for product dimensions
Step 2: Add Packages
Step 3: Add Packaging Rules (optional)
Step 4: Enable certain Packages and Smart Packaging mode for the Shipping Option
Step 5: Display packaging results at checkout (optional)
Step 6: Display packaging results for the order in the store's admin

After you finish: Check packaging results and applied Packaging Rules in the Activity Feed while testing.

Step 1: Complete Smart Packaging mapping settings for product dimensions

AlertIgnore this if your packaging is NOT based on product dimensions, but based on your Packaging Rules (packaging by weight or qty).
Open the Smart Packaging mapping settings in the "Smart Packaging" section and select your store.
Alert
Make sure your Website is synced with Calcurates before you assign custom attributes to the method.
Shopify: use Decimal, Integer or Dimension metafields - learn more.
Magento: use decimal or integer product attributes
WooCommerce: use decimal or integer product parameters
Complete mapping settings for each Website.




Step 2: Add Packages

Click the "Add Custom Package" in the "Smart Packaging" section to add your first package.



General

  1. Name. Add package name. Can be displayed at checkout or in the order info.
  2. Code. Add package code. For internal use only.
  3. Description. Add package description.

Weight

  1. Weight unit. Kg/G/Lb
  2. Weight of tare. Weight of the empty box. Will be added to the weight of the full box.
  3. Max weight. Package max weight capacity / constraint.

Dimensions

  1. Dim unit. Cm/In
  2. Height. Package outer Height
  3. Length. Package outer Length
  4. Width. Package outer Width

Quantity

  1. Max Quantity of Items in Package. Package max qty capacity / constraint.

Large carts and calculation time

Smart Packaging has no fixed limit on the number of Custom Packages or cart items. Each rate request has a time budget, and packing has to finish inside it.

Three mechanisms keep large carts inside that budget:
  1. When enabled packages multiplied by units in the cart reach 30,000, Calcurates packs without rotating products. Packing runs much faster. A product that fits a package only when rotated can end up in a larger package or an extra one, and the rate changes with it.
  2. Within one rate request, Calcurates reuses a packing result when several shipping options use the same packages and products, for example the carriers inside one Rate Shopping option.
  3. When a cart is too large to pack by dimensions within the time budget, Calcurates packs it by weight and quantity instead. Items go into an enabled package one by one until the package reaches its Max weight or Max Quantity of Items, then into the next package. Each package keeps its own dimensions and tare weight. Calcurates checks that one unit of the item fits the package, but not how many units fit by volume, so the order can get fewer packages than a full pack by dimensions. An item that fits none of the enabled packages goes into a package of its own size. Packaging Rules that don't use dimensions (by weight, by quantity, fixed packages, Pack individually) apply as usual.

Packages CSV import/export

You can do packages CSV import/export from the "Smart Packaging" section.



Step 3: Add Packaging Rules (optional)

By default Smart Packaging packs items optimally into ALL available packages by weight and dimensions.
You may have your own packaging scenarios, which you can configure with Packaging Rules. Navigate to the "Smart Packaging" section - "Packaging Rules" tab and click the "Add Packaging Rule" yellow button.

General

  1. Packaging rule name. Add packaging rule name.
  2. Packaging rule description. Add packaging rule description.
  3. Packaging rule priority. 1 has a higher priority than 2, 3, etc.
    1. Rule with a higher priority will be applied if product matches selections specified in different Rules.
    2. Rule with blank priority has a higher priority.
    3. Rule with the lowest id will be applied if Rules have the same priority.

Algorithm



There are 8 Packaging Rule algorithms available.
Packaging Rules are applied on the Website level, that's why you should specify the Website for each of the Packaging Rules.
Packaging Rules are applied to a certain product selection defined by the product attribute / metafield and its value(s).
If the attribute value is left blank, the Rule is not restricted — it applies to ALL products, not to none. To limit a Rule to specific products, enter the exact attribute value(s).

1) Pack according to product dimensions and weight

InfoThe sense of the algorithm: products that match selection will be optimally packed into selected packages according to their weight and dimensions.
This is the default Smart Packaging algorithm, but using the Packaging Rule you may apply it to a certain product selection.

2) Pack Into Fixed Packages by Qty

Info
The sense of the algorithm: every X items of products that match selection will be packed into selected packages.
Product weights will be ignored, max weight of the package will be used as a total weight of the filled package.
This algorithm pre-packs certain items into certain fixed package(s) by quantity. You may specify the Max quantity of the items that can be packed with this Rule as well as quantity range. Product dimensions are not required for this algorithm.

3) Pack Into Fixed Packages by Weight

InfoThe sense of the algorithm: products that match selection will be optimally packed together into selected packages according to their weights and max weight of selected packages.
This algorithm pre-packs certain items into certain fixed package(s) by weight. The constraint is the max weight of the package(s). Product dimensions are not required for this algorithm.

4) Pack according to product weight

InfoThe sense of the algorithm: products that match selection will be optimally packed into selected packages according to their weight.
This algorithm optimally pre-packs certain items into selected package(s) by weight. The constraint is the max weight of the package(s). Product dimensions are not required for this algorithm.
The difference from the previous algorithm is that you may select multiple packages and the algorithm will define the optimal ones (not fixed) for a specific order.

5) Pack individually

InfoThe sense of the algorithm: products that match selection will be packed individually. Product dimensions will be used as its package dimensions.
This algorithm does not apply any packaging. Product dimensions will be used as its package dimensions. No packages needed for this algorithm.

6) Pack according to product qty

InfoThe sense of the algorithm: products that match selection will be optimally packed into selected packages according to their qty and max qty limit of the package. Product weights will be ignored, max weight of the package will be used as a total weight of the filled package.
This algorithm optimally pre-packs certain items into selected package(s) by quantity. The constraint is the max quantity of the package(s). Product dimensions are not required for this algorithm.

7) Pack Into Fixed Packages by Qty with Remainders

InfoThe sense of the algorithm: every X items of products that match selection and qty range will be packed into selected packages. Product weights will be ignored, max weight of the package will be used as a total weight of the filled package. Remainders will not be packed in any box. They will be quoted by weight.
Similar to algorithm #2, but if there are remainders, then they will not be packed in any box. They will be quoted by weight.

8) Pack Together Into Fixed Packages by Qty

InfoThe sense of the algorithm: every X items of the main products will be packed into selected packages, and products from the "Packed with" group ship inside the same packages. Product weights will be ignored, max weight of the package will be used as a total weight of the filled package.
Use this algorithm when a smaller product, such as an accessory or a cover, should travel inside the package of a main product whenever both are in the cart, and ship on its own otherwise. It works like algorithm #2 with a second product group added. Product dimensions are not required for this algorithm.

The Selection of Products block has two groups, each with its own Product attribute:
  1. Pack products (required). The main products. They decide how many packages the order gets.
    1. Product attribute and Value: one or more values.
    2. Max qty of items in the group (required): how many main products fit into one package set. Number of sets = total main products ÷ this value, rounded up.
    3. Limit group by min and max quantity of items: Quantity from / to, counted on the total quantity of Pack products in the cart. Outside this range the rule does not apply.
  2. Packed with (required). The products that go inside the main products' packages.
    1. Product attribute and Value: one or more values. Leave Value blank to pack any product outside the Pack products group inside.
    2. Max qty of items in the group (optional): the maximum number of Packed with items per package set. Leave it blank for no limit.
  3. Apply rule only if ALL "Packed with" products are in the cart. Off (default): one Packed with product in the cart is enough. On: the cart must contain every selected Packed with value.
Use a different attribute and value pair in each group. If a product matches both groups, for example through different tags, Calcurates treats it as a Pack product.

When the rule applies
Calcurates applies the rule when the cart has at least one Pack product, their total quantity fits the Quantity from / to range (if set), and the cart has the required Packed with products (at least one, or all of them with the toggle on). Otherwise Calcurates skips the rule and passes the products to the next Packaging Rule by priority, then to the default Smart Packaging.

How Calcurates counts packages
  1. Package sets come from Pack products only: every X main products get one set of the selected packages. A partial group also gets a full set, as in algorithm #2.
  2. Packed with products get no packages of their own from this rule. Each set takes up to the Packed with Max qty, or all Packed with items when that field is blank.
  3. Packed with items above the rule's capacity (number of sets × Packed with Max qty) go to the next Packaging Rule or the default Smart Packaging.
  4. The rule leaves products outside both groups to other rules.

Example. A Door ships in two fixed packages, Box A and Box B. A Door handle should travel inside the door's packages. Rule settings: Pack products = Door, Max qty 1, packages Box A + Box B; Packed with = Door handle, Max qty blank; ALL toggle off.

Cart Result
1 Door Rule skipped (no Packed with product). The door goes to the next Packaging Rule or the default Smart Packaging.
1 Door handle Rule skipped (no Pack product). The handle goes to the next Packaging Rule or the default Smart Packaging.
1 Door + 5 Door handles Box A + Box B, all 5 handles inside.
1 Door + 2 Door handles + 1 Lock (in neither group) Box A + Box B with both handles inside. The lock goes to the next Packaging Rule or the default Smart Packaging.
1 Door + 15 Door handles, Packed with Max qty 10 Box A + Box B with 10 handles inside. The other 5 go to the next Packaging Rule or the default Smart Packaging.
2 Doors + 15 Door handles, Packed with Max qty 10 2 × (Box A + Box B), all 15 handles inside (capacity 20).
3 Doors + 1 Door handle, Pack products Max qty 2 2 × (Box A + Box B).

Alert
Priority. If the main product also matches another rule, for example a Pack Into Fixed Packages by Qty rule for the door alone, set priorities so this rule comes first. Otherwise the other rule takes the main products, and this rule has no Pack products left to apply to.
Weight. Carriers receive the max weight of each package, and Packed with products add nothing to it. Table Rates conditions and weight-based calculations still use the products' own weight, including Packed with products.

Packaging Rules CSV import/export

You can do Packaging Rules CSV import/export from the "Smart Packaging" section - "Packaging Rules" tab.

Step 4: Enable certain Packages and Smart Packaging mode for the Shipping Option

Enable Smart Packaging for the Carrier Shipping Option

Open the option - Basic tab - Packaging and select Smart Packaging with weight and dimensions. Then enable the Custom Packages allowed for this Carrier Shipping Option and save it. To show the option only when the order fits your enabled packages, turn on Avoid packaging fallback.

Alert
Some carrier services (USPS and some FedEx services) rate only one package per request. Check the "Multi Package" column in the option's list of Carrier Services.
If Smart Packaging packs the order into multiple packages, Calcurates requests a rate for each package separately and adds the rates up. The option's Max package quantity (5 by default) limits the number of packages. Orders with more packages don't get these services.

Enable Smart Packaging for the Table Rates Method

Open the Table Rates method > Basic tab, switch on Dimensional Shipping and select Smart Packaging. Select certain packages that are allowed for this Table Rates Method. Turn on Avoid packaging fallback to hide the method when an item doesn't fit any of the selected packages.


AlertNote, that Smart Packaging mode is available only for ENTIRE CART methods

Add rates per package

Now, when adding the Rate to this Method you may use the Fixed Per Package (FPP) calculation and apply individual rate per every selected package:


Step 5: Display packaging results at checkout (optional)

To display packaging results at the checkout use {packages} variable in the method's "Info Messages" settings.
The info will be displayed in the following format: Package name x package qty
Example: Box 1 x1; Box 2 x1


Step 6: Display packaging results for the order in the store's admin

  1. Shopify: the Calcurates Packaging Results order metafield. Pin it to see it on the order page.
  2. Magento: will be displayed if Smart Packaging has been applied
  3. WooCommerce: will be displayed if Smart Packaging has been applied

Smart Packaging: FAQ

1) What if some of my products are missing dimensions?

If you are using the default Smart Packaging algorithm (pack by weight and dimensions), then the products that are missing dimensions will not be packed and will be quoted by weight. Smart Packaging will be applied only to products with dimensions. Therefore "partial" Smart Packaging might be applied.

2) What happens if an item doesn't fit any of my packages?

Calcurates packs the item into a package of its own dimensions and requests rates for it. To hide the shipping option for such orders instead, turn on Avoid packaging fallback in the Carrier or Rate Shopping option, or in the Table Rates method.