Skip to main content

Overview

Once Shopify is connected, the Dema Agent can query products, orders, customers, and inventory from your Shopify store through the Admin GraphQL API. Useful for pulling live commerce data into an analysis and for light write actions such as updating customer records, discounts, and product publications.

Prerequisites

  • A Shopify store you are the owner of, or staff access with permission to manage apps.
  • Access to the Shopify Dev Dashboard to create the OAuth app.
Shopify requires you to create your own OAuth app and paste its credentials into Dema. You only need to do this once per store.

Connect Shopify

1

Create an app in the Shopify Dev Dashboard

  1. Open the Shopify Dev Dashboard and go to Apps → Create app.
  2. Give the app a recognizable name, for example Dema Agent.
  3. In App setup, add https://app.dema.ai/agents/oauth/callback to the Allowed redirection URL(s) list.
  4. Save the app.
2

Request the scopes Dema needs

In Configuration → Access scopes, request the scopes listed under Scopes Dema requests below and save.
3

Copy the app credentials

In Client credentials, copy the Client ID and Client secret.
4

Paste the credentials into Dema

In Dema, go to Agents → Settings → Integrations, find Shopify, and click Connect. Enter:
  • Client ID from Shopify
  • Client secret from Shopify
  • Account URL in the form https://{store}.myshopify.com, replacing {store} with your store’s subdomain
Click Add. Shopify will ask you to install the app on the store. Approve it and you are returned to Dema with the integration marked as Active.

Scopes Dema requests

ScopeWhat it allows
read_products, write_productsRead and update products and variants
read_orders, write_ordersRead and update orders
read_customers, write_customersRead and update customer records and tags
read_inventoryRead inventory levels
read_locationsRead store locations, used for per-location inventory views
read_publications, write_publicationsRead and update product publications across sales channels
read_discounts, write_discountsRead and update discounts and promotions

Troubleshooting

  • Redirect URI mismatch. The redirect URI in your Shopify app must be https://app.dema.ai/agents/oauth/callback exactly, including protocol and path.
  • Dema says the store URL is invalid. The account URL must be HTTPS and must end with .myshopify.com. Use your store’s real subdomain, not a custom domain.
  • Install fails on the store. The staff account installing the app must have permission to install private and custom apps. Owners can grant this from Settings → Users and permissions.

Additional resources