> 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}` イベント                 | 最後の購入が5日以内だった参加者に報酬を付与します。                                       |
| 最初の値      | 〜の値を計算する `{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.
