Connector Details

NameValue
PlatformShopify
Auth TypeAPI Keys
DirectionBidirectional
Triggers
Tap Repohttps://github.com/hotgluexyz/tap-shopify
Target Repohttps://gitlab.com/hotglue/target-shopify-v2
Tap Metrics

Usage:

Target Metrics

Usage:

Unified Schema

Credentials Setup

Follow the steps below to get the credentials you need to use the Shopify connector. There are two ways to use Shopify: either via a Shopify Public App (OAuth) or using a Private App (API keys). hotglue environments will default to private apps, but you can use either. Below are guides to setting up both:

Public App (OAuth)

When using Public App (OAuth), make sure to use the Shopify OAuth connector in hotglue instead of the API Key based version.

Register a Shopify Public App

To start, you will need to create a Shopify developer account at shopify.dev. After entering some basic information, you’ll be taken to an overview page. There’s a tab that says “Build apps for clients or the Shopify App Store.” When you click it, you’ll see a button to create an app. Click that too. Once you name your app, you’ll get the Client ID and Client Secret that you need for hotglue. Add a logo and preferences URL while you’re at it. Shopify Public App

App Setup

There are two distinct ways to have hotglue manage your Shopify App. See the video walkthrough below explaining each option: In both scenarios, you must:
  1. Add hotglue to the “Allowed redirection URL.” This should be set to https://hotglue.xyz/callback Shopify Redirect URL
  2. Configure a URL to redirect to once the authorization process is complete (complete_url). This is done in the JSON definition under Settings -> Connectors -> Sources -> Shopify OAuth
{
  "tap": "shopify:oauth",
  "version": "oauth",
  "isForked": true,
  "label": "Shopify",
  "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/shopify.svg",
  "domain": "shopify.com",
  // NOTE: You can also customize this list of scopes
  "tap_url": "https://{shop}.myshopify.com/admin/oauth/authorize?scope=read_customers,read_inventory,read_orders,read_products",
  // NOTE: This is the URL the tenant will be sent to once they complete the OAuth process
  "complete_url": "https://app.acme.com/"
}

Fully Managed

With this method hotglue will handle generating the tenant ID + creating the config. To use this method, simply set your app URL to
https://client-api.hotglue.xyz/shopify/{env_id}/{flow_id}

Semi Managed

Set a custom app URL (to your webapp for example), and then “forward” the request to hotglue. With this method you can supply the desired tenant id in the query params. Here’s a simplified example using Express to illustrate how the semi-managed flow works:
app.get('/app', async (req, res, next) => {
    // Get the query params
    const { shop } = req.query;

    // TODO: write some logic to decide what the tenant id should be
    const tenantId = "magic-ruffalo-123";

    // Redirect the tenant to complete the Shopify OAuth process (notice we are forwarding the shop and tenant query params)
    const url = `${HG_API_URL}/shopify/${HG_ENV_ID}/${HG_FLOW_ID}?shop=${shop}&tenant=${tenantId}`
    console.log("Redirecting to: ", url);

    res.redirect(302, url);
});

API Access

Depending on your use case, you may need to request permissions for access to certain scopes. Most use cases will require the “Read all orders” scope, which you can request on this page. If it’s relevant to your app, it isn’t too hard to get this access. You may also be interested in requesting subscription APIs and protected customer data. Shopify API Access

Distribution

Once you finish configuring your app and confirming that it works for your own account, you can begin the app registration process. You will want to make your app publicly available, so this can’t be a Single Merchant Install. There is a one-time $99 fee associated with registering to be on the Shopify app store. Shopify Distribution

Private App (API Key)

These steps will be performed by each of your customers when they connect their Shopify account.
The first thing you need to do is log in to Shopify. If you’re just testing you can create a free partner account. Once logged in, on the left side of the screen, select the Apps option in the navigation bar. Near the bottom of the apps page, there is an option to Manage private apps. Click it! If you have not enabled private apps yet, you’ll need to Enable private app development. Click through the subsequent pages to enable private apps. Once you end up on the apps page, click “Create Private App”. Fill in an app name and email. Now you need to enable permissions. Click the Show inactive Admin API permissions drop down in order to configure the data you’re pulling from Shopify.
If you plan to both read and write data with Shopify, make sure to enable Read and write access. Otherwise, Read access is sufficient.
Once you have clicked Save, click the Create app button to finish the process. You’ll receive an API Password and API key, which are all you need to authenticate with Shopify in hotglue.

Tap Changelog