> 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 文件中创建多个跟踪促销码。上传文件后，impact.com 会验证每一行，这样您就可以在创建促销码之前查看并修正任何错误。

CSV 文件最大可为 5 MB，XLS 和 XLSX 文件最大可为 1 MB。验证仅基于文件大小，因此对行数没有限制。

## 上传您的促销码

1. 从左侧导航菜单中，选择 ![](https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%2Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg?alt=media) **\[Engage]** → **内容** → [**促销码**](https://app.impact.com/secure/advertiser/engage/ads/view-adv-promo-codes-flow.ihtml).
2. 在 *促销码* 屏幕上，选择 **批量上传**.
3. 可选地，选择 **下载** 以获取示例模板文件，或选择 **查看格式详情** 以查看所需列。
4. 选择 **选择文件**，然后找到并选择您的文件。您也可以将文件拖放到页面上。
5. 选择 **继续**.
6. 查看 *数据预览* 表。 *验证* 列显示 *已批准* 表示已准备就绪的行，或显示需要更改的行的错误消息。
   * 可选地，要对行排序，请选择列标题或选择 **排序顺序**.
   * 要查看某行的所有错误，请选择 ![](https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FzdZvuTyltsDGVW39C6ZZ%2F%5BPlus%5D.svg?alt=media\&token=a2ba6db3-74b5-4ae1-b849-87501cf3a8ec) **\[展开]** 促销码旁边的。 *错误预览* 列出每一列、其值以及问题。
   * 要修复错误，请更新您的文件，选择 **取消** 文件名旁边的，然后上传更正后的文件。
7. 选择 **接受并创建促销码**。按钮旁边的消息显示 impact.com 创建的已批准促销码数量。如果没有批准的行，则该按钮会被禁用。

impact.com 会创建已批准的促销码并将您返回到 *促销码* 屏幕。仅创建已批准的行。如果 impact.com 在创建您的促销码时发生错误，将显示带有错误代码的错误消息。请联系支持并提供此代码。

要取消批量上传，请选择 ![](https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FYaEYpaDDip5FxDbF8lnO%2Fclose.svg?alt=media\&token=da6580c0-a38f-4bf9-a34a-619921f19e9e) **\[关闭]** 屏幕右上角的，然后选择 **确认**.

{% hint style="success" %}
**注意：** 开始日期在未来的促销码具有 *待生效* 状态。 *促销码* 屏幕默认显示 *生效中的促销码* 因此请更改 [*促销码计划* 筛选器](/brand/zh/what-would-you-like-to-learn-about/platform-features/promo-codes/manage-your-promo-codes.md) 以找到它们。
{% endhint %}

## 设置您的促销码文件格式

您的文件必须严格使用下面所示的列名，包括大小写和句点，否则上传将被拒绝。

| 列                      | 类型      | 必填 | 说明                                                                                                                                   |
| ---------------------- | ------- | -- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `操作`                   | 字符串     | 是  | 批量上传操作。允许的值： `CREATE`.                                                                                                               |
| `media.id`             | 整数      | 是  | <p>分配给促销码的 impact.com 媒体 ID。可以是合作伙伴账户 ID 或媒体来源 ID。</p><p>每个跟踪促销码只能分配给 1 个合作伙伴或媒体来源。如果其他合作伙伴推广该代码，impact.com 会将由此产生的转化标记为无效并将其撤销。</p> |
| `code`                 | 字符串     | 是  | 唯一的促销码。不能包含尖括号（`<`, `>`）或双引号。                                                                                                        |
| `creditRule`           | 字符串     | 是  | <p>促销码积分规则。允许的值：</p><p><code>ALWAYS</code> （始终计入）</p><p><code>INVOLVED</code> （参与时计入）</p><p><code>WINNER</code> （若获胜则计入）</p>         |
| `matchMode`            | 字符串     | 是  | <p>促销码匹配模式。允许的值：</p><p><code>LI</code> （精确/字面）</p><p><code>RE</code> （正则/正则表达式）</p>                                                  |
| `deal.id`              | 整数      | 否  | 的 ID [deal](/brand/zh/what-would-you-like-to-learn-about/platform-features/deals.md) 以与促销码关联。该 deal 必须已存在于您的项目中。                     |
| `scheduling.startDate` | 日期      | 是  | 促销码何时可用。请输入不带时区偏移的本地日期和时间，格式为 `YYYY-MM-DDTHH:mm:ss` （例如， `2026-10-01T00:00:00`).                                                     |
| `scheduling.endDate`   | 日期      | 是  | 促销码何时过期。格式与 `scheduling.startDate` （例如， `2026-12-31T23:59:59`).                                                                      |
| `scheduling.timezone`  | 字符串     | 是  | 计划日期所使用的 IANA（互联网编号分配机构）时区（例如， `America/New_York`).                                                                                  |
| `emailAddresses`       | CSV 字符串 | 否  | 要通知有关此促销码的电子邮件地址列表，以逗号分隔。                                                                                                            |
| `comments`             | 字符串     | 否  | 此行的自由格式备注。                                                                                                                           |

示例：此行创建促销码 `10PEROFF` 供 1 个合作伙伴使用，可在 2026 年 10 月 1 日至 12 月 31 日期间，按纽约时间生效。

```csv
Operation,media.id,code,creditRule,matchMode,deal.id,scheduling.startDate,scheduling.endDate,scheduling.timezone,emailAddresses,comments
CREATE,1299679,10PEROFF,ALWAYS,LI,,2026-10-01T00:00:00,2026-12-31T23:59:59,America/New_York,carrie.oakey@acmecorporation.io,节日促销
```

<details>

<summary>验证错误参考</summary>

| 验证消息                       | 修复方法                             |
| -------------------------- | -------------------------------- |
| *无法识别的值*                   | 该值不是允许的值之一，或者日期格式不正确。请检查上表。      |
| *值不能包含尖括号（<、>）或双引号。*       | 请从促销码中移除这些字符。                    |
| *该程序中已存在该促销码。*             | 请使用尚未在您的程序中的促销码。                 |
| *媒体合作伙伴 \[ID] 未加入活动 \[ID]* | 请使用已加入您的程序的合作伙伴或媒体来源的媒体 ID。      |
| *未找到 deal*                 | 请使用现有 deal 的 ID，或者留空 `deal.id` 。 |
| *促销码计划流程仅支持 CREATE。*       | 设为 `操作` 到 `CREATE`.              |

</details>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
