Ecommerce integration

Shopify

Shopify integration overview
  • CategoryEcommerce
  • AuthOAuth
  • Scopes9

Overview

Shopify connects to MessageMind in two ways. Most merchants install the MessageMind app from the Shopify App Store, which runs the OAuth consent flow and lands them back on the MessageMind Shopify-connect page with the store already linked. Merchants who prefer to drive the connect from the dashboard open /integrations, click the Shopify card and the 'Connect Your Shopify Store' modal takes three fields: Store URL (your Shopify store name, either "yourstorename" or "yourstorename.myshopify.com", MessageMind auto-detects and normalizes it), Client ID (from Shopify Dev Dashboard, Apps, your app, Client ID) and Client Secret (from the same screen, kept private). On submit MessageMind POSTs to /integration/connection/shopify/start, Shopify returns an authUrl, and the browser is redirected to Shopify's consent screen. Once the merchant approves, Shopify's OAuth callback hits MessageMind, a per-shop access token is minted and the integration flips to connected. The AI then uses that token to look up orders, read the product catalog and check live stock for the shopper it is talking to.

What MessageMind can do with it

  • Look up any order by its order number and return the customer, line items, totals, fulfillment status, tracking numbers and refunds.
  • Check live stock for a product by product id, variant id, SKU, handle or product name, with optional variant option filters.
  • Pull the entire product catalog (products and variants) to power smart product search in-thread.
  • Fire a MessageMind automation the first time a Shopify order is created, deduplicated so a Shopify retry of the same order does not run the automation twice.
  • Consume the Shopify order webhook at /shopify-webhook and route it to the shopifyOrderCreated automation event.

Requirements

  • A Shopify store the merchant can install an app on.
  • Either the MessageMind app installed from the Shopify App Store, or a Shopify custom app whose Client ID and Client Secret you can paste into the MessageMind dashboard.

How to connect

  1. Preferred path: install the MessageMind app from the Shopify App Store. Shopify runs the OAuth consent screen and redirects to MessageMind's /shopify-connect page with the store already linked.
  2. Dashboard path: in the MessageMind dashboard, open /integrations and click the Shopify card. The 'Connect Your Shopify Store' modal opens.
  3. Fill in the three fields: Store URL (e.g. "yourstorename" or "yourstorename.myshopify.com"), Client ID (from Shopify Dev Dashboard, Apps, your app, Client ID) and Client Secret (from the same screen).
  4. Click Connect. MessageMind POSTs to /integration/connection/shopify/start and receives an authUrl from Shopify.
  5. The browser is redirected to Shopify's consent screen, which lists the permissions the app will use. Approve to install.
  6. Shopify redirects to MessageMind's OAuth callback, a per-shop access token is minted and the integration is marked Enabled. The AI can now read orders, products and stock for that shop.

Authentication and permissions

Mechanism
OAuth 2.0. The merchant either installs the MessageMind app from the Shopify App Store or pastes a Shopify custom app's Client ID and Client Secret into the dashboard modal; MessageMind starts the OAuth flow at /integration/connection/shopify/start, Shopify returns an authUrl, the browser lands on Shopify's consent screen, and the OAuth callback mints a per-shop access token that MessageMind refreshes on its own.
Credentials
Store URL (shop name, auto-normalized to the myshopify.com domain), Client ID and Client Secret for the Shopify app. After OAuth, a per-shop access token is stored on your MessageMind tenant and sent as the Shopify Admin API bearer header on every call.

Required scopes

  • read_orders
  • read_customers
  • read_products
  • read_inventory
  • read_fulfillments
  • read_locations
  • read_reports
  • read_discounts
  • read_returns

Available data and actions

Reads

  • Orders by order number, with customer, line items, totals, fulfillments, tracking numbers and refunds.
  • Products and variants across the whole catalog, including options.
  • Live stock levels for a product or variant across locations.
  • Customer records attached to orders (name, email, phone, order history).

Writes

  • Configured order-event automation receives Shopify events. The assistant does not create storefront orders, draft orders or refunds through this connector.

AI agent use cases

  • A shopper asks 'where is my order #1001' on WhatsApp or Instagram; the AI pulls the order and quotes the fulfillment status and tracking numbers.
  • A shopper describes a product; the AI searches the synced catalog and quotes matching items with prices and availability.
  • A shopper asks whether a specific variant is in stock; the AI reads live inventory for that variant and answers from the current level.
  • A new Shopify order fires a MessageMind automation, with dedup so a Shopify retry of the same order does not run the automation twice.

Configuration

  • The order automation webhook is registered per store and routed through /shopify-webhook to the shopifyOrderCreated automation event.
  • Access tokens are refreshed on their own; the merchant does not paste or manage an API key after the initial OAuth install.

Example workflows

Order status lookup in-thread

  1. Shopper asks for the status of their order by number.
  2. The AI calls Shopify by that order number.
  3. Shopify returns the order with fulfillments, tracking and refund state.
  4. The AI quotes the status and shares the carrier tracking numbers.

Install from the Shopify App Store

  1. Merchant installs the MessageMind app from the Shopify App Store.
  2. Shopify shows the consent screen listing the permissions the app will use.
  3. On approve, Shopify redirects to MessageMind's /shopify-connect page.
  4. MessageMind completes the OAuth exchange, mints a per-shop access token and marks the store Enabled.

Limitations

  • If the stored Shopify token is revoked (for example, when the app is uninstalled from Shopify), reads start failing and the integration needs to be reconnected.
  • The dashboard install path requires a Shopify custom app whose Client ID and Client Secret are available; merchants without one should use the Shopify App Store path instead.

Troubleshooting

Reads start failing with a credentials error.

Shopify has rejected the stored token (common cause: the app was uninstalled from the shop). Reinstall the MessageMind app from the Shopify App Store, or re-run the dashboard connect, to issue a fresh token.

The Connect button does nothing after submitting the modal.

The /integration/connection/shopify/start call needs to return an authUrl before the browser is redirected to Shopify. Confirm the Store URL, Client ID and Client Secret are correct and that the Shopify app is live, then retry.

Disconnect and reconnect

  • Uninstall the MessageMind app from your Shopify admin, or disconnect from the MessageMind Integrations page. The stored access token is removed from your tenant and future reads stop.
  • To reconnect, reinstall the MessageMind app from the Shopify App Store, or re-run the dashboard connect flow. Previously synced orders stay on Shopify; disconnecting does not cancel them.