> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/platform-features/promo-codes/bulk-upload-promo-codes.md).

# 批量上传促销码

如果你想创建多个促销码，请使用 **批量上传** 功能上传包含你的促销码数据的 CSV、XLS 或 XLSX 文件。

请参阅 *促销码批量上传参考* 下方表格可帮助你构建此文件。为确保上传成功，请将 XLS/XLSX 文件大小控制在 1MB 以内，CSV 文件大小控制在 5MB 以内。验证严格基于文件大小，因此行数没有具体限制。

{% hint style="warning" %}
**警告：** 请确保 CSV/XLS 文件中的列标题与下方列名完全一致（区分大小写和空格），否则你的文件上传可能会被拒绝。
{% endhint %}

{% hint style="info" %}
**示例：** 下面的示例是一个示例促销码 `10PEROFF`.

```programlisting
促销码,活动 ID,媒体 ID,类型,信用规则,匹配模式,交易
名称10PEROFF,4321,1299679,跟踪,始终,LI,
```

{% endhint %}

#### 批量上传跟踪促销码

1. 从左侧导航菜单中，选择 ![](/files/209022bdb234289211a24a980f6227a8684cc439) **\[互动]** → **内容** → **促销代码**.
2. 在 *促销代码* 页面中，选择 **批量上传**.
3. 选择 **选择文件** 然后找到并选择包含你要上传的促销码的 Excel / CSV 文件。

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>注意：</strong> 请确保你的文件使用下方表格中所示的必需列格式。</p></div>

   | 列      | 类型  | 必填 | 说明                                                                                                         |
   | ------ | --- | -- | ---------------------------------------------------------------------------------------------------------- |
   | 促销代码   | 字符串 | 是  | 要分配的唯一促销码。                                                                                                 |
   | 项目 ID  | 整数  | 是  | 促销码所属的唯一 impact.com 项目 ID。                                                                                 |
   | 媒体 ID  | 整数  | 是  | 将把促销码分配到的 impact.com 媒体 ID。这可以是合作伙伴 ID 或媒体来源 ID。                                                           |
   | 类型     | 字符串 | 是  | <p>促销码类型。允许的值：</p><p><code>TRACKING</code></p>                                                             |
   | 归因规则   | 字符串 | 是  | <p>促销码信用规则。允许的值：</p><p><code>ALWAYS</code></p><p><code>INVOLVED</code></p><p><code>WINNER</code></p>       |
   | 匹配模式   | 字符串 | 是  | <p>促销码匹配模式。允许的值：</p><p><code>LI</code> （精确/字面）</p><p><code>RE</code> （正则表达式）</p>                           |
   | 交易 ID  | 整数  | 否  | 此促销码应关联的交易唯一 ID。该交易必须已存在于你的项目中。                                                                            |
   | 生效开始日期 | 日期  | 否  | 使你能够安排此限制的生效时间。这是一个 [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) 日期。示例格式： `2013-06-30T00:00:00-07:00` |
   | 生效结束日期 | 日期  | 否  | 这是一个 ISO8601 日期。示例格式： `2013-06-30T00:00:00-07:00`                                                          |
   | 时区     | 字符串 | 否  | 时区会根据开始日期推导，但如果你想使用特定时区覆盖它，请在此输入完整名称，例如 `America/New_York`.                                                |

   通过该字段，每个已上传的跟踪促销码只能分配给 1 个合作伙伴或媒体来源。 `媒体 ID` 如果其他合作伙伴推广了该代码，impact.com 会将由此产生的转化标记为无效转化并进行回滚。
4. 选择 **下一步**.
5. 查看将要上传的促销码列表。如果详细信息正确，请选择 **接受并创建促销码**.
6. 如果上传成功，新的 *跟踪促销码* 将被创建并列在 *促销代码* 界面。

#### 批量上传受限促销码字段

{% hint style="info" %}
**注意：** 作为持续平台改进的一部分，我们将停用 *受限促销代码* 功能，并于二月底结束支持。请检查您当前的配置并相应规划。
{% endhint %}

开始之前，请先了解两种限制类型之间的区别：

* **白名单**
  * 用途：定义一组必须使用的促销码，合作伙伴只有使用这些促销码才能获得销售归因。
  * 如果你的授权促销码列表比未授权列表更小，建议使用此方式。
* **黑名单**
  * 用途：定义一组促销码，如果使用这些促销码，则不会将销售归因给合作伙伴。
  * 如果你的未授权促销码列表比授权列表更小，建议使用此方式。

**步骤 1：选择限制类型**

1. 从左侧导航菜单中，选择 ![](/files/209022bdb234289211a24a980f6227a8684cc439) **\[互动]** → **内容** → **促销代码**.
2. 在 *促销代码* 页面中，选择 **创建促销码** ![](/files/9ee7bd3c79aae4d0667377d18611647c3469f8d1) **\[下拉菜单]** → **受限**.
3. 在 *促销码限制* 页面，选择 ![](/files/a4d92afe6e302635e52a9d3b155bca7a8dedb2ea) **设置促销码限制**.
4. 将显示“促销码限制”页面，其中包含两列用于设置：
   * 也可选择 ![](/files/a4d92afe6e302635e52a9d3b155bca7a8dedb2ea) **设置白名单**，用于上传列入白名单的促销码。
   * 也可选择 ![](/files/a4d92afe6e302635e52a9d3b155bca7a8dedb2ea) **设置黑名单**，用于上传列入黑名单的促销码。

**步骤 2：上传你的文件**

1. 选择 **选择文件**，然后找到并选择包含你要上传的受限促销码的 Excel / CSV 文件。

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>注意：</strong> 请确保你的文件使用下方表格中所示的必需列格式。</p></div>

   | 列      | 类型  | 必填 | 说明                                                                               |
   | ------ | --- | -- | -------------------------------------------------------------------------------- |
   | 促销代码   | 字符串 | 是  | 要分配的唯一促销码。                                                                       |
   | 项目 ID  | 整数  | 是  | 促销码所属的唯一 impact.com 项目 ID。                                                       |
   | 类型     | 字符串 | 是  | <p>促销码类型。允许的值：</p><p><code>受限</code></p>                                         |
   | 匹配模式   | 字符串 | 是  | <p>促销码匹配代码。允许的值：</p><p><code>LI</code> （精确/字面）</p><p><code>RE</code> （正则表达式）</p> |
   | 生效开始日期 | 日期  | 否  | 使你能够安排此限制的生效时间。这是一个 ISO8601 日期。示例格式： `2013-06-30T00:00:00-07:00`.                |
   | 生效结束日期 | 日期  | 否  | 这是一个 ISO8601 日期。示例格式： `2013-06-30T00:00:00-07:00`                                |
   | 时区     | 字符串 | 否  | 时区会根据开始日期推导，但如果你想使用特定时区覆盖它，请在此输入完整名称，例如 `America/New_York`.                      |
2. 选择 **下一步**.
3. 查看显示在 *促销码批量上传* 页面。
   * 如需仅查看包含错误的条目，可选择 **仅显示错误**.
4. 如果详细信息正确，请选择 **接受并创建促销码**.

**步骤 3：添加媒体合作伙伴例外**

1. 在 *媒体合作伙伴控制* 页面，选择限制规则的应用方式：
   1. 也可选择 **应用于所有合作伙伴**，如果你希望此规则适用于所有人。
   2. 也可选择 **允许某些合作伙伴绕过此规则，并获得受限促销码的归因**.

      如果你选择允许绕过，请选择 **查找** 然后选择并 **添加** 列表中的特定合作伙伴。
2. 选择 **保存并激活**.
3. 新的受限促销码规则已激活，上传的代码将应用于所选的 *白名单* 或 *黑名单*.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/platform-features/promo-codes/bulk-upload-promo-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
