B6AIDocs

Connect Shopify to B6AI

Connect your Shopify store so bots can answer order-status questions, look up products and inventory, and start refunds, end to end.

8 min read

Overview

The Shopify integration connects your store so bots can answer the questions customers ask most, “where’s my order?”, “is this in stock?”, “can I get a refund?”, using live data from Shopify.

It turns your storefront’s support into self-service, right inside the conversation.

What you will need
A Shopify account with administrator access, and a B6AI user with the Enterprise Admin role, integrations are configured once at the workspace level and shared by every bot.

What you can do with Shopify

Once connected, your bots and agents can use Shopify inside conversations and automations. Typical uses include:

  1. Look up an order’s status by order number or customer email.
  2. Show product details, price, variants and availability.
  3. Check fulfillment and tracking information for a shipment.
  4. Create draft orders, or start a return/refund (with the right scopes).
  5. Surface a customer’s order history for context during a conversation.

How the integration works

B6AI calls the Shopify Admin API using a custom-app Admin API access token (sent in the X-Shopify-Access-Token header), scoped to your store (yourstore.myshopify.com). For multiple stores or partner distribution, OAuth is available.

The token grants only the scopes you select, and is stored encrypted at rest.

Prerequisites

Make sure all of the following are in place before you start. Each one is required, skipping any will cause the connection to fail later.

  1. A Shopify store and a staff account with permission to develop apps.
  2. Custom app development enabled in the store (Settings → Apps and sales channels → Develop apps).
  3. Your store’s myshopify.com domain.
  4. The Enterprise Admin role in B6AI.

Create or prepare your Shopify account

If your organization does not already use Shopify, create an account first. Existing customers can skip to the next step.

  1. In Shopify admin, open Settings → Apps and sales channels → Develop apps.
  2. If prompted, click Allow custom app development (a one-time store setting).

Choose a connection method

B6AI supports more than one way to connect Shopify. Pick the one that fits your organization’s policies, the rest of this guide works for either.

MethodWhen to use itNotes
Custom app (recommended)A single storeCreate a custom app in your store admin and copy its Admin API access token (starts with shpat-).
OAuth (public/custom Partners app)Multiple stores or partner distributionUse a Shopify Partners app with a client ID/secret and the OAuth flow.

Generate your Shopify Admin API access token

B6AI authenticates with Shopify using your Shopify Admin API access token. Follow these steps exactly, each field you copy here is entered into B6AI later.

  1. In Shopify admin, go to Settings → Apps and sales channels → Develop apps → Create an app, and name it “B6AI”.
  2. Open Configuration → Admin API integration and select the Admin API access scopes listed below, then Save.
  3. Click Install app to install it into your store.
  4. Open API credentials, reveal and copy the Admin API access token (it starts with shpat- and is shown once).
  5. Note your store domain (yourstore.myshopify.com).
Keep secrets safe
Treat every token, key and secret like a password. Never commit them to source control, paste them into chat, or email them. B6AI stores them encrypted at rest, enter them only in the integration settings.

Required permissions & scopes

Grant only the scopes below. Each one maps to a specific B6AI capability; requesting fewer reduces risk and speeds up any review your Shopify administrator performs. The table explains exactly what each scope allows and why it is needed.

Scope / permissionWhat it allowsWhy B6AI needs it
read_ordersRead ordersAnswer order-status and order-history questions
write_ordersCreate and update orders and draft ordersCreate draft orders or adjust orders from chat
read_productsRead products and variantsShow product details, price and options
read_inventoryRead inventory levelsTell customers whether an item is in stock
read_fulfillmentsRead fulfillment and trackingProvide shipping and tracking updates
read_customersRead customer recordsMatch a chat to a customer and their orders

Finish configuration inside Shopify

Complete these steps in the Shopify console before connecting B6AI, so the credentials are fully active.

  1. After selecting scopes you must Install (or re-install) the app for them to take effect.
  2. If you add scopes later, re-install the app.
  3. For OAuth, register the B6AI redirect URL in your Partners app.

Connect Shopify in B6AI

Now enter your credentials in B6AI. Signed in as an Enterprise Admin, open Settings → Integrations, find the Shopify card and click Connect, then complete the form. Every field is explained below.

  1. In B6AI, open Settings → Integrations → Shopify.
  2. Enter your store domain and the Admin API access token.
  3. Optionally set the API version and default currency for display.
  4. Click Save: B6AI reads your shop info to confirm access.
json
{
  "provider": "shopify",
  "shop": "yourstore.myshopify.com",
  "access_token": "shpat_…",
  "api_version": "2024-10"
}
FieldWhat it isExample value
Store domainYour full myshopify domainyourstore.myshopify.com
Admin API access tokenThe shpat- token from your custom appshpat_1a2b3c…
API versionThe Admin API version B6AI targets2024-10
Default currencyCurrency used for displayUSD

Verify the connection

Confirm the integration is live before you rely on it in a bot.

  1. Confirm the Shopify card shows “Connected”.
  2. Run the test: it reads your store name and a recent order (details masked).
  3. Confirm the values match your Shopify admin.
Connected
A green “Connected” status plus a successful test confirms Shopify is ready to use in your bots, action nodes and automations.

Troubleshooting

If the connection fails or an action does not work, match the symptom below to its cause and fix.

Symptom / errorLikely causeHow to fix it
401 [API] Invalid API key or access tokenWrong or rotated tokenRe-copy the Admin API access token; re-install the app if needed
403 Access deniedA required scope isn’t grantedAdd the scope in Configuration and re-install the app
404 Not FoundWrong store domain or API versionUse the full myshopify.com domain and a supported API version
Order not foundTypo, or the customer used a different emailSearch by email plus order number and confirm the store

Limitations & rate limits

Keep these constraints in mind so your bots behave predictably at scale.

  1. Shopify rate-limits the Admin API (a leaky-bucket for REST; cost-based for GraphQL).
  2. Refunds and returns require the appropriate scopes and store settings.
  3. Some data and features require Shopify Plus.
Rate limits
Shopify’s REST Admin API allows roughly 2 requests/second sustained (with bursts); GraphQL uses a cost budget. B6AI throttles and retries on 429.

Security best practices

  1. Grant only the scopes and permissions listed above, never request more “just in case”.
  2. Rotate your Shopify Admin API access token on a regular schedule, and immediately if you suspect exposure.
  3. Restrict the Enterprise Admin role (which manages integrations) to a small, trusted group.
  4. Prefer a dedicated service account or bot user over a personal login, so access survives staff changes.
  5. Review the integration’s activity in the B6AI Activity Logs periodically for unexpected calls.
  6. Disconnect the integration the moment a credential leaks; then rotate it in Shopify before reconnecting.

Recommendations

  1. Test against a sandbox or non-production Shopify account before connecting live data.
  2. Document which bots and flows depend on this integration so changes are predictable.
  3. Set a recurring reminder to review scopes and rotate credentials.
  4. Enable only the capabilities you actually use today; you can widen scopes later.
Was this page helpful?