I needed some help in order to integrate Shopify and ERPNext platform for sales.
I have the integration setup in place and its working seamlessly - the blocker that I am facing is with the products which have variants on Shopify Store.
I am looking for a way where we can overcome this by using Rest API and create a Customer and Sales Order using API endpoint and have the order items updated accordingly.
Looking forward for a positive and quick response.
What kind of details are you looking for? I don’t know anything about your context, especially w.r.t. how the calls are going to be made, so it’s hard to be specific.
What you’re describing is exactly what the REST API was designed to do. Make a POST call to the customer endpoint, then use the returned value when making a POST call to the Sales Order endpoint.
Thank you so much for a lightning fast response - much appreciated !
Yes, you are right, I will be making a POST call - I am looking for an example if you can help me with one, so that it would help me understand it better - For eg, Enpoint URL, Where to find the API key for authentication, etc.
I did look into the docs, but it got me confused so reached out to the forums !
It would be great if you could help me with an example for this approach.
If you’re new to working with APIs, I would recommend getting something like Postman so you can play around in realtime without having to wonder if the errors you’re getting are from the API call or from how they get represented in laravel/shopify/etc.
Then, in the body, it’s just a json object representing the fields values you want to create. To see examples of those objects, you could use a GET request on a Customer/Sales Order document that already exists.
Thank you for your suggestions - this integration is already in place but the issue that we are facing here is with product variants - they are not synced as expected, it always picks the default variant when order is created.
Can you please suggest here if there is a way out for this ?
products are synced with ERPNext when the order is placed on shopify website - but only the default variant is updated within ERPNext and not the selected variant while placing an order.
Hey @peterg - I havent installed this on any of the domain. Can you please share a guide for the installation so that I can give it a try with Ngrok or something with setting it up on local system ?
Is the Shopify installation on the same localhost? If so, you can just use localhost:8000 as your domain. If not, you need a way to make your local installation visible to the internet somehow. Is that what Ngrok does? I’m not familiar.
Hi @HashSam, I’m not following where you’re stuck. Deploying to a domain is usually part of the set up process. If you haven’t done that yet, it’s well documented:
Apologies for the delay in response - we have hosted the site on FrappeCloud platform and created one user to create API Key and API Secret - everything seems good till here.
Now the issue that I am facing is with the authentication in Postman - please find the below attached screenshot -
Can you please check the same and let me know if I have missed anything here ?
@ankush - the items which are created on ERP platform are synced when the order is placed on shopify website. However, the SKU added in the Shopify website is not attached to the Item created on ERP Platform - can you please let me know if we are missing anything here ?