Blocking Products from /products/inventory admin UX

Hey There,

I am looking to not display items within the product/inventory Admin UX page if they have components (aka they are variant or product bundles).

I am wondering if I use the inventoryDeactivate mutation, will the items still work for the location(s) as they are bundles (created via mutation VariantRelationshipBulkUpdate) or will they not work?

Hey @ChrisBradley! Interesting question - what’s the underlying goal here? Is it visual clutter on the inventory page, preventing staff from accidentally editing quantities, or something else?

The inventory behavior for bundles has some nuances around how Shopify manages the parent’s sellable quantity behind the scenes, so I’d say the answer depends on exactly what you’re deactivating and why.

Hey Donal,

Honestly, its very much a declutter situation, but I do understand why they are querying why we can edit stock positions of bundles.

I feel that if it is a bundled item, stock shouldn’t be editable.

I had a look and it doesn’t look like inventoryDeactivate will work here. Every variant must be stocked at minimum 1 location, so the mutation errors out. Even at multiple locations, deactivating removes the bundle from fulfilling at that location rather than just hiding it from the UI.

What could work is setting tracked: false on the bundle parent’s InventoryItem via inventoryItemUpdate. I tested this on a dev store and confirmed that the bundle parent disappears from the /products/inventory page, the sellable quantity continues deriving correctly from components, and the bundle component relationship stays intact on the variant detail page.

tracked: false normally means “always in stock,” so I’d recommend testing on a single bundle variant first to confirm there are no storefront side effects in your setup - let me know if that works! If not, I’ll submit some feedback internally with your use case - cheers!

Hey @Donal-Shopify

Thanks, let me check it out, I am not against setting tracked=false, although there is some worried about flagging latter on but assume we can run an inventory report with filter tracked=false as well?

I think it might suit the requirement, but I do wonder as well the overall purpose of showing bundled products on the inventory page as default, as there is obviously no inventory within them?

Good question on the reporting side. The inventoryItems query returns a tracked boolean on each item, so you can query your inventory items via the API and filter client-side for tracked:false to get a list of everything you’ve turned off.

You’re right that it doesn’t seem to make a lot of sense for bundle parents to show on the inventory page by default. Their stock is derived from components, so there’s nothing meaningful to edit. I’ve passed that feedback along internally, so the relevant team has visibility on it.

I’d be interested in hearing whther the tracked: false approach works out once you’ve had a chance to test it.

@Donal-Shopify

thanks, please let me know if anything changes on the handling of this.

I plan to test this next week to see how it operates, I just need to rewrite the function for both registering bundles and de-registering bundles (to set tracked:false when registering bundles, and tracked:true when re-registering)

1 Like