Development discussions around Shopify APIs
I am trying to build a Shopify recommendation app using Python at the backend. Steps I am using are:
1. Enable webhook event: Example, cart updated with Product A
2. Receive webhook data on Python
3. Process the data and identify recommended product B
Question:
1. Is this the right approach?
2. Is there a way that webhook can receive product B
3. If yes, how do we display the product B to the user?
Hello @mlbrains ,
I think your overall approach should work. Webhooks are a way for your app to listen to key events (by topic) to stores that it's installed on, such as the 'carts/update' topic. So, it's entirely reasonable for your app to listen to these events, do some processing to figure out suggested products, and do something about that information.
However, Webhooks are a one-way channel. So, for your app to actually recommend product B based on product A it would have to do two things:
You should also take a look at the Webhooks doc if you haven't already - it shows what webhooks exist that your app can subscribe to which may be helpful.
james-langille | Developer @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks @james-langille,
What is the alternate way (apart from webhooks) to create a recommendation engine?
I can see that there are many recommendation engine implementations where recommendations are configured at Home Page, on Selecting a Product or when cart is selected. Is there a standard (and simpler) way to create such a customized recommendation engine?
Hmm... there very well might be. A quick search got me to https://shopify.dev/tutorials/develop-theme-recommended-products-using-json-api#tracking-conversions..., but it seems to be a store-specific method of doing this rather than in an app. This is my first time hearing about the Product Recommendations API, so I am by no means an expert on that, but at a quick glance I do not know if this is something that could be leveraged for a custom recommendations app.
james-langille | Developer @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi @james-langille,
Shopify has a native recommendation engine which can be enabled to provide these inputs. Also there are many aps available that provide recommendations. Example, we have installed the "Upsell recommendations" app and it is able to provide recommendations at Home page, Product page and on the Cart page.
Can you find out how these are being recommendations are being implemented and integrated with Shopify? Note, we have the Python based engine working. We are only looking for the best way to display inside a Shopify store.
User | RANK |
---|---|
10 | |
5 | |
3 | |
3 | |
3 |
Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023