# 小型种植套装 - 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 块木板* |
| **Component** | Bag of Soil | `BAG-SOIL` | 45 | *必需：每套 1 袋* |

* **问题：** **Small Planter Kit** 已在您的店面上架，但如果不持续查看木板和土壤袋各组成部分的库存，您就无法手动追踪它的库存。
* **目标：** 创建一个 **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`（因为每套需要四块木板）。
* **Component 2（Bag of Soil）：**
  * 再次点击 **Add New Component**。
  * 搜索并选择：**Bag of Soil**（`BAG-SOIL`）。
  * 设置 **Quantity Required:** 输入 `1`（因为每套需要一袋土壤）。

<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** | **限制** |
| 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 块木板 = <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 会立即减少组成部分的库存（木板减少 20 块，土壤袋减少 5 袋），然后重新计算套装的新库存（15），并将其推送到店面，确保您的库存水平始终准确。

**🙋 还需要支持吗?**

如果您仍需要帮助,请随时通过 <hi@tipo.io> 联系我们。我们很乐意为您提供进一步协助。
