Collection and Collect API Feature Requests

Dominique_Simo1
Shopify Staff
Shopify Staff
41 0 11

Hi everyone,

At the risk of this thread getting out of hand, I'd love to know what requests you have for features in the area of collections. We're currently making changes to smart collections, and would like consider any ideas you might have as we make these.

If you would rather share your requests privately, you can also use this form.

Dominique

Replies 18 (18)
Alex
Shopify Staff
Shopify Staff
1561 81 321

Stickied for visibility

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Searchanise_Tea
Tourist
8 0 2

Hi Dominique,

It would be great to get product collections and product position via the Products API without requests to the Collects API and the Collections API.

It would really speed up data export for our app

 

 

BISTV
New Member
2 0 0

Hi, 

There needs to be automatic collection object creation for:

  • Tags
  • Product Types
  • Vendors

The associated collection object would be accessed by {{ collections["vendor.vendor_name"] }}, {{ collections["tag.tag_name"] }}, and {{ collections["type.type_name"] }}

This would allow us to construct a "Related Products" section easily. For example you would do:

{% for tagName in product.tags %}
<h2>Related products: {{ tagName }}</h2>
<ul>
{% assign tagCollection = 'tag.' | append: tagName %}
{% for collectionProduct in collections[tagCollection] %}
<li>{{ collectionProduct.title }}</li>
{% endfor %}
<ul>
{% endfor %}

<h2>Other products from: {{ product.vendor }}</h2>
<ul>
{% assign vendorCollection = 'tag.' | append: product.vendor %}
{% for collectionProduct in collections[vendorCollection] %}
<li>{{ collectionProduct.title }}</li>
{% endfor %}
<ul>

Next, there needs to be a way to get a collection object that's the intersection of two or more collections. For example, if you wanted to get a collection of all Shirts from Aeropostale, you would do:

{% assign vendorCollection = 'vendor.' | append: product.vendor %}
{% assign typeCollection = 'type.' | append: product.type %}
{% assign newCollection = vendorCollection | intersect: typeCollection %}

<h2>All {{product.type}}s from {{ product.vendor }}:</h2>
<ul>
{% for collectionProduct in newCollection %}
<li>{{ collectionProduct.title }}</li>
{% endfor %}
<ul>

Easy. There should also be a way to hyperlink to a collection intersection, eg.: storename.myshopify.com/collections/vendor_Aeropostale&type_shirt&tag_red

Which would give the collection page for all red shirts from Aeropostale.

This would allow for the development of native catalog filtering without an extension.

Dominique_Simo1
Shopify Staff
Shopify Staff
41 0 11

 

It would be great to get product collections and product position via the Products API without requests to the Collects API and the Collections API.

 

Are you aware that you can achieve this via GraphQL? 

query test {
  collection(id:"gid://shopify/Collection/128622083") {
    id
    title
    productsCount
    products(first: 250) {
      edges {
        node {
          id
          title
        }
      }
    }
  }
}

 

Thanks for the suggestion, BISTV! Keep them coming.

BISTV
New Member
2 0 0

I would also like to see a "collection heirarchy" liquid object. Just like how linklists currently work, a collection heirarchy would be a customizable tree structure of collections. For example you could make a collection heirarchy with the title "categories" and the structure:

└Apparel
 └Outerwear
  └Shirts
  └Pants
 └Underwear
└Backpacks
 └Traditional
 └Totes
└Shoes

Collection hierarchies would generate relative URLs for your site such as:

sitename.myshopify.com/categories/apparel/outerwear/shirts/

this would effectively be the same collection page as:

sitename.myshopify.com/collections/shirts/

Except the navigation UX is vastly improved.

AlexanderCollin
Shopify Partner
18 0 0

A sensible request for the Collect and Collections API;

Allow exclusion of a Product from ANY smart collection based on some metafield, regardless of if that product satisfies a smart collection rule. That is, one could create a Product with a metafield attribute such that it would never appear in any smart collection, or possibly, not appear in any collection at all. 

Marc_Syp
Shopify Partner
22 0 2

#1 Request:

Ability to bulk replace the members of a collection with a single API call by providing a new set of Product IDs.

Currently I have to delete the collection and recreate it with the new members as a workaround.

Thanks,

Marc

phannigan
Shopify Partner
7 0 5

Hi Dominique -

 

We have a client with 30K+ items in several of their SmartCollections. We need to keep an up-to-date list of items in the collection (ie Collects). When we get a webhook that the SmartCollection has been updated, we are having to page through 30K+ Collects to find items that have been removed from the SmartCollection.

 

This obviously takes a lot of time and API calls, so we'd love to implement a better solution. Ideally, we could just get a webhook every time an item is removed or added from/to a collection (ie a Collect is created/deleted), with at least the product_id of the product that was added/removed from the collection.

 

If you've got any advice on how we should be implementing this today, let me know. Thanks!

 

Patrick

hcmlopes
Tourist
5 0 1

I like this idea but I think it may be easier for most users to use a tag system by includind a Product Tag is not equal to condition.


@AlexanderCollin wrote:

A sensible request for the Collect and Collections API;

Allow exclusion of a Product from ANY smart collection based on some metafield, regardless of if that product satisfies a smart collection rule. That is, one could create a Product with a metafield attribute such that it would never appear in any smart collection, or possibly, not appear in any collection at all. 



AlexanderCollin
Shopify Partner
18 0 0

@hcmlopes this is true however this is also not however a complete solution.

 

Take for instance a disjunctive (OR rules) smart collection which has 2 or more rules, for arguments sake lets say any product less than $5 OR any product more than $10

 

There is absolutely no way to independently add a product to a store and guarantee the automatic exclusion from all smart collections while maintaining the integrity of their rules. Hence there should be a way to exclude a product from smart collections entirely either at a high level or on each smart collection regardless of its disjunctive or conjunctive state.

 

Maybe the alternative here is to allow BOTH; DISJUNCTIVE (logical OR) and CONJUNCTIVE (logical AND) rules on smart collections. The way I see this working is having an expression containing disjunctive rules and then another expression which is evaluated on the resulting set which can be either conjunctive or disjunctive. (i.e exclude the products we wish to exclude here in conjunction with the expression containing the disjunctive rules). 

 

However it seems simpler to be able to exclude a product from the visible store whilst still having it published so it can be sold (my specific use case requires this - at the moment my app prompts merchants to change each of their smart collections individually which is not ideal).

 


@hcmlopes wrote:

I like this idea but I think it may be easier for most users to use a tag system by including a Product Tag is not equal to condition.


@AlexanderCollin wrote:

A sensible request for the Collect and Collections API;

Allow exclusion of a Product from ANY smart collection based on some metafield, regardless of if that product satisfies a smart collection rule. That is, one could create a Product with a metafield attribute such that it would never appear in any smart collection, or possibly, not appear in any collection at all. 






MozzoERP
Shopify Partner
71 4 14

A SKU end point  for the ProductVariant and InventoryLevels API. A SKU by definition is a unique identifier for a product and one that will always be in an external system that would desire to sync with Shopify, without having to store an additional surrogate key value. 

 

Variants

GET /admin/variants/#{sku}.json
PUT /admin/variants/#{sku}.json
{
  "variant": {
    "sku": "SKUA",
    "option1": "Not Pink",
    "price": "99.00"
  }
}

Inventory Levels

GET https://{store}.myshopify.com/admin/inventory_levels.json?location_id=6884556842&skus={SKUA, SKUB, etc}

 

Set Inventory Levels

{
  "location_id": 6884556842,
  "sku": SKUA,
  "available": 1
}

 Adjust Inventory Levels

{
  "location_id": 6884556842,
  "sku": SKUA,
  "available_adjustment": 1
}

 

 

Chad Richardson
Mozzo Software - Modular Software that grows with you from solopreneur to a 200 person mega team. Why keep outgrowing your Shopify Apps? Start with us, and just use the modules you need, then add more as you grow. http://MozzoERP.com
KarlOffenberger
Shopify Partner
1873 184 865

@MozzoERP GraphQL Admin API would be useful here and you can do most of that (haven't checked whether all, but will write some tests later out of curiosity). For instance:

 

query {
  productVariants(first: 1, query:"sku:US-WA2-310004") {
    edges {
      node {
        title
      }
    }
  }
}

I know it's not the REST API, which is why I always say use both 😉

Liked this post? You might also like our fantastic upsell apps Candy Rack, Last Upsell post-purchase and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
MozzoERP
Shopify Partner
71 4 14

Thanks for the option. I'll have to look at all scenarios...i.e. can you update inventory by SKU using graph, etc. But, probably storing the shopify product id in an Xref table is easier than creating a graph integration.

Chad Richardson
Mozzo Software - Modular Software that grows with you from solopreneur to a 200 person mega team. Why keep outgrowing your Shopify Apps? Start with us, and just use the modules you need, then add more as you grow. http://MozzoERP.com
KarlOffenberger
Shopify Partner
1873 184 865

Yes "you can update" inventory by SKU so to speak using GraphQL - so to speak. Actually, answered a question exactly about that earlier today.

 

Of course, I understand introducing GraphQL would be quite time and resource intensive. I'd definitely keep my eyes peeled for it though because it's quite worth it IMO (not just in terms of Shopify).

Liked this post? You might also like our fantastic upsell apps Candy Rack, Last Upsell post-purchase and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
Marslan
Shopify Partner
44 4 13

@phannigan Why not instead make a webhook to products and see which collection they are in. If that is possible in your case, will be way better than having to make so many api calls.

Need some help or work done? Hire me!
phannigan
Shopify Partner
7 0 5

@Marslan it seems from other threads on this forum and Stack Overflow that "product updated" webhooks don't fire reliably depending on how a product is added/removed to/from a collection (ie whenever a Collect is created/deleted). For example, a product can be added to a collection from the collection page, the product page, or due to the rules of a SmartCollection being changed or suddenly matching a product at some point in time... and not all of these things would cause a "product updated" webhook to fire.

 

If you've seen different behaviour or I'm missing something here, please let me know. I would love to get a usable solution working!

 

Patrick

Naren1
Shopify Partner
44 0 30

@Dominique_Simo1  What is the status of the SmartCollection migration project which was going to deprecate manual sort order?

Asking here in the related topic because that thread is closed for replies.

 

We had to abandon a much-requested feature from customers  after you announced the deprecation in 2018.

But now after a year since the deprecation announcement,  the migration seems to have been abandoned since the migration guide link itself does not load anymore.

 

Can you shed some clarity on the future status of "manual sort order" in SmartCollections so we can assure our customers it will not disappear anytime soon. 

 

Thanks!

Naren

Will_Cervarich
Excursionist
20 0 23

Ability to create Automated collections based on complex logic and Inventory Policy as a parameter. We need to create collections like:

 

example 1:

Vendor = X and Inventory Policy = Allow

OR

Vendor = Y

 

example 2:

Vendor = X

AND

Product type = Shirts

AND

Inventory Quantity > 0

OR

Vendor = Z and Product type = Pants and Inventory Quantity > 0 and Inventory Policy = deny