Automating packaging rules in Shopify based on cart combinations

I’m trying to solve a packaging logic problem in my Shopify store and I’m wondering if there’s an app (or a non‑insane workaround) that can handle this without heavy custom code.

What I’m trying to do

I have a table (screenshot attached) that maps:

  • Combined products / collections
    • e.g. Headware-1, Accessories-1/Headware-1, Headware-1/Tee-1, Hoodie/Sweatshirt-1, etc.
  • Frequency (just for my own reference, not required in Shopify)
  • Desired packaging type for each combination
    • e.g. Hat Box, 4 Hat Box, Bubble Mailer, Ship Hoodie, Ship Shirt, etc.

What I want is:

When a customer checks out, based on the combination of items (or collections) in the cart, I’d like Shopify to determine a packaging type that we can then use operationally (for picking/packing and possibly for shipping rules).

I’m not looking to show the packaging name to the customer necessarily – it’s more for internal logic and fulfillment. But if the app exposes this as a metafield, line item property, or note, that would also work.

Example

From the table:

  • Headware-1 alone → Hat Box
  • Headware-1/Headware-2/Headware-3/Headware-44 Hat Box
  • Accessories-2/Headware-1Bubble Mailer
  • Hoodie/Sweatshirt-1Ship Hoodie
  • Headware-1/Tee-1 → specific packaging type

So essentially I need rules like:

IF cart contains X + Y (or certain collection tags) THEN assign packaging type Z.

What I’ve considered

  • Using product tags / collection tags and a cart rules or conditional logic app
  • A shipping rules app that can assign different “packages” based on what’s in the cart
  • A cart/language rules / scripting app that writes a metafield or note with the correct packaging type

My questions

  1. Is there any Shopify app that:

    • Lets me define rules based on product combinations or collections,
    • And then outputs a package type / label / metafield that we can use in fulfillment?
  2. If you know specific apps that might do this, can you share:

    • App name
    • Rough idea of how you’d set up the logic (tags, collections, bundle rules, etc.)
  3. If this is not realistic via apps, is this more of a Shopify Functions / custom app situation?

I’ve attached the screenshot of my current packaging rules table for context so you can see how granular it is.

Any recommendations, app names, or implementation ideas would be helpful


At this time there is no native “packaging” api in shopify


Hi @Jsetzer81 :waving_hand: to simple set info such as metafields. mechanic automation app, or hypothetically shopify-flow*. Or a custom app using cart-transforms to set attributes in checkout.
Very different beast to actually start messing with packaging data itself, third party carriers, fulfillment center apis, printing picklists etc etc etc ad nauseum.

While this could be done pre-checkout in the cart using cart attributes or line item properties, for the online sales channel theme, there’s a bunch of things that make it easy to get the packaging calculation wrong doing it at that point in the process for variable products. So really it’s only the type of thing to do as a prototype if your theme/code savvy and need the info before checkout and or to maybe show customers.

Post checkout/purchase when the order is created this can be done in the mechanic automation app, or hypothetically even in shopify’s own free shopify-flow if you know what your doing as metafields, tags, or even line-items through order-edits, especially now with the javascript feature*.
Mechanic app is more feature full so a custom script could even be made where the CSV/map could literally be plopped in as a setting(option), or fetched from google-sheets, or send emails of pack instructions etc etc etc.

*Turning a table into javascript logic is a different problem altogether turning a looooong list into a map in code versus business-logic/information-architecture that doesn’t need a big old map hardcoded into automations.

If your not sure where to start and need it built with a real budget you can reach out to me for custom-app or automation services.
CLICK my profile-pic or visit my profile on the forums
ALWAYS include context in new communications, e.g. reference urls, posts urls, etc

Hey Paul,

Thank you for the very detailed explanation. We would need that packaging type to be inserted before the consumer checks out. I hope this helps

You can handle this with a rules based app like Mechanic. It lets you check which products or collections are in the cart, match them to your packaging table, then write a metafield on the order for your team to use.

If you work with ShipStation, their automation rules can assign the package type once Shopify passes a tag or metafield.

If your rules are very detailed, this often becomes a Shopify Functions or small custom app job. Mechanic is usually the easiest way to do it without custom code.