香港零售品牌 Shopify Plus 接 POS 系統實戰:線上線下庫存同步設定教學

Key Takeaways
- Shopify Plus POS Pro 可實現秒級線上線下庫存雙向同步
- 每間門市和倉庫需建立獨立 Location 並設定出貨優先順序
- 使用 GraphQL `inventorySetQuantities` mutation 做程式化庫存管理
- Shopify Flow 可自動化低庫存通知與跨門市調撥建議
- 上線前務必完成離線模式、退貨回補等六項測試
在 Shopify Plus 上整合 POS 系統,核心在於透過 Shopify POS Pro 與 Location-based inventory 機制,將線上商店與實體門市的庫存即時雙向同步,避免超賣並提升全渠道營運效率。本教學涵蓋從帳號設定、Location 建立、POS 硬體配對到 API 層級的庫存同步邏輯,適用於香港及亞太區零售品牌。
為什麼庫存同步是香港零售品牌的頭號痛點?
香港零售市場寸金尺土,多數品牌同時經營 2–8 間實體門市加上線上商店。根據 Shopify 2024 年 Commerce Trends 報告,採用全渠道銷售的商戶平均收入比單一渠道高出 190%。但庫存不同步帶來的超賣、缺貨和人手盤點成本,往往吃掉這些增長紅利。
傳統做法是用 ERP 或第三方中間件(如 Celigo、Stock&Buy)做定時批次同步,但延遲通常在 5–15 分鐘,對快消品或限量商品而言風險極高。Shopify Plus 的原生 POS Pro 方案則透過 GraphQL Admin API 的 inventorySetQuantities mutation 實現近即時同步,延遲可壓縮至秒級。
這套架構不只適用於香港——我們在新加坡、台灣和澳洲的零售客戶同樣受益,尤其是跨境品牌需要管理多地倉庫加門市的複合場景。
開始前的必備條件清單
在動手設定之前,請確認以下條件已經就緒:
帳號與方案要求
- Shopify Plus 方案:POS Pro 功能僅在 Plus 方案下可為所有 Location 免費啟用;標準方案每個額外 Location 需另付 USD 89/月(根據 Shopify 官方定價頁面 2025 年資料)
- Shopify POS Pro 授權:在 Shopify Admin → Settings → Apps and sales channels → Point of Sale 中確認已啟用 POS Pro
- Staff 帳號權限:操作人員需具備
Manage inventory及Manage locations權限
硬體需求
- iPad(第 7 代或以上,iPadOS 16+)或 Android 平板(Android 10+)
- Shopify POS 硬體套件:建議使用官方 WisePad 3 讀卡器(支援 Tap & Pay,適用於香港 Visa/Mastercard 感應支付)
- 網路:每間門市需穩定 Wi-Fi 或 4G 備援,建議下載速度 ≥ 10 Mbps
第三方工具(可選)
- Stocky by Shopify:用於進階採購建議與庫存預測(Shopify Plus 免費內建)
- Flow:Shopify Plus 原生自動化工具,用於觸發低庫存通知等場景
Ready to Transform Your Ecommerce Operations?
Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.
第一步:建立 Locations 並設定庫存優先級
Shopify 的庫存管理核心概念是 Location。每一個實體門市、倉庫或第三方物流中心都應建立為獨立 Location。
在 Admin 後台建立 Location
- 進入 Settings → Locations
- 點擊 Add location
- 填入門市名稱(建議格式:
品牌名 - 分店名 - 區域,例如BrandX - 銅鑼灣 - HK) - 輸入完整地址(影響運費計算和稅務邏輯)
- 勾選 Fulfill online orders from this location(如果該門市也負責線上訂單出貨)
- 儲存
重複此步驟為所有門市與倉庫建立 Location。Shopify Plus 支援最多 200 個 Location,對絕大多數零售品牌綽綽有餘。
設定 Fulfillment Priority(出貨優先順序)
出貨優先順序決定線上訂單會從哪個 Location 扣減庫存並出貨:
- 進入 Settings → Shipping and delivery
- 在 Fulfillment priority 區域,拖拽排序你的 Location
- 建議將主倉庫排在第一位,門市作為備援
這個排序直接影響庫存扣減邏輯:系統會依序檢查各 Location 的可用庫存,優先從排序靠前的地點扣減。
第二步:在 POS App 配對門市與硬體
POS App 初始化
- 在 iPad 上從 App Store 下載 Shopify POS app(版本 9.x 或以上)
- 使用 Staff 帳號登入
- 系統會提示選擇此裝置對應的 Location——務必選擇正確的門市
- 進入 POS App → Settings → Hardware,依序配對以下硬體:
- 讀卡器(WisePad 3 透過藍牙配對)
- 收據列印機(支援 Star Micronics、Epson 等品牌)
- 現金抽屜(接 printer 的 DK port)
- 條碼掃描器(選配)
驗證配對狀態
配對完成後,在 POS App → Settings → Hardware 頁面,每個硬體應顯示綠色 Connected 狀態。若出現間歇性斷線,檢查藍牙干擾源(香港商場 Wi-Fi 密集,2.4GHz 頻段常受干擾,建議將 Wi-Fi 路由器切換至 5GHz)。
Ready to Transform Your Ecommerce Operations?
Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.
第三步:啟用庫存追蹤與同步設定
為產品啟用多 Location 庫存追蹤
每個產品的每個 Variant 都需要逐一啟用庫存追蹤:
- 進入 Products → 選擇產品 → Variants
- 點選特定 Variant
- 在 Inventory 區域,勾選 Track quantity
- 展開各 Location,輸入初始庫存數量
- 儲存
如果產品數量龐大(超過 100 個 SKU),建議使用 CSV 批次匯入:
1Handle,Title,Option1 Value,Variant SKU,Variant Inventory Qty,Variant Inventory Policy,Variant Inventory Location2brx-tshirt-001,經典圓領T恤,S,BRX-TS-S,50,deny,BrandX - 銅鑼灣 - HK3brx-tshirt-001,經典圓領T恤,S,BRX-TS-S,120,deny,BrandX - 主倉庫 - HK4brx-tshirt-001,經典圓領T恤,M,BRX-TS-M,45,deny,BrandX - 銅鑼灣 - HK
注意 Variant Inventory Policy 設為 deny 代表庫存歸零後不允許繼續銷售——這是防止超賣的關鍵設定。
同步機制解析:Shopify 如何處理庫存變動
Shopify 的庫存同步並非傳統「推送/拉取」模式,而是基於 Inventory Level 物件的事件驅動架構:
- 線上商店完成結帳 → 對應 Location 的 Inventory Level 即時減少
- POS 完成交易 → 對應門市 Location 的 Inventory Level 即時減少
- 退貨/退款 → 根據 restock 設定自動回補
所有變動在 1–3 秒內反映到 Admin 後台和所有 POS 裝置,前提是裝置保持網路連線。
第四步:透過 GraphQL Admin API 做進階庫存操作
對於需要與外部系統(ERP、WMS、自研後台)整合的場景,Shopify Plus 提供 GraphQL Admin API 做程式化庫存管理。
查詢特定 Location 的庫存
1query {2 productVariant(id: "gid://shopify/ProductVariant/12345678") {3 inventoryItem {4 id5 inventoryLevels(first: 10) {6 edges {7 node {8 location {9 name10 id11 }12 quantities(names: ["available", "committed", "on_hand"]) {13 name14 quantity15 }16 }17 }18 }19 }20 }21}
預期回傳結果:
1{2 "data": {3 "productVariant": {4 "inventoryItem": {5 "id": "gid://shopify/InventoryItem/98765432",6 "inventoryLevels": {7 "edges": [8 {9 "node": {10 "location": {11 "name": "BrandX - 銅鑼灣 - HK",12 "id": "gid://shopify/Location/11111"13 },14 "quantities": [15 { "name": "available", "quantity": 48 },16 { "name": "committed", "quantity": 2 },17 { "name": "on_hand", "quantity": 50 }18 ]19 }20 }21 ]22 }23 }24 }25 }26}
使用 inventorySetQuantities 設定庫存
從 2024 年起,Shopify 已棄用舊版 inventoryAdjustQuantity mutation,改用 inventorySetQuantities:
1mutation {2 inventorySetQuantities(3 input: {4 reason: "correction"5 name: "available"6 quantities: [7 {8 inventoryItemId: "gid://shopify/InventoryItem/98765432"9 locationId: "gid://shopify/Location/11111"10 quantity: 5511 }12 ]13 }14 ) {15 inventoryAdjustmentGroup {16 createdAt17 reason18 }19 userErrors {20 field21 message22 }23 }24}
reason 欄位支援以下值:correction、cycle_count_available、received、movement_created 等。選擇正確的 reason 有助於後續審計追蹤。
使用 Webhook 監聽庫存變動
為確保外部系統與 Shopify 保持同步,建議訂閱 inventory_levels/update webhook:
1curl -X POST \2 https://your-store.myshopify.com/admin/api/2025-01/webhooks.json \3 -H 'Content-Type: application/json' \4 -H 'X-Shopify-Access-Token: YOUR_ACCESS_TOKEN' \5 -d '{6 "webhook": {7 "topic": "inventory_levels/update",8 "address": "https://your-server.com/webhooks/inventory",9 "format": "json"10 }11 }'
Webhook payload 會包含 inventory_item_id、location_id 和變動後的 available 數量,你的後端可據此更新 ERP 或 WMS 記錄。
Ready to Transform Your Ecommerce Operations?
Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.
使用 Shopify Flow 建立自動化庫存規則
Shopify Plus 內建的 Flow 工具可以處理許多原本需要人手介入的庫存場景:
低庫存自動通知
建立一個 Flow workflow:
- Trigger:Inventory quantity changed
- Condition:
inventoryQuantity.available≤ 5 ANDlocation.name包含 "HK" - Action:Send internal email 到採購團隊,內含產品名稱、SKU、目前庫存和 Location
跨 Location 自動調撥提醒
當某門市庫存低於閾值,而主倉庫仍有充足庫存時,自動發出調撥建議:
- Trigger:Inventory quantity changed
- Condition:門市 Location 的
available≤ 3 - Action:建立 Slack 通知或 Email,列出該 SKU 在各 Location 的庫存分布
我們在 2025 年第二季為一個香港時裝品牌實施這套 Flow 自動化方案時,該客戶擁有 6 間門市和 1 個中央倉庫,原本每天需要 2 名員工花約 3 小時人手檢查各門市庫存並安排調撥。導入 Flow + POS Pro 後,調撥建議自動產生並推送至 Slack 頻道,人手盤點時間減少了約 70%,而超賣事件從每月平均 23 單降至 2 單以下。這個項目從需求確認到上線花了 4 週,其中 API 整合佔了約 60% 的工時。
多幣值與多市場庫存管理的注意事項
對於同時經營香港、新加坡、台灣等多個市場的品牌,Shopify Plus 的 Markets 功能可以搭配 Location 做更精細的庫存分配:
- 每個 Market 可指定特定 Location 做履行:例如台灣訂單優先從台灣倉出貨,香港訂單從香港倉出貨
- 庫存不會跨 Market 共享:除非你刻意將同一 Location 指派給多個 Market
- 幣值與定價獨立:同一產品在不同 Market 可設定不同零售價,庫存扣減互不影響
根據 Shopify 2025 年 Q1 的產品更新日誌,Markets 功能已支援最多 50 個市場,涵蓋幣值、語言和域名自訂。
Ready to Transform Your Ecommerce Operations?
Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.
常見問題排查與解決方案
POS 離線模式下的庫存處理
Shopify POS 支援離線交易——當門市斷網時,POS 會將交易暫存於本地,待網路恢復後自動同步。但離線期間:
- 庫存不會即時更新到 Admin 後台
- 其他渠道(線上商店、其他門市)看到的庫存仍是斷網前的數字
- 如果離線時間過長(超過數小時),可能導致超賣
建議:為每間門市準備 4G 路由器作為備援網路,確保離線時間控制在分鐘級。
庫存數字不一致的排查步驟
- 進入 Products → Inventory → 選擇產品 查看各 Location 庫存明細
- 點擊 Adjustment history 檢查所有庫存變動記錄,確認是否有非預期的調整
- 如果使用第三方 App 管理庫存,檢查該 App 是否有獨立的同步排程(可能覆蓋 Shopify 原生數據)
- 使用 GraphQL API 查詢
on_hand、committed、available三個數值,確認公式是否正確:available = on_hand - committed - reserved
Webhook 丟失的處理
Shopify webhook 偶爾會因為你的伺服器回應超時(需在 5 秒內回 2xx)而被標記為失敗。連續 19 次失敗後,Shopify 會自動刪除該 webhook 訂閱。
建議做法:
- Webhook 接收端先回 200,再非同步處理業務邏輯
- 每日用 cron job 檢查 webhook 訂閱是否仍然活躍
- 搭配定時全量同步(例如每 6 小時用 API 拉取一次全部庫存)作為安全網
1# 簡化的 webhook 健康檢查腳本(Python)2import requests34SHOP_URL = "https://your-store.myshopify.com/admin/api/2025-01/webhooks.json"5HEADERS = {"X-Shopify-Access-Token": "YOUR_ACCESS_TOKEN"}67response = requests.get(SHOP_URL, headers=HEADERS)8webhooks = response.json().get("webhooks", [])910inventory_webhooks = [w for w in webhooks if w["topic"] == "inventory_levels/update"]1112if not inventory_webhooks:13 print("WARNING: inventory_levels/update webhook not found. Re-registering...")14 # 在此加入重新註冊 webhook 的邏輯15else:16 print(f"OK: {len(inventory_webhooks)} inventory webhook(s) active.")
上線前的測試清單
正式切換前,請逐項驗證:
- POS 門市交易測試:在每間門市完成一筆測試交易,確認 Admin 後台庫存即時減少
- 線上訂單測試:在線上商店下一筆測試訂單,確認指定 Location 庫存正確扣減
- 退貨回補測試:執行退貨流程,確認庫存回補至正確 Location
- 離線模式測試:關閉門市 Wi-Fi,完成交易,恢復網路後確認同步正確
- 低庫存 Flow 測試:將某 SKU 庫存手動調至閾值以下,確認通知是否觸發
- API 同步測試(如適用):透過 API 調整庫存,確認 POS 端和線上商店皆反映變動
Ready to Transform Your Ecommerce Operations?
Branch8 specializes in ecommerce platform implementation and AI-powered automation solutions. Contact us today to discuss your ecommerce automation strategy.
持續優化:善用數據做庫存決策
上線只是起點。Shopify Plus 的報表功能加上 Stocky 的庫存分析,可以持續優化你的庫存策略:
- ABC 分析:識別高週轉 SKU(A 類),集中資源確保這些產品永不斷貨
- 門市間調撥優化:根據各門市的銷售速率(sell-through rate),動態調整庫存分配
- 安全庫存計算:結合 Stocky 的需求預測功能,為每個 SKU 在每個 Location 設定合理的安全庫存水位
根據 McKinsey 2024 年的 Retail Operations 報告,零售品牌導入即時庫存同步後,平均可減少 20–30% 的過剩庫存,同時將缺貨率壓低 50% 以上。
如果你的品牌正在規劃 Shopify Plus POS 整合,或是需要將現有系統遷移至全渠道架構,Branch8 團隊在香港、新加坡和台灣都有實戰經驗,歡迎透過 branch8.com 與我們洽談技術評估與實施方案。
Sources
FAQ
在網路連線穩定的情況下,Shopify POS Pro 的庫存同步延遲通常在 1–3 秒內完成。門市完成交易後,線上商店和 Admin 後台幾乎即時反映庫存變動。但如果門市處於離線模式,庫存更新會暫存於本地裝置,待網路恢復後才同步,期間其他渠道看到的庫存不會更新。
About the Author
Matt Li
Co-Founder & CEO, Branch8 & Second Talent
Matt Li is Co-Founder and CEO of Branch8, a Y Combinator-backed (S15) Adobe Solution Partner and e-commerce consultancy headquartered in Hong Kong, and Co-Founder of Second Talent, a global tech hiring platform ranked #1 in Global Hiring on G2. With 12 years of experience in e-commerce strategy, platform implementation, and digital operations, he has led delivery of Adobe Commerce Cloud projects for enterprise clients including Chow Sang Sang, HomePlus (HKBN), Maxim's, Hong Kong International Airport, Hotai/Toyota, and Evisu. Prior to founding Branch8, Matt served as Vice President of Mid-Market Enterprises at HSBC. He serves as Vice Chairman of the Hong Kong E-Commerce Business Association (HKEBA). A self-taught software engineer, Matt graduated from the University of Toronto with a Bachelor of Commerce in Finance and Economics.