Skip to main content

shopify:collection:update

Fires when a buyer changes a filter or the sort order on a collection.

You can use this to see how buyers narrow a collection, which filters they use, and how many products they end up with. Merchandising apps use the same signal to reorder or promote products as the list changes.

The event carries the filters and sort order the buyer chose, along with the collection's own productsCount before any filtering. The promise resolves with a second productsCount, the number that matched, once the storefront has run the query.

You dispatch it from the collection's filter form. productFilters is present whenever filters are active and omitted when there are none, and sortKey carries the current sort order. A failed update rejects the promise.

Anchor to collection
collection
required

The collection being filtered or sorted.

Anchor to promise
promise
Promise<>
required

Resolves once the storefront knows how many products matched.

Anchor to productFilters
productFilters
[]

The filters now applied. Omitted when no filters are active.

Anchor to sortKey
sortKey
'BEST_SELLING' | 'COLLECTION_DEFAULT' | 'CREATED' | 'ID' | 'MANUAL' | 'PRICE' | 'RELEVANCE' | 'TITLE'

The sort order now applied. Omitted when no sort order is selected.

Anchor to detail
detail
Record<string, unknown>

Optional custom data for the storefront's internal use. Listeners can read it.


Was this page helpful?