# Small Planter Kit - Bundle Group

本指南提供詳細範例，說明如何使用 Bundle Group，依據各個組成商品的庫存來計算組合商品的庫存。

### 情境

此情境包含一項主要的組合商品（「Small Planter Kit」），其庫存必須依據兩項組成商品（「Wooden Panel」和「Bag of Soil」）的可用庫存來計算。

<figure><img src="/media/7296f19d585da486b19b.webp" alt="" loading="lazy" decoding="async"><figcaption></figcaption></figure>

| 類型 | 商品名稱 | SKU | 目前庫存 | 在組合中的角色 |
| ------------- | --------------------- | ----------- | -------------- | ------------------------------------------------- |
| **Bundle** | **Small Planter Kit** | `KIT-PLN01` | 0（計算得出） | *主商品（庫存需要被決定）* |
| **Component** | Wooden Panel | `PNL-WOOD` | 80 | *必要：每組需 4 片 Panel* |
| **Component** | Bag of Soil | `BAG-SOIL` | 45 | *必要：每組需 1 袋* |

* **問題：** **Small Planter Kit** 已上架到您的店面，但如果不持續檢查個別 Panel 和 Soil Bag 組成商品的庫存，您就無法手動追蹤它的庫存。
* **目標：** 建立一個 **Bundle Group**，使用 `PNL-WOOD` 和 `BAG-SOIL` 的庫存，準確計算 `KIT-PLN01` 組合商品的最大可用庫存。

### 解決方案：建立 Bundle Group

我們將在 Tipo Sync 中建立新的 Bundle Group，以定義 `KIT-PLN01` 商品的組成配方。

**步驟**

1. 開啟應用程式 > 點選 Bundle Groups > 點選 **New** **Bundle Group** 按鈕
2. 輸入 **Title**，並將 **Status** 選為 **Active**
3. 在 **Master Variant** 欄位中，搜尋並選擇主商品：**Small Planter Kit**（`KIT-PLN01`）

<figure><img src="/media/c19c08bef254481dd1c9.webp" alt="" loading="lazy" decoding="async"><figcaption></figcaption></figure>

4. 在 Add Component Variants 區塊中，加入 **Component** 商品（組成配方）

* **Component 1 (Wooden Panel):**
  * 搜尋並選擇：**Wooden Panel**（`PNL-WOOD`）。
  * 設定 **Quantity Required:** 輸入 `4`（因為每組需要四片 Panel）。
* **Component 2 (Bag of Soil):**
  * 再次點選 **Add New Component**。
  * 搜尋並選擇：**Bag of Soil**（`BAG-SOIL`）。
  * 設定 **Quantity Required:** 輸入 `1`（因為每組需要一袋 Soil）。

<figure><img src="/media/02a1208941c0807deb0a.webp" alt="" loading="lazy" decoding="async"><figcaption></figcaption></figure>

5. 儲存 Bundle Group。

Tipo Sync 現在會計算 `KIT-PLN01` 的可用庫存，並將該數字推送到您的店面。

### 結果：庫存計算與即時更新

Tipo Sync 採用限制因素計算方式：它會檢查以現有的組成商品可以組出多少組完整的組合。

**1 - 初始計算**

| 組成商品 | 目前庫存 | 每組所需數量 | 可組成組數（庫存 / 所需數量） | 限制因素 |
| ------------------------- | ------------- | ------------------------- | ------------------------------------- | --------------- |
| Wooden Panel (`PNL-WOOD`) | **80** | 4 | 80 / 4 = **20** | **Limit** |
| Bag of Soil (`BAG-SOIL`) | **45** | 1 | 45 / 1 = **45** | |
| **組合結果** | | | **計算出的可組成組數** | **20** |

**2 - 即時庫存更新範例**

如果顧客購買 **5** 組 Small Planter Kit：

<table data-header-hidden><thead><tr><th></th><th width="110.0242919921875"></th><th width="141.3134765625"></th><th></th><th></th></tr></thead><tbody><tr><td>商品</td><td>銷售前</td><td>銷售數量</td><td>庫存扣除</td><td>同步後</td></tr><tr><td><strong>Small Planter Kit</strong> (<code>KIT-PLN01</code>)</td><td>20</td><td>售出 5 組</td><td>不適用（計算得出）</td><td><strong>15</strong>（新計算出的庫存）</td></tr><tr><td>Wooden Panel (<code>PNL-WOOD</code>)</td><td>80</td><td>不適用</td><td>5 組 * 4 片 Panel = <strong>20</strong></td><td><strong>60</strong></td></tr><tr><td>Bag of Soil (<code>BAG-SOIL</code>)</td><td>45</td><td>不適用</td><td>5 組 * 1 袋 = <strong>5</strong></td><td><strong>40</strong></td></tr></tbody></table>

Tipo Sync 會立即減少組成商品的庫存（Panel 減少 20、Soil Bag 減少 5），接著重新計算新的組合庫存（15）並推送到店面，確保您的庫存數量始終準確。

**🙋 還需要協助嗎？**

如果您仍需要協助，歡迎隨時寄信至 <hi@tipo.io> 與我們聯繫，我們很樂意為您提供進一步的協助。
