After you connect a store, StoreClaw can read Shopify orders, inventory, products, customers, and other data within the authorized scope for analysis, reports, and scheduled tasks. This article explains how to create a Shopify custom app and complete the connection.

Why Connect a Store

After a store is connected, StoreClaw can perform tasks based on real business data:

  • Data analysis: StoreClaw generates analysis based on the orders, inventory, and traffic data you authorize.
  • Scheduled tasks: After the data source is connected, scheduled tasks can check store metrics and generate alerts on schedule.

Get Shopify API Credentials

Because of Shopify's security requirements, you need to authorize StoreClaw through a custom app. Follow the steps below to obtain the Client ID and Client Secret.

Step 1: Start App Development in Shopify Admin

  1. Sign in to Shopify Admin and go to Settings -> Apps.
  2. Click Develop apps, then click Create app in Dev Dashboard in the upper-right corner of the page. Create App
  3. Shopify automatically redirects you to the Shopify dev dashboard.

Step 2: Create an App in the Dev Dashboard

  1. In the Shopify dev dashboard, click Create app. Create App
  2. Select Start from Dev Dashboard, enter an app name, and click Create. Create App

Step 3: Configure App Permissions and Settings

  1. Continue through the app setup flow and locate App URL, then fill in the default address: https://www.storeclaw.ai/app/connectors?platform=shopify
  2. Uncheck the Embed app in Shopify checkbox. App URL
  3. In the Access scopes section, click Select scopes. permissions
  4. Select the required permission scopes and click Done.
  5. In the Access scopes section, click Select scopes. scope
  6. Select the required permission scopes and click Done.

StoreClaw can only do what you authorize. The scopes you select determine which operations StoreClaw can perform. If an action is not authorized, StoreClaw will return a permissions error when it tries to run it. Select only the scopes needed for your current tasks.

The table below shows common scopes and the capabilities they control:

Scope What StoreClaw can do when selected What it cannot do if not selected
read_orders Query orders, analyze sales trends, generate sales reports Cannot access any order data
write_orders Update order status and notes Can only view orders, not modify them
read_products Query product information and analyze product performance Cannot read product data
write_products Edit product titles, descriptions, prices, and publish status Can only view products, not edit them
read_inventory Query inventory levels and trigger restock alerts Cannot access inventory data
write_inventory Adjust inventory quantities Can only view inventory, not change it
read_analytics Read traffic, conversion, and other analytics data Cannot read Shopify built-in analytics reports
read_customers Analyze customer profiles and review customer history Cannot access customer information
read_shopify_payments_payouts Review payment and payout records Cannot access payment flow data
  1. Click Release, then click **Release **again in the confirmation dialog. Release App

Step 4: Install the App in the Store

  1. After publishing, click the app name in the left navigation to open the app details page.
  2. On the Overview page, click Install app in the upper-right corner.
  3. Select the store where you want to install the app, then click Install on the confirmation page. Install App

Note: Unless you are a Shopify Plus user, each custom app can be installed in only one store. If you need to connect multiple stores to StoreClaw, create a separate app for each store in the Shopify dev dashboard and repeat this process for each one.

Step 5: Retrieve API Credentials

  1. After the app is installed, return to the Shopify dev dashboard.
  2. Open the app details page and click Settings in the left menu.
  3. In the Credentials section, copy the Client ID and secret. Click the eye icon to reveal the secret if needed. Credentials

Complete the Configuration in StoreClaw

  1. Open Connectors: In the left navigation of StoreClaw, click Connectors, then find Shopify under the Ecommerce category.
  2. Fill in the fields:
    • Store Domain: Your store admin domain, for example your-store.myshopify.com.
    • Client ID: Paste the API key you just copied.
    • Client Secret: Paste the API secret key you just copied.
  3. Activate the connection: Click Connect Shopify ->.
  4. Verify status: After the connection succeeds, the Shopify card shows a connected status.

Connection Failed? Common Checks

If the connection does not succeed, review these common issues:

Symptom Possible cause How to fix it
Credential error The Client ID or Client Secret is incorrect Confirm that you copied the full API key and API secret key and did not include extra spaces
Permission error The scopes were not published or the app was not installed Return to the Shopify dev dashboard and confirm you completed both Publish and Install app

Common Use Cases

After the connection succeeds, you can send instructions directly to StoreClaw in chat. The examples below work only if you granted the required scopes in Step 3. If the necessary scope is missing, StoreClaw will report insufficient permissions.

Required scope Example prompt
read_orders Analyze my order trends for the past 7 days.
read_inventory Check inventory and list the products that need restocking.
read_customers Analyze my customer profile.

FAQ

Q: Will StoreClaw modify my store data?

A: That depends on the permissions you granted. If you selected only read_* scopes, StoreClaw can read data only and cannot make changes. Write actions are possible only when you also grant the corresponding write_* scopes and explicitly ask StoreClaw to perform those actions.

Q: Shopify is connected, but StoreClaw says it cannot access permissions in chat. What should I check?

A: Confirm the following:

  • You authorized the correct store.
  • The store actually contains data. For example, a newly created store may not have historical orders yet.
  • The authorization scope is complete. Some platforms let you check scopes manually during authorization, so make sure the scopes required by StoreClaw are selected.

Q: How do I disconnect the store?

A: On the Connectors page, click the connected card and select Disconnect. It is also a good idea to uninstall the corresponding custom app in Shopify Admin to ensure access is fully revoked.

连接店铺后,StoreClaw 可在授权范围内读取 Shopify 订单、库存、商品、客户等数据,用于分析、简报和定时任务。本文说明如何创建 Shopify 自定义应用并完成连接。

为什么需要连接店铺

连接店铺后,StoreClaw 可以基于实际业务数据执行相关任务:

  • 数据分析: StoreClaw 将基于已授权的订单、库存和流量数据生成分析结果。
  • 定时任务: 连接数据源后,定时任务 才能按计划检查店铺指标并生成提醒。

获取 Shopify API 凭据

由于 Shopify 的安全性要求,您需要以“自定义应用”的方式授权 StoreClaw。请按照以下步骤获取 Client IDClient Secret

步骤一:在 Shopify 后台启动应用开发

  1. 登录 Shopify 后台,进入 设置 -> 应用
  2. 点击 开发应用,然后点击页面右上角的 在 Dev Dashboard 中创建应用创建应用
  3. 系统将自动跳转至 Shopify dev dashboard(开发者控制台)。

步骤二:在开发者控制台中创建应用

  1. 进入 Shopify dev dashboard,点击 创建应用创建应用
  2. 选择 从 Dev Dashboard 开始,输入应用名称,点击 创建创建应用

步骤三:配置应用权限与设置

  1. 继续完成应用的配置流程,找到 应用 URL,填入我们的地址:https://www.storeclaw.ai/app/connectors?platform=shopify

  2. 取消勾选 内嵌至 Shopify app 选项框。

  3. 应用 URL

  4. 访问权限 部分,点击 选择权限范围选择权限范围

  5. 勾选所需权限项。点击 完成勾选权限项

    StoreClaw 的操作范围由您勾选的权限决定。 勾选了哪些 scope,StoreClaw 就能执行哪些对应操作;未勾选的操作,StoreClaw 执行时将提示权限不足。建议仅勾选当前任务需要的权限。

    以下是常见权限与对应能力的参考:

    权限代码 勾选后 StoreClaw 可以做 未勾选则不能做
    read_orders 查询订单、分析销售趋势、生成销售报表 无法获取任何订单数据
    write_orders 更新订单状态、备注 只能查看订单,无法修改
    read_products 查询产品信息、分析选品表现 无法读取产品数据
    write_products 修改产品标题、描述、价格、上下架 只能查看产品,无法编辑
    read_inventory 查询库存数量、触发补货预警 无法获取库存数据
    write_inventory 调整库存数量 只能查看库存,无法修改
    read_analytics 获取店铺流量、转化等分析数据 无法读取 Shopify 内置分析报告
    read_customers 分析客户画像、查询客户历史 无法获取客户信息
    read_shopify_payments_payouts 查询收款与提现记录 无法获取支付流水数据
  6. 点击 发布,在弹出的确认窗口中再次点击 发布发布应用

步骤四:在店铺中安装应用

  1. 发布成功后,点击左侧导航栏的应用名称,进入应用详情页。

  2. 概览 页点击右上角的 安装应用,系统会跳转至 Shopify 商户后台。

  3. 选择要安装的店铺,在确认页面点击 安装安装应用

  4. 安装完成后会自动跳转回到StoreClaw页面

    提示: 除 Shopify Plus 用户外,每个自定义应用只能安装到一家店铺。如果您有多家店铺需要连接 StoreClaw,请为每家店铺分别在 Shopify dev dashboard 中创建一个独立应用,重复本流程完成安装。

步骤五:提取 API 凭据

  1. 应用安装完成后,返回 Shopify dev dashboard。
  2. 进入该应用的详情页,点击左侧菜单的 设置
  3. 凭据 部分,获取 客户端 ID加密秘钥 (点击 眼睛 图标即可查看密钥内容)。 获取客户端 ID 和加密秘钥

在 StoreClaw 中完成配置

  1. 进入连接中心: 在 StoreClaw 左侧导航栏点击 连接器,在 电商 分类下找到 Shopify
  2. 填写字段:
    • 店铺域名: 您的店铺后台地址(例如:your-store.myshopify.com)。
    • Client ID: 填入刚才获取的 API key
    • Client Secret: 填入刚才获取的 API secret key
  3. 激活连接: 点击 Connect Shopify →
  4. 验证状态: 连接成功后,Shopify 卡片将显示已连接。

连接失败?常见问题排查

如连接未成功,请检查以下常见问题:

问题现象 可能原因 解决方法
提示凭据错误 Client ID 或 Client Secret 填写错误 确认复制的是完整的 API keyAPI secret key,注意不要包含多余空格
提示权限不足 权限未发布或未安装应用 返回 Shopify dev dashboard,确保已点击 发布 并完成 安装应用 步骤

应用场景

连接成功后,您可以在对话中直接向 StoreClaw 发送指令。以下是一些常用示例——能否执行成功取决于您在步骤三中开放的权限范围,未授权的操作 StoreClaw 会提示权限不足。

所需权限 示例指令
read_orders 帮我分析一下最近 7 天的订单趋势
read_inventory 检查一下库存,列出需要补货的商品
read_customers 分析一下我的客户画像

常见问题 (FAQ)

Q:StoreClaw 会修改我的店铺数据吗?

A: 取决于您授权的权限范围。如果您只勾选了 read_* 类权限,StoreClaw 仅能读取数据,无法做任何修改。只有在您同时授予了对应的 write_* 权限,且主动要求 StoreClaw 执行相关操作时,才会产生写入行为。

Q:Shopify 连接成功后,StoreClaw 对话时显示「无法获得权限」?

A: 请确认以下几点:

  • 授权时选择的是正确的店铺;
  • 该平台账号有对应数据(如新建店铺可能没有历史订单);
  • 授权范围是否完整(部分平台授权时可手动勾选权限范围,请确保已勾选 StoreClaw 所需权限)。

Q:如何断开连接?

A: 在连接器页面点击已连接的卡片,选择 断开连接。建议同时在 Shopify 后台卸载对应的自定义应用以确保彻底撤销授权。