I have created a Suitelet in NetSuite to get data from shopify, and created a webhook for Order_creation event in that I have used external URL or suitelet, which will get called when any order will be created in Shopify account.
But it is not working; I have tried several times, but didn't receive any data on the endpoint (external URL for suitelet).
I need your guidance.
Solved! Go to the solution
So you didn't receive any web requests at all? If so, I'd recommend checking the way the webhook is defined in Shopify. If your receiver just wasn't able to parse things, then check that the receiver is configured to parse a JSON request body as detailed for orders/create here --> https://shopify.dev/docs/admin-api/rest/reference/events/webhook.
Thanks for your reply
The problem is not parsing JSON data in the receiver.
The issue is that the JSON data was not reached to the endpoint url at all.
I think Shopify send JSON data based on POST method to the targeted endpoint url.
But for the endpoint url for NetSuite suitelet script, Shopify fails to send JSON data.
Is it possible to customize the Shopify webhook to add some additional HTTP headers for endpoint url (NetSuite suitelet)?
Here's those HTTP headers to be added and in that case, there would be no problem
This is an accepted solution.
As far as I'm aware I don't think you can modify the POST headers that the Shopify webhook is firing over. One idea would be to implement a thin web service in the cloud somewhere (e.g. - Amazon, Azure, etc.). It would accept the Shopify webhook, validate the HMAC signature, parse the JSON body details, and then forward the data along to NetSuite so that the request follows the exact format that NetSuite is looking for. It really wouldn't take a great deal of effort. I know it's a workaround, but if Netsuite won't accept what Shopify is presumably sending then it's an idea.
What if you change the destination of the webhook to a resource that you control? Can you see that there is data being sent to it? Any sort of web service logging on the recipient end would at least see the traffic...
> As far as I'm aware I don't think you can modify the POST headers that the Shopify webhook is firing over.
This is correct. Pretty much everything that Greg said is right on the money, so I marked his response as the solution.