> 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/custom-fields-for-advocate-explained.md).

# Advocate 自定义字段说明

你可以使用 *自定义字段* 向 impact.com 发送关于你的推荐计划参与者的额外数据。这些信息可用于你的 [计划规则](/brand/zh/what-would-you-like-to-learn-about/advocate-program/getting-started-with-advocate/advocate-program-rules-explained.md) 以确定何时触发目标和操作。你还可以根据自定义字段值对参与者进行细分。

你发送的自定义字段类型很灵活。例如，你可能希望包含参与者的以下信息：

* 生日
* 语言
* 位置
* 订阅类型
* 会员状态

当你上传用户导入文件，或通过 UTT、API、SDK 或其他集成方式时，可以将自定义字段发送到 impact.com。

#### 字段特性

你发送的任何自定义字段都需要满足字段名称和值的若干要求。

{% tabs %}
{% tab title="名称" %}

* 最多 64 个字符。
* 仅接受字母数字字符、连字符和下划线（字母必须不带重音符号）。
* 区分大小写，例如， `customFieldName` 被视为与 `customfieldname`.
  {% endtab %}

{% tab title="值" %}

* 支持 `字符串`, `数字`, `布尔值`、以及 `null 类型`.
* 字符串值最大为 1024 个字符。
* 日期必须格式化为以毫秒表示的 UNIX 时间戳。
* 每个请求最多可添加/更新 100 个字段。
* 将用户的某个自定义字段设置为 `null` 将移除该用户的该字段。
  {% endtab %}
  {% endtabs %}

#### 向 impact.com 发送自定义字段信息

无论你通过何种方式发送数据，都可以在创建、更新或 upsert 用户时包含自定义字段。

{% tabs %}
{% tab title="文件导入" %}
在批量导入新用户或更新现有用户时，你可以包含自定义字段。请参阅 [批量导入 Advocate 参与者](/brand/zh/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/import-advocate-participants-in-bulk.md) 以获取说明。

以下是两个示例文件，可用于指导你的导入。

* 用户数据导入： [CSV](https://assets.ctfassets.net/s68ib1kj8k5n/7LOYwhDlsI22uuaIMaWImE/71cefe860edc71c0968c8065e1d6e953/sample-user-upload.csv) ![](/files/384fa5309ff1dcdcb5317f339bd76ce23aa62c8a) 或 [JSONL](https://assets.ctfassets.net/s68ib1kj8k5n/5rD1ZiKEjqStp54qjDB90N/48918dfa8b53a935c7c83ea5fbf3af77/userImportSample.jsonl) ![](/files/384fa5309ff1dcdcb5317f339bd76ce23aa62c8a)
* 事件数据导入： [CSV](https://assets.ctfassets.net/s68ib1kj8k5n/20lD8Gua3EtW8qIahBvciz/152fd3cfaa3f0ee4076a6729bc8d4164/userEventSample.csv) ![](/files/384fa5309ff1dcdcb5317f339bd76ce23aa62c8a) 或 [JSONL](https://assets.ctfassets.net/s68ib1kj8k5n/2IPDDkVhCgDBPyQrRANfb9/d38643fba660ca1412b7d85f1b7c0f41/userEventSample.jsonl) ![](/files/384fa5309ff1dcdcb5317f339bd76ce23aa62c8a)
  {% endtab %}

{% tab title="API 和 SDK" %}
使用 impact.com 的 [GraphQL 方法](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-api/graphql-api) 或 [REST API 端点](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-api/advocate-rest-api) 来创建、更新或 upsert 用户时可包含自定义字段。它们也可在使用 [UTT](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-tracking-integrations/advocate-installation-scripts) 或我们的 [移动端选项](https://integrations.impact.com/integration-guides/for-brands/advocate/mobile-options-for-advocate/mobile-options-for-advocate-programs) 从你的应用内创建、更新或 upsert 用户。
{% endtab %}
{% endtabs %}


---

# 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/advocate-program/manage-advocate-participants/custom-and-calculated-fields/custom-fields-for-advocate-explained.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.
