How to test Product recommendations app extension during development?

Hi,

I want to build a shopify app with my own product recommendation algorithm. Now I’m trying to test the recommendations API I just built.

After creating a new shopify app and finishing all steps from the POS recommendations doc, (the three endpoints built in local service, spinning up my local development service (npm run dev) and setting up POS product recommendations extension with the correct URL), I go to the product details page ({store_name}.myshopify.com/products/{product_name}). However, I don’t see that my recommendations endpoint gets hit at all. I do see this API call [https://{store_name}.myshopify.com/recommendations/products?section_id=template--xxx__product-recommendations&product_id=xxx&limit=4](https://{store_name}.myshopify.com/recommendations/products?section_id=template–xxx__product-recommendations&product_id=xxx&limit=4`) from the store preview page though.

Any advice how I could hook up my own recommendation API and test product recommendations extension?

Hi @suchintan ,

The POS product recommendations extension allows merchants to lookup recommendations on the Shopify Point of Sale application’s product page, or add a tile to their POS’s home screen. That recommendations endpoint should only be used by Shopify when someone looks up a product in the POS.

Are you trying to add your app’s functionality to the Shopify web admin, or on a liquid based theme extension for customers to see from the storefront?

2 Likes

thank you. yeah i figured out that I should develop a theme extension and call my own API.

I really wish that the default storefront product recommendation could be plugged with my API so that I don’t have to build the frontend part.

1 Like