Shopify quickstart 

To get started building Shopify apps, you must first set up the Shopify connection on your Gadget app.

There are 2 ways to connect Gadget to your Shopify store:

  1. The Shopify Partner dashboard which allows developers to create custom or public Shopify applications. Public apps can only be created using the Partners Dashboard. More information can be found in the Shopify documentation.
  2. The Shopify store admin which allows developers to build an app for a single Shopify store.

This quickstart will walk through the steps to connect Gadget to your Shopify store using the Shopify Partner dashboard, which is our recommended way to connect. If you want to connect through the store admin, read our guide.

Requirements

To complete this quickstart, you will need the following:

Now we will set up a custom Shopify application in the Partners dashboard.

  1. Go to the Shopify Partner dashboard
  2. Click on the link to the Apps page

Both the Shopify store Admin and the Shopify Partner Dashboard have an Apps section. Ensure that you are on the Shopify Partner Dashboard before continuing.

Click on Apps link in Shopify Partners Dashboard
  1. Click the Create App button
Click on Create app button
  1. Click the Create app manually button and enter a name for your Shopify app
Shopify's app creation landing page in the Partners Dashboard
  1. Click on Settings in the side nav bar
  2. Click on Plugins in the modal that opens
  3. Select Shopify from the list of plugins and connections
The Gadget homescreen, with the Connections link highlighted
  1. Copy the Client ID and Client secret from your newly created Shopify app and paste the values into the Gadget Connections page
Screenshot of the Partners card selected on the Connections page
  1. Click Connect on the Gadget Connections page to move to scope and model selection

Now we get to select what Shopify scopes we give our application access to, while also picking what Shopify data models we want to import into our Gadget app.

  1. Select the scopes and models listed below and click Confirm to connect to the custom Shopify app
  • Enable the read and write scopes for the Shopify Products API, and select the underlying Product model that we want to import into Gadget
Screenshot of the selected Product read and write scopes, and selected Product model

Now we want to connect our Gadget app to our custom app in the Partner dashboard.

  1. In your Shopify app in the Partner dashboard, click on Configuration in the side nav bar so you can edit the App URL and Allowed redirection URL(s) fields
  2. Copy the App URL and Allowed redirection URL from the Gadget Connections page and paste them into your custom Shopify App
Screenshot of the App URL and Allowed redirection URL(s) that are available on the Connections page after selecting models and scopes

Now we need to install our Shopify app on a store.

  1. Go back to the Shopify Partner dashboard
  2. Click on Apps to go to the Apps page again
  3. Click on your custom app
  4. Click on Select store
Click on the Select store button
  1. Click on the store we want to use to develop our app
  2. You may be prompted about Store transfer being disabled. This is okay, click Install anyway
  3. Click Install app to install your Gadget app on your Shopify store
Having an issue installing?

If you are getting a permissions denied error when installing your app, try logging in to the Shopify store Admin!

Click Install app to authorize our Gadget app with our store

You will be redirected to an embedded admin app that has been generated for you. The code for this app template can be found in web/routes/index.jsx.

App installation was a success

Set up is complete! We are now ready to sync Shopify data into our Gadget app database.

If we have created at least one product in our store we can test out the connection:

  1. Go back to our Gadget Connections page and click on the Shop Installs button for the added app in the Shopify Apps section
  2. A screenshot of the Connections page with the Shop Installs button highlighted
  3. Click the Sync button for the installed store
The Installs page with the Sync button highlighted

We should see that the Sync action was a success!

The Installs page displaying a successful sync notification

That's it! We have successfully set up a store and custom app in Shopify, connected our Gadget app to this store, and synced our store data with our Gadget app.

Note: For public Shopify apps, you can add a code effect to sync data on Shop install. For more information, check out our docs.