message.comDevelopers

Shopify data integration Coming soon

Once your Shopify store is connected, the AI and your agents both have read access to your store. Order status, tracking, inventory, customer history, refunds. The data flows in two directions: real-time webhooks update the workspace as Shopify changes; agents and AI tools read on demand via cached snapshots.

This integration is the data layer that sits behind the Shopify app. Install the app from the Shopify App Store to get the integration configured automatically.

What we sync

  • Products and variants. Title, SKU, options, price, inventory levels per location.
  • Orders. Status, line items, fulfillment, tracking, refund history.
  • Customers. Profile, lifetime value, total orders, addresses, tags.
  • Refunds and returns. Full timeline including notes.

OAuth scopes

Connecting is one click via OAuth. The scopes we request match the features we ship. We never ask for scopes we do not use.

Scopes
// OAuth scopes we request
read_products       // Catalog and inventory
read_orders         // Order history, status, line items
read_customers      // Customer profiles, lifetime value
read_inventory      // Stock levels per location
write_orders        // Refund initiation (gated by agent approval)
write_script_tags   // Inject the widget script tag

Data freshness

We use Shopify's webhooks to keep the cached snapshot fresh. Most events propagate within seconds. For real-time questions (current inventory, latest order status), AI tools call the Shopify Admin API directly rather than the cached snapshot, ensuring the answer is current at the moment of the question.

  • Webhooks subscribed. orders/create, orders/updated, orders/fulfilled, refunds/create, customers/update, products/update, inventory_levels/update.
  • Webhook latency. Typically 2-5 seconds from Shopify event to workspace update.
  • Live tool calls. Inventory and order-status questions bypass the cache.

Agent context

When a visitor with a known Shopify customer record opens chat, the agent sidebar shows the relevant context inline. No agent clicks required.

Agent sidebar
// What the agent sees when a known customer opens chat
Visitor: [email protected]
  Lifetime: $1,247 across 8 orders
  Last order: #4567 (shipped May 12, UPS 1Z...)
  Cart now: 2 items, $89.50 (abandoned 14 min ago)
  Tags: vip, returning-customer

AI tools auto-installed

Connecting the Shopify store auto-installs a set of tools the AI can use during conversations. Each is described to the model so it can decide when to call.

  • lookup_order(orderNumber, email). Order status, tracking, items.
  • check_inventory(sku). Live stock count per location.
  • list_customer_orders(email, limit). Recent orders for the visitor.
  • start_refund(orderId, amount, reason). Initiates a refund; agent approval required by default.
  • cart_summary(cartToken). For abandoned-cart engagement.

See custom tools for how tool calls are routed, signed, and approved.

Visitor identity mapping

We match Shopify customers to visitors by email. If you want a stable mapping that survives email changes, also push your internal customer ID through the widget's identify call as externalId. See external ID mapping.

Privacy

Order data is stored in our database (encrypted at rest) only for the snapshot. Raw payment details (full card number, CVV) are never received from Shopify; we only see the last four digits and the payment status. We are PCI-DSS aware but not in PCI scope; nothing we hold is a primary cardholder identifier.

Common pitfalls

  • Headless storefronts (Hydrogen) do not auto-install the script tag. Install the widget via the React SDK in your Hydrogen layout. The data integration works regardless.
  • Multiple stores per workspace. Only one Shopify connection per workspace today. For multi-store merchants, run a workspace per brand.
  • Refund approval gates. The default refund flow requires agent approval. Disabling it (auto-refund from AI) is supported but raises fraud risk; do not disable globally.