I’m working on building a custom Shopify application using PHP and need to implement product recommendations functionality. Specifically, I want to fetch cross-selling and related product suggestions for items in my store.
I’ve been exploring various PHP libraries and API wrappers for Shopify integration, but I can’t seem to find clear documentation about endpoints or methods that handle product recommendations and upselling features.
Has anyone successfully implemented this kind of functionality before? I’m wondering if there’s a specific API endpoint I’m missing, or if I need to build the recommendation logic myself by analyzing product data, categories, and customer behavior.
Any guidance on the best approach would be really helpful. Should I be looking at the REST Admin API, GraphQL, or maybe there’s a third-party solution that works well with Shopify stores?
Shopify doesn’t have built-in product recommendation endpoints in their API, which explains the lack of documentation on the topic. I encountered the same issue about a year ago. I built my own recommendation engine using the REST Admin API to retrieve product data and implemented collaborative filtering based on order history. You can use the Orders API to identify products frequently purchased together, which can then be combined with product tags and collections for relevant recommendations. The GraphQL Admin API is advantageous as it allows you to gather only the necessary product fields with fewer requests. Start with a simple model like ‘people who bought X also bought Y’ based on order history, and gradually enhance it with product attributes and customer segments. Although third-party services like Yotpo or Bold provide recommendation widgets, developing your own solution offers much greater control over the logic and presentation.
Yeah, those manual approaches work but they’re a nightmare to maintain. You’ll end up juggling cron jobs, custom databases, and constant API calls that burn through your rate limits fast.
Built recommendation systems for several e-commerce sites and wasted months building from scratch each time. The logic gets messy quick once you add inventory tracking, seasonal data, and customer segmentation.
Latenode completely changed how I handle this. Set up automated workflows that grab Shopify data, crunch purchase patterns, and update recommendations without hitting rate limits.
The real power is connecting everything - Shopify APIs, Google Analytics, email platforms - into one smart system. Runs automatically and updates live.
Start with basic tag matching, then add behavioral analysis later without scrapping your work. Beats managing your own servers by miles.
I combined Shopify’s Admin API with Google Analytics Enhanced Ecommerce data. Pulled product collections and tags through REST endpoints, then tracked buying patterns from GA. The key is building a simple algorithm that matches products by shared attributes - vendor, product type, or custom tags you’ve set up. I store these relationships in a separate database table and refresh it weekly with a cron job. For real-time recommendations, I query my table instead of constantly hitting Shopify’s API. Way better performance and you won’t hit rate limits. If you’ve got decent traffic, try adding some basic machine learning using customer purchase history from the Orders API plus product similarity scores.
shopify’s api doesn’t do recommendations by default. i used metafields 2 store related product ids manually - not ideal but works. u can use GraphQL 2 pull all product data and group them by tags, price, or category. just a heads up, it will take up more processing power.
I just built this for a client last month - Storefront API beats Admin API hands down for recommendation systems. Everyone gets hung up on analyzing order history, but I’ve had way better luck using Shopify’s existing collections plus real-time cart filtering for cross-sells. Just query products in the same collection or price range with GraphQL, then score them by inventory and variants. Cache everything in Redis so you’re not hammering the API constantly. I wrote a PHP class that runs queries once per session and stores results locally. Performance went through the roof compared to heavy database solutions, and it’s barely any maintenance since you’re using Shopify’s native structure instead of managing separate recommendation tables.