We have an application in which we want to sell products from different sources, and one of them is a Shopify store. The user is directed to the Shopify store from our application. After the purchase happened we would like to know the details, e.g. how many items the user bought. We want to charge commissions on the sales generated from our platform to our Shopify partners. We need some guidance for this topic. Thank you
Hi @barnabas_h
You can create a JavaScript library like Gmail or Facebook provide.
Vendor will add that script at two place theme.liquid file and a script or liquid code which need to be added in order status page.
Theme.liquid code will help to keep the tracking URL.
Second will count the no of order placed using the tracking I’d.
Now you will need a CORS enable JSON api which will submit the order data and associated tracking I’d at your server.
Let me know if you are willing to implement the same.
Hi @gr_trading ,
Thank you for your answer. In the meantime I created a tracking id and I included it to a cart link which I create using the id of the product variant. So we can say, that the order has my tracking id. What is the next step? Can I query only those orders which have my tracking id? I am checking ORDER API but I don’t see any filter possibilities for extra attributes.
Api will not help you in this, you only have option to add script at checkout status page and a CORS api which send those details to your server.
With “checkout status page” you mean this page of the shopify store right? Because we mainly want to control our app, not the store.
How will you access the order count and check whether order placed using your tracking I’d?
We are planning to do it with ORDER API:
Hey @barnabas_h !
It looks like you’re building what we refer to as a marketplace. This documentation here is a great starting point to establish the best way to integrate a Shopify store:
The section here on billing merchants is a great guide specifically on how you can apply charges based on orders attributed to your marketplace:
Hope that helps!
- Kyle G.