Setting up Shopify with DataConnect

Shopify introduction

To get started with the Shopify integration you first need some knowledge about the actual platform and what are the requirements needed.

Integration type

Shopify is a cloud platform and for a merchant to start selling on that platform, an account is needed. Access to Shopify merchant data is provided via API. To get credentials to the API you need to have a Shopify app which also represents your service on the Shopify app store or marketplace.

Your Shopify App is customizable so you can set the same name as your product, add a description and additional marketing materials.

To create a Shopify App you need to create a Shopify developer account first. See details below.

Create Shopify account

In order to integrate with Shopify you need to create an account by registering at Shopify as a developer. Simply fill out the form and follow the guide during account creation.

Create Shopify App

As soon as you have developer account you need to create an app. But first let’s get DataConnect app URL from developer portal.

Visit DataConnect settings page and under Platform settings find app URL in the following format:<your project id>

Copy the value and get back to Shopify developer account.

Now proceed to your Shopify developer account and click the Apps menu (on the left side of the page). That will bring you to the Apps page where you will find a Create app button. Click the button and set an App name you like. Paste the previously copied URL into the field App URL and click Create app.

Note: the App URL on the Shopify form is the URL of a web application which is capable of handling Shopify integration (installation/signup flows, notifications, etc). In this case it’s DataConnect platform implementation.

Now we need to set some credentials.

Setup Shopify App credentials

First we need to go back to the DataConnect developer portal and get the redirect URL for the Shopify App. You will find the app URL under Platform settings on DataConnect settings page. Find redirect URL in the following format:<your project id>

Copy the value and go back to the Shopify developer account.

The created app under App info will have a Whitelisted redirection URL(s) field. Paste the copied value there and click Save.

Below Whitelisted redirection URL(s) you will find App credentials section. Do the following:

  • Copy the API key field value
  • Paste copied value to DataConnect developer portal API key field in the Shopify form under Platform settings
  • Copy the API secret key field value
  • Paste copied value to DataConnect developer portal API secret field in the Shopify form under Platform settings

DataConnect platform settings form require another field - App URL.

Note: in that case App URL is the Shopify App URL.

To get your Shopify app URL navigate to the Overview tab of the Shopify App and click Create App listing button. A new page will be opened for you. On the left side of the page you will find a View app listing button. Click it and copy URL from the browser address bar. Paste copied value to App URL field in DataConnect form.

The last field is Scopes. Scopes is the list of resources your application wants to have access to. We recommend to use the following set of scopes:

read_content,write_content,read_products,write_products,read_customers, write_customers,read_orders, write_orders, read_fulfillments, write_fulfillments,read_shipping, write_shipping

To get more information about the scopes please visit Shopify documentation page.

Click Save and now everything is configured.

Unpublished Shopify App

When you create your app and gave it name, for example, myapp-dev, you will have a link like:

Visiting that URL will direct you to a 404 error page. This is because Shopify marks all new apps as unpublished and to be listed on the Shopify App Store you need to pass the Shopify App Review process. Before that, your app is not visible to anyone. During development you need to be logged in into your developer account to see your unpublished application.

Additionally, Shopify doesn’t allow to install such apps to the stores easily. To connect a shop you will need to add shop parameter in URL, like:<your-test-store-name>

That link will trigger Shopify App installation flow.

When you pass the app review it will be accessible as a normal Shopify app and can be connected to any Shopify store without any additional parameters.

For more details, please check the following Shopify blog post.

Simple test

Even with the ‘unpublished app’ limitation, you can already test if the integration works. Just prepare the link like:<your project id>/install

and you will be redirected to the Shopify App Store where your app is located.

You can specify shop URL as described in Unreviewed Shopify App section and connect a shop but you will get an error from the platform and to fix that we need to proceed to the next step.

Create developer store

Before proceeding to the configuration of DataConnect data stream you might want to prepare a developer store which you will use to test data delivery.

To do so, visit your developer account dashboard on Shopify and from the left menu click Development stores.

Once on the Development stores page click Create button. You will de directed to a simple form and after filling it out, you will be redirected to the store admin dashboard.

Navigate to the Products page by clicking the corresponding link on the left side menu. You can add products manually or use some already prepared ones by importing them. Click Import and on the popup window click the Sample CSV template link to download simple product CSV examples. Use that file for import and click Upload file.

Now you will see some sample products which DataConnect will deliver to you after you configure where DataConnect will send data for you.