> 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/advocate-program/manage-advocate-participants/custom-and-calculated-fields/edit-a-calculated-field.md).

# 编辑计算字段

计算字段值可用于设置您的程序规则，从而实现广泛的高级程序逻辑。用户创建的 [计算字段](/brand/zh/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/calculated-fields-explained.md) 可随时编辑。

#### 编辑计算字段

1. 在左侧导航菜单中，选择 ![](/files/209022bdb234289211a24a980f6227a8684cc439) **\[Engage] → 数据源 → 字段**.
2. 将光标悬停在要编辑的字段上，然后选择 **编辑**.
   * 您必须选择用户创建的计算字段。默认计算字段无法编辑。
3. 按需要编辑该字段。
   * 您可以更改用于计算该字段的事件，以及任何筛选器或跟踪窗口。
   * 计算字段键和值类型无法更改。
4. 可选地，在 *审核* 部分中，选择 ![](/files/48509e0f0c9ae68203294f8aae7777211a4315e1) **\[未勾选复选框] 保存时重新计算值**.
   * 如果您的字段使用 `求和` 或 `计数` 计算，则我们建议请求 [重新计算](/brand/zh/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields.md)。对于其他计算类型，无法重新计算——在进行更改之前，请参阅 [重新计算注意事项](#edit-a-calculated-field) 。
5. 选择 **保存**.

#### 重新计算注意事项

| 如果                              | 那么                                                                                                  | 示例                                                                                                                                                              |
| ------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 该字段没有跟踪窗口，或者跟踪窗口已被 **移除**.      | <p>• 先前的字段值将被保留，并作为新计算的起点。</p><p>• 新计算将会在后续使用。</p>                                                  | 该字段当前对 `userPurchase` 事件的收入进行求和。当您将其改为对 `purchase` 事件的收入求和时，参与者资料中的现有值将保持不变。下次我们收到其 purchase 事件时，收入金额将被添加到现有值中。                                                 |
| 该字段已有一个跟踪窗口，但该窗口 **未更改**.       |                                                                                                     |                                                                                                                                                                 |
| 正在向 **添加** 到现有计算字段              | <p>• 先前的字段值将仅保留到新事件到来之前。下一个匹配事件到来时，它将被清除。</p><p>• 新配置将会在后续使用。</p><p>• 如果您希望在新配置下考虑历史数据，请请求重新计算。</p> | <p>该字段统计参与者购买的次数。如果您添加一个为期一个月的跟踪窗口，则参与者资料中的现有值会在下一个购买事件到来时被清除。</p><p>一个进行了 5 次购买的参与者，其值在您编辑之前将为 <code>5</code> 。下次该参与者进行购买时，旧值将被清除，字段值将被设置为 <code>1</code>.</p> |
| 该字段已有一个跟踪窗口，正在被 **编辑**.         | <p>• 在编辑计算字段上的现有窗口时，务必重新计算。</p><p>• 未重新计算就进行编辑，可能会对参与者的字段值产生不利影响。</p>                               | 您将跟踪窗口从固定窗口更改为滑动窗口。                                                                                                                                             |
| 该字段已有一个现有的滑动窗口，并且 **最大计算值已更改**. | <p>• 当下一个匹配事件到来时，新配置将应用于参与者的历史数据。</p><p>• 请求重新计算，以便无需等待新事件即可更新字段值。</p>                              | 当前，该窗口化字段对参与者的购买次数进行计数，最大值为 10。当最大值变为 5 且该参与者的新购买事件到来时，窗口内数据将追溯应用 5 的最大值。                                                                                       |

{% hint style="warning" %}
**警告：** 窗口化计算字段的值不能通过 API 手动覆盖。如果您发送会覆盖现有值的数据，将收到错误消息。
{% endhint %}


---

# 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/advocate-program/manage-advocate-participants/custom-and-calculated-fields/edit-a-calculated-field.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.
