> 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,类型,信用规则,匹配模式,优惠
Name10PEROFF,4321,1299679,TRACKING,ALWAYS,LI,
```

{% endhint %}

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

1. 从左侧导航菜单中，选择 ![](/files/209022bdb234289211a24a980f6227a8684cc439) **\[Engage]** → **内容** → **优惠码**.
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`.                                            |

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

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

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

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

* **白名单**
  * 目的：定义必须使用的促销代码列表，以便合作伙伴获得销售归因。
  * 如果您的授权促销代码列表少于未授权列表，建议使用此选项。
* **黑名单**
  * 目的：定义一组促销代码，如果使用这些代码，将不会将销售归因给合作伙伴。
  * 如果您的未授权促销代码列表少于授权列表，建议使用此选项。

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

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

**第 2 步：上传您的文件**

1. 选择 **Choose file**，然后找到并选择您要上传的包含受限促销代码的 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>RESTRICTED</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:

```
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>
```

The question should be specific, self-contained, and written in natural language.
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.
