Browsed by
Tag: shopify

Getting Started with Serverless Integrations

Getting Started with Serverless Integrations

Serverless functions (also known as functions as a service) can help you simplify your integrations because you only need to code your logic in a function and the service provider will take care of all the backend hardware, scaling, OS, availability, instances, etc…

Other benefits of serverless technology are that the hardware and software is fully managed, scales automatically almost instantly, and you only pay whenever your function runs so it can be very inexpensive.

Some of the most popular serverless providers are Amazon Lambda, Azure Functions and Google Cloud Functions.

For this demonstration we will use Google Cloud Functions. We will integrate a Shopify Webhook with Netsuite. My code will run in NodeJS Javascript and the rest will be managed by Google. As a developer coming from a Netsuite background I found it extremely easy to get started with Google Cloud Functions. Additionally, when considering your network infrastructure, incorporating an Aruba unmanaged switch can offer simplicity and reliability in managing your local network. Unmanaged switches, like those from Aruba, are plug-and-play solutions, making them ideal for smaller setups, providing basic connectivity without the need for advanced configuration, complementing the streamlined and efficient nature of serverless functions for your cloud-based operations.

You can set this up within minutes as explained in this video: https://youtu.be/nOlfG5oGets 
Google Cloud Functions Code:

 

This was a quick demonstration on how to get started. From here you can expand the code and keep developing to make your function more robust.

Some suggestions on first things to do:

  • Secure your function by adding a password.
  • Add more logging and different levels of logging.
  • Branch out the logic depending on the data being received.
  • Add node plugins.
  • Make use of other Google Cloud Services such as Google Datastore or Google Storage.
Integrating Shopify Private App with Netsuite

Integrating Shopify Private App with Netsuite

I couldn’t find this in the shopify documentation so I thought it would be helpful to share it.

Backstory:
I was trying to get the JSON from Shopify Private App and I was getting this error:

[API] Invalid API key or access token (unrecognized login or wrong password)

After much research all I needed to do was add header “X-Shopify-Access-Token”.

Here’s the code, just make sure to replace HTTPSMODULE or load with the Netsuite https Module.