Documentation

Integrations

Shopify with a custom app

Connect a Shopify store to AmICited with your own custom app from the Shopify Dev Dashboard instead of the App Store app: scopes, Client ID and secret, and the limits.

The usual way to connect Shopify is the FlowHunt app from the Shopify App Store (see ecommerce stores). If you don’t want a public app on your store, or your store policy blocks App Store installs, you can connect with a custom app that you create yourself in the Shopify Dev Dashboard.

Once it’s connected, a custom app works the same as an App Store install: the import quote, the order and product backfill, the Eshop reports, link building and the CMS.

Ecommerce integrations are available from the Pro plan, and only workspace administrators can connect them.

Before you start#

  • Use the store’s own Shopify organization. The app has to belong to the same Shopify organization as the store. An agency can’t use its own app on a client’s store, so the client has to create the app.
  • Card billing. Workspaces billed through Shopify can’t use a custom app. Switch the plan to card billing first.
  • Shopify permissions. You need to be able to create apps in the store’s Dev Dashboard (the store owner, or a staff account allowed to develop apps).

Create the app in Shopify#

  1. Open App development in the Shopify admin

    In the Shopify admin, click Settings, then Apps, then Develop apps, and click Build apps in Dev Dashboard. You can also go straight to the Shopify Dev Dashboard and log in with the account that owns the store.

    Shopify admin home with Settings in the bottom-left menu
    Shopify admin Settings with Apps in the menu
    Shopify admin Apps settings with the Develop apps button
    App development page with the Build apps in Dev Dashboard button
  2. Create the app

    In the Dev Dashboard, open Apps and click Create app. If your organization already has apps, click Create app at the top right and choose Create app manually.

    Shopify Dev Dashboard Apps page
    Create app link under Get API credentials in the Dev Dashboard
  3. Fill in the app and its scopes

    • App name (1): anything you’ll recognise, for example “AmICited”.
    • App URL (2): https://app.flowhunt.io/. Uncheck Embed app in Shopify admin; the app has no screen of its own inside Shopify.
    • Allowed redirection URL(s): leave empty. AmICited signs in with the app’s Client ID and Client secret, so Shopify never redirects back to it. Leave Use legacy install flow unchecked.
    • Scopes (3, under API access): paste this list. These are the scopes the App Store app asks for, so the custom app gets every AmICited feature except order history older than 60 days (see below):
    text
    read_orders,write_orders,read_products,write_products,read_customers,write_customers,read_inventory,write_inventory,read_locations,write_price_rules,read_content,write_content,read_themes,write_themes,read_locales

    Leave Webhooks API version as it is.

    Dev Dashboard Create an app form with App name, URLs, Scopes and Webhooks API version

    Prefer to tick boxes instead of pasting? Click Select from list above the Scopes field, search for each scope in the list above (1), tick it, and click Done (2).

    Select from list link above the Scopes field
    Select scopes dialog with the search field and the Done button
  4. Create the app

    When the name, URL and scopes are filled in, click Create app at the top right of the form (4 in the form screenshot above). Shopify creates the app and releases its first version.

    The Create app button at the top right of the Create an app form
  5. Check that the version is active

    Open Versions in the app menu: the first version is marked Active. If you change the scopes later, click Create version so the change takes effect.

    Dev Dashboard Versions page with the first version marked Active
  6. Set the distribution to custom

    A custom app has to be limited to your own store before it can be installed there.

    1. In the app’s Overview, click the Distribution card (Manage custom install link). Shopify opens the Partners Dashboard; if it asks, choose the account you use for the store.
    2. Select Custom distribution (1) and click Select (2). Shopify doesn’t let you change the distribution method afterwards.
    3. Under Store domain, enter your store’s your-store.myshopify.com address (1; see Find your store address below) and click Generate link (2). Allow multi-store install for one Plus organization only matters if your store belongs to a Shopify Plus organization with several stores.
    App Overview in the Dev Dashboard with the Distribution card
    Shopify account picker for the Partners Dashboard (blurred)
    Distribution page with Custom distribution and the Select button
    Custom distribution form with the Store domain field and the Generate link button
  7. Install the app on your store

    The app can’t read anything until it is installed on the store.

    1. Open the app’s Overview in the Dev Dashboard and click Install app at the top of the Installs card. In some dashboards this button reads Test app, as in the screenshot below. You can also open the ⋯ menu on the app’s row in the Apps list and choose Install app.
    2. Choose the store you want to connect.
    3. Review the access the app asks for and click Install.
    App Overview in the Dev Dashboard with the Test app button under Installs
    Shopify store picker with the store to install the app on
    Update data access screen in the Shopify admin with the Install button

    The screen warns that “This app hasn’t been reviewed”. That’s expected: it’s your own app, not one from the App Store.

  8. Copy the Client ID and Client secret

    Open the app’s Settings in the Dev Dashboard. Under Credentials, copy the Client ID and the Client secret (use the copy buttons next to each field). Treat the secret like a password.

    The app's Settings item in the Dev Dashboard menu
    Credentials section with the Client ID (blurred)
    Credentials section with the Client secret

Custom apps import the last 60 days of orders

Shopify only returns orders older than 60 days to apps that have the read_all_orders scope, and the Dev Dashboard refuses it on a custom app (“Contains invalid scopes: read_all_orders”). So a custom-app connection imports orders from the last 60 days, and the Eshop reports start there. The import quote can still offer a longer history; the import itself stops at 60 days. If you need the full order history, connect with the App Store app instead.

Connect it in AmICited#

  1. Find your store address

    In the Shopify admin, open Settings. The store address (your-store.myshopify.com) is shown under the store name at the top of the menu.

    Shopify admin Settings with the myshopify.com address under the store name (blurred)
  2. Open the Shopify dialog

    Go to Data Sources, under Eshops click Connect Shopify Store, then click Use a custom app instead (1 in the screenshot below).

  3. Enter the store and credentials

    Enter the Store address, the Client ID and the Client secret (2), then click Connect store (3).

    Shopify dialog with Use a custom app instead and the Store address, Client ID and Client secret fields
  4. Choose the domain and confirm the import

    Map the store to a domain and choose how much order history to import, the same as for an App Store install. Each option shows its projected rows and one-time cost before you confirm.

After that, set up customer data and shop settings the same way as for any store.

How a custom app differs#

Why don’t links re-apply as soon as I edit a product?

Custom apps don’t get Shopify webhooks, so editing a product or page in Shopify doesn’t make link building re-apply its links right away. They are applied again the next time the rule runs.

What happens if the app is deleted or uninstalled?

The connection stops within about a day and the workspace gets a notification. To reconnect, open the same dialog, choose Update credentials and enter the app’s current Client ID and Client secret.

Why does the import only go back 60 days?

Older orders need Shopify’s read_all_orders scope, and the Dev Dashboard doesn’t accept it on a custom app. A custom-app connection therefore imports the last 60 days of orders, and new orders keep arriving from then on. For the full history, use the App Store app.

Can an agency use one app for all its clients?

No. The app has to belong to the same Shopify organization as the store, so each client creates their own app.