How can we call NetSuite RESTlet from Shopify Webh...
# suitescript
a
How can we call NetSuite RESTlet from Shopify Webhook?
m
You will need middleware
a
@michoel I am trying to use Google Cloud Platform for middleware. Is Google Cloud Platform lifetime free?
m
They have a pretty generous free tier
a
Thanks @michoel
c
@AB You'll also need a scheduled job to check for changes periodically, Shopify docs say that the webhook cannot be relied upon 100%
I ended up just using a scheduled job to pull all changes for orders - didn't bother with the webhook as I can't trust it all the time
Hardest part is to make sure you only pull records once using timestamp of last pulled record and having a function to search for existing orders to make sure you're not importing duplicates by mistake.
m
When I integrated with BigCommerce we wanted real time so used a webhook and backup map reduce for missed/delayed webhooks. Both changed the status in BigCommerce store to mark the order as imported to avoid duplicates, as well as a check in NetSuite by order number
c
Is it even possible to add a flag to a shopify order to say it's already been processed?
Maybe via a custom app
We also had a 'no third party system' mandate so couldn't use middleware to process the webhook message and shopify won't authenticate with NS. 🤷‍♀️
m
I don't know about Shopify but in bigcommerce there isn't support for custom fields so we stored some integration data in the staff notes fields as a JSON blob. For "imported" flag though we updated the order status as that was easily filterable by the API
Actually it looks like there is now metadata support for orders. Must be a new feature
j
Hey guys, Shopify supports tags and meta fields. I suspect tags would be adequate here.
a
Thanks, @Craig, @JohnnyC and @michoel