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.
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 can do with Shopify
Once connected, your bots and agents can use Shopify inside conversations and automations. Typical uses include:
- Look up an order’s status by order number or customer email.
- Show product details, price, variants and availability.
- Check fulfillment and tracking information for a shipment.
- Create draft orders, or start a return/refund (with the right scopes).
- 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.
- A Shopify store and a staff account with permission to develop apps.
- Custom app development enabled in the store (Settings → Apps and sales channels → Develop apps).
- Your store’s myshopify.com domain.
- 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.
- In Shopify admin, open Settings → Apps and sales channels → Develop apps.
- 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.
| Method | When to use it | Notes |
|---|---|---|
| Custom app (recommended) | A single store | Create 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 distribution | Use 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.
- In Shopify admin, go to Settings → Apps and sales channels → Develop apps → Create an app, and name it “B6AI”.
- Open Configuration → Admin API integration and select the Admin API access scopes listed below, then Save.
- Click Install app to install it into your store.
- Open API credentials, reveal and copy the Admin API access token (it starts with shpat- and is shown once).
- Note your store domain (yourstore.myshopify.com).
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 / permission | What it allows | Why B6AI needs it |
|---|---|---|
| read_orders | Read orders | Answer order-status and order-history questions |
| write_orders | Create and update orders and draft orders | Create draft orders or adjust orders from chat |
| read_products | Read products and variants | Show product details, price and options |
| read_inventory | Read inventory levels | Tell customers whether an item is in stock |
| read_fulfillments | Read fulfillment and tracking | Provide shipping and tracking updates |
| read_customers | Read customer records | Match 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.
- After selecting scopes you must Install (or re-install) the app for them to take effect.
- If you add scopes later, re-install the app.
- 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.
- In B6AI, open Settings → Integrations → Shopify.
- Enter your store domain and the Admin API access token.
- Optionally set the API version and default currency for display.
- Click Save: B6AI reads your shop info to confirm access.
{
"provider": "shopify",
"shop": "yourstore.myshopify.com",
"access_token": "shpat_…",
"api_version": "2024-10"
}| Field | What it is | Example value |
|---|---|---|
| Store domain | Your full myshopify domain | yourstore.myshopify.com |
| Admin API access token | The shpat- token from your custom app | shpat_1a2b3c… |
| API version | The Admin API version B6AI targets | 2024-10 |
| Default currency | Currency used for display | USD |
Verify the connection
Confirm the integration is live before you rely on it in a bot.
- Confirm the Shopify card shows “Connected”.
- Run the test: it reads your store name and a recent order (details masked).
- Confirm the values match your Shopify admin.
Troubleshooting
If the connection fails or an action does not work, match the symptom below to its cause and fix.
| Symptom / error | Likely cause | How to fix it |
|---|---|---|
| 401 [API] Invalid API key or access token | Wrong or rotated token | Re-copy the Admin API access token; re-install the app if needed |
| 403 Access denied | A required scope isn’t granted | Add the scope in Configuration and re-install the app |
| 404 Not Found | Wrong store domain or API version | Use the full myshopify.com domain and a supported API version |
| Order not found | Typo, or the customer used a different email | Search by email plus order number and confirm the store |
Limitations & rate limits
Keep these constraints in mind so your bots behave predictably at scale.
- Shopify rate-limits the Admin API (a leaky-bucket for REST; cost-based for GraphQL).
- Refunds and returns require the appropriate scopes and store settings.
- Some data and features require Shopify Plus.
Security best practices
- Grant only the scopes and permissions listed above, never request more “just in case”.
- Rotate your Shopify Admin API access token on a regular schedule, and immediately if you suspect exposure.
- Restrict the Enterprise Admin role (which manages integrations) to a small, trusted group.
- Prefer a dedicated service account or bot user over a personal login, so access survives staff changes.
- Review the integration’s activity in the B6AI Activity Logs periodically for unexpected calls.
- Disconnect the integration the moment a credential leaks; then rotate it in Shopify before reconnecting.
Recommendations
- Test against a sandbox or non-production Shopify account before connecting live data.
- Document which bots and flows depend on this integration so changes are predictable.
- Set a recurring reminder to review scopes and rotate credentials.
- Enable only the capabilities you actually use today; you can widen scopes later.