Sorting Updated Product Variants by Updated_At

With the changes to allow up to 2000 variants per product, the addition of the variant_gids array (sorted by updated_at according to the docs), and the fact that Shopify sends a products/update webhook for every inventory change without the ability to opt-out of inventory-related changes, are there any plans to also sort the variants in the products/update webhook payload by their updated_at dates?

Many apps and/or companies only care about changes to attributes on the product and variants, and they don’t really care about inventory-related changes. The docs currently make no guarantees about the ordering of the “first 100 variants” on a product with more than 100 variants, but having those variants sorted by updated_at like the variant_gids are would go a long way in helping webhook subscribers cut down on the size and number of follow-up queries they’re forced to make to determine if any relevant changes took place on the attributes of the objects. It would put the “updated” variants in that set of “first 100 variants”, providing an easy way to check incoming payloads against cached values and whatnot.

1 Like

Hi - I’ve flagged this to the Products development team here, and while it’s currently not scheduled to support, it’s definitely something they are considering for future releases.

1 Like