Emergent

Shopify

Overview

Emergent's Shopify integration lets your app connect to Shopify stores, retrieve product catalogs, manage orders, and synchronize inventory - all through a simple API connection. This guide walks you through setting up the integration so your app can interact with Shopify data.

Before you begin, you'll need a Shopify store (or Partner account with a development store) and admin access to install apps and generate API credentials.

Prerequisites

  • A Shopify store or development store
  • Admin permissions to install apps and manage API credentials
  • An active Emergent project where you want to add Shopify functionality

Setup process

Log in to Shopify

Go to https://dev.shopify.com (or partners.shopify.com) and sign in to your account/organization.

Create a Shopify app

  1. In the left sidebar, click Apps → Create app → Build from scratch
  2. Enter an app name (e.g., "Catalog Manager")
  3. Click Create

Configure Admin API scopes

In your app:

  1. Open Configuration (or API access)
  2. Under Admin API access scopes, enable the scopes your integration requires (for example, write_products, read_products, read_orders, write_orders, read_inventory, write_inventory)
  3. Click Save
  4. Release the app version

Install the app on a store

  1. Open your app and find Install (or the Installs section)
  2. Click Select store to install
  3. Choose your development store and click Install
  4. Confirm that the app has been installed successfully

Retrieve your Client ID and Secret

After installing the app:

  1. Go to your app's Settings → API credentials (or Client credentials)
  2. Copy the Client ID
  3. Copy the Client Secret

Get the store domain

  1. Go to Shopify Admin and open your store
  2. Look at the browser URL: admin.shopify.com/store/HANDLE
  3. Your Shopify store domain is HANDLE.myshopify.com

You will need the Client ID, Client Secret, and store domain for the integration.

Test the connection

Verify the integration by describing a simple query to Emergent:

"Fetch the first 10 products from my Shopify store and display their titles and prices."

Emergent will generate code that uses the Shopify API to retrieve products. If the connection is successful, you'll see product data in your app.

Common use cases

Product catalog sync

Display your Shopify inventory in a custom storefront or mobile app

Order management

Create, update, and track orders programmatically

Inventory monitoring

Real-time stock level checks and low-inventory alerts

Customer data

Retrieve customer profiles, order histories, and preferences

API rate limits

Shopify enforces rate limits on API calls to protect store performance. The standard REST Admin API allows:

  • 2 requests per second for most endpoints
  • 4 requests per second for GraphQL (with cost-based throttling)

If your app exceeds rate limits, Shopify will return 429 Too Many Requests errors. Build in exponential backoff and respect the Retry-After header in responses.

Each Shopify playbook run costs approximately ~1.5 credits.

Webhooks for real-time updates (Optional)

Instead of polling Shopify for changes, register webhooks to receive instant notifications when products, orders, or inventory change:

  1. In your Shopify app settings, go to Webhooks
  2. Click Create webhook
  3. Select the event (e.g., products/update, orders/create)
  4. Enter your Emergent app's webhook endpoint URL
  5. Click Save

Emergent can generate webhook handlers that parse and store incoming Shopify events.

Describe your webhook requirements in chat - Emergent will set up the endpoint, parse the payload, and help you store or act on the data.

Troubleshooting

Issue Solution
API credentials not working Verify the Client ID and Client Secret were copied correctly (no extra spaces) - Confirm the app is installed on the correct store - Check that required API scopes are enabled in the app configuration - Regenerate credentials if you suspect they were compromised
Missing product data Ensure read_products scope is granted - Verify products are published to the sales channel your app is accessing - Check that you're querying the correct store (if you have multiple)
Orders not appearing Ensure the read_all_orders scope is granted in your custom app configuration
Rate limit errors Implement exponential backoff in your request logic - Cache frequently accessed data to reduce API calls - Consider switching to GraphQL for more efficient bulk queries

Additional resources

Once your Shopify integration is live, you can expand it by asking Emergent to "add a product search feature" or "create a dashboard showing today's orders" - the AI will build on your existing Shopify connection.