> 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) 合計およびカウントの計算用の追跡ウィンドウを設定します。追跡ウィンドウは、固定ウィンドウ（例: 1か月や1年などの単一の暦期間）またはスライディングウィンドウ（例: 直近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} の合計を計算する `{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 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/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/calculated-fields-explained.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.
