> 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/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/calculated-fields-explained.md).

# 計算項目の説明

**制限あり**: 計算済みカスタムフィールドは、特定の製品エディションでのみ利用できます。 [サポートにお問い合わせください](https://app.impact.com/support/portal.ihtml?createTicket=true&) アドボケイトプログラムをアップグレードしてアクセス権を得るには。

を通じて [カスタムフィールド](/brand/ja/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に送信できます。

計算フィールドはユーザーおよびイベントのデータを受け取り、その値が計算・保存され、参加者のプロフィールに表示されるようになります。計算フィールドを設定すると、条件に合うAdvocateプログラムのイベントを送信するたびに、その値は動的に更新されます。

{% hint style="info" %}
**例：** 計算フィールドは、参加者が1か月の期間内に100ドル以上の購入を何回行ったかをカウントするように設定できます。次に、1か月にこの100ドル以上の購入を3回以上行った参加者に特別な報酬を付与するよう、プログラムを設定できます。
{% endhint %}

#### 既定の計算フィールド

既定で、4つの計算フィールドが用意されています。プログラムのルール設定を始めたらすぐに、これらを参照できます。

<details>

<summary>既定の計算フィールド</summary>

| 計算フィールド            | 説明                                  |
| ------------------ | ----------------------------------- |
| lastSeenDate       | ユーザーがAdvocateで最後にアップサートされた日時を追跡します。 |
| firstPurchaseDate  | この参加者に対する購入イベントを最初に受信した日付を追跡します。    |
| lastPurchaseDate   | 参加者の最新の購入イベントの日付を追跡します。             |
| totalPurchaseCount | この参加者の購入イベントの総数を追跡します。              |

</details>

#### クライアントが作成した計算フィールド

提供されている既定のものを超える独自の計算フィールドを作成できます。計算フィールドを設定すると、次のことができます。

* 計算を一定期間のみ実行したい場合は、開始日と終了日を追加します（例：1月1日から2月17日まで）。この設定された期間をアクティブ期間と呼びます。
* 繰り返しの [トラッキングウィンドウ](/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/tracking-windows-for-calculated-fields-explained.md) を合計およびカウントの計算に対して指定します。追跡ウィンドウは、固定ウィンドウ（例：単一の暦月または年）またはスライディングウィンドウ（例：過去90日間）のいずれかです。
* フィルターを追加するかJSONata式を記述することで、計算を実行する条件を追加で設定できます。これらのオプションについては、記事でさらに詳しく説明しています。 [計算フィールドの設定](/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/set-up-a-calculated-field.md).

{% hint style="info" %}
**注意：** 計算フィールドにアクティブ期間または追跡ウィンドウがある場合、計算期間が終了すると値は更新されなくなります。計算フィールドにアクティブ期間（または合計／件数の計算のみを対象とした追跡ウィンドウ）がある場合、計算期間が終了した後は値はそれ以上更新されません。ただし、値は各参加者のプロフィールに引き続き表示されます。
{% endhint %}

<details>

<summary>クライアントが作成した計算フィールド</summary>

計算フィールドを作成する際に使用できる計算には、いくつかの種類があります。

| 計算       | 説明                                                       | 例                                                                    |
| -------- | -------------------------------------------------------- | -------------------------------------------------------------------- |
| 合計       | 合計を計算する `{fieldname}` フィールドの `{eventkey}` イベントから         | サインアップ後最初の30日間に紹介された友人が行った購入の合計を算出します。支出額に応じて、段階的な報酬を顧客アドボケイトに付与します。 |
| 件数       | 数を数える `{eventkey}` イベントから                                | 参加者が10回を超える購入を行ったら報酬を付与します。                                          |
| 初回表示（日時） | 最初の `{eventkey}` イベントのタイムスタンプを計算する                       | 参加者が特定の日付より前に購入を始めていた場合に報酬を付与します。                                    |
| 最終表示（日時） | 最後の `{eventkey}` イベントのタイムスタンプを計算する                       | イベントのタイムスタンプを計算する                                                    |
| 最初の値     | の値を計算する `{fieldname}` 最初の{eventkey}イベントのフィールド            | 初回購入額が大きい参加者に報酬を付与します。                                               |
| 最後の値     | の値を計算する `{fieldname}` 最新の `{eventkey}` イベントのタイムスタンプを計算する | イベントのフィールドの値を計算する、参加者の最後の支払いが特定の金額以上であれば報酬を付与します。                    |

</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 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/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/calculated-fields-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.
