Migrating CIF PLP Queries to Catalog Service – How to Intercept/Customize ProductList Implementation | Community
Skip to main content
Level 4
September 10, 2025
Question

Migrating CIF PLP Queries to Catalog Service – How to Intercept/Customize ProductList Implementation

  • September 10, 2025
  • 1 reply
  • 916 views

Hello Community,

We are in the process of migrating from a traditional AEM storefront implementation with CIF components to Catalog Service, and we are facing challenges with Product Listing Pages (PLP).

 

Currently, our PLPs use queries like:

 

query { products(filter: { sku: { in: ["8429420181151", "8718117612253", "8470001995292", ...] }}) { items { __typename sku price_range { minimum_price { regular_price { value currency } final_price { value currency } } } ... } } }

 

But we need to switch to Catalog Service with productSearch, for example:

 

query ProductSearchPLP_WithPrices( $phrase: String!, $current_page: Int = 1, $page_size: Int = 1, $filter: [SearchClauseInput!], $sort: [ProductSearchSortInput!], $context: QueryContextInput ) { productSearch( phrase: $phrase, current_page: $current_page, page_size: $page_size, filter: $filter, sort: $sort, context: $context ) { total_count items { product { sku name price_range { minimum_price { final_price { value currency } regular_price { value currency } } maximum_price { final_price { value currency } regular_price { value currency } } } } productView { id sku name url description images { url label roles } attributes { name value } } } } }

 

The issue is that our catalog is very large, so performance and scalability are critical.

 

When reviewing the archetype of the current implementation for ProductList, we see something like this:

 

@9944223 public Collection<ProductListItem> getProducts() { List<ProductListItem> products = new ArrayList<>(productList.getProducts()); products.sort((a, b) -> { String aStock = getStockStatusFromProduct(a); String bStock = getStockStatusFromProduct(b); boolean aAvailable = "IN_STOCK".equalsIgnoreCase(aStock); boolean bAvailable = "IN_STOCK".equalsIgnoreCase(bStock); if (aAvailable == bAvailable) return 0; return aAvailable ? -1 : 1; // In-stock products first }); return products; }

 

 

My questions are:

 

What is the recommended way to intercept or replace the query executed by CIF components (e.g., ProductListImpl) so that we can move from products(filter: { sku: { in: [...] }}) to productSearch in Catalog Service?

 

Is creating a custom ProductCollection implementation the right approach, or are there best practices/extensions already defined for this migration?

 

Any guidance, examples, or pointers to documentation on how/where to customize the query in the CIF component flow would be greatly appreciated.

 

Thanks in advance!

 

1 reply

kautuk_sahni
Community Manager
Community Manager
September 16, 2025

@estebanbustamante @narendiran_ravi @sarav_prakash @sreenivasbr @anil_chennapragada @martin_ecx_io @diksha_mishra @dprakashraj @dipti_chauhan, when you get a chance, could you review this question? Your input would be greatly appreciated!

Kautuk Sahni