> 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/set-up-a-calculated-field.md).

# 計算フィールドを設定する

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

計算フィールドを使うと、イベントが発生した時点で追跡し、イベントフィールドを使用して計算を設定し、その結果データを参加者のプロフィールに保存できます。計算フィールドを設定すると、条件に一致する impact.com のイベントを送信するたびに、その値が動的に更新されます。

このガイドでは、末尾の例を含め、計算フィールドを設定する基本的な手順を説明します。計算フィールドの仕組みや可能な計算の種類について詳しくは、 [計算フィールドの説明](/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/calculated-fields-explained.md).

#### 計算フィールドを設定する

1. 左側のナビゲーションメニューから、 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%2Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg?alt=media) **\[Engage] → データソース → フィールド**.
2. 選択 **計算フィールドを作成**.
3. 次の項目を入力します：
   * **名前**
   * **イベント**
   * **計算**
   * **イベントフィールド** （計算に該当する場合）
4. 必要に応じて、 **追跡ウィンドウ** 移動期間に基づく合計または件数の計算を行いたい場合。追跡ウィンドウには、impact.com アカウントのタイムゾーンが適用されます。
   * ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FiZjM1xY8o3v1iR3Zaysd%2FToggle.svg?alt=media\&token=b1550d48-bba9-4e81-8604-bc12370c5caa) **［オンに切り替え］** 計算に含めるイベントのみを指定したい場合。ウィンドウの種類と使用タイミングの詳細については、 [計算フィールドの追跡ウィンドウ](/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)
5. スライディングウィンドウを適用した場合、期間の各単位（例：60日間の各日）でカウントする上限値を設定できます。
6. の中で *フィルター* フィールドに、 **アクティブ期間** 計算の開始日と終了日を設定したい場合。
7. 選択 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6282f271b7521383385339243690b303086736d9%2F3b5a585dd2895bdf1c30d1236c72ba590dddd18717863b27074c8d313d05ae20.svg?alt=media) **追加フィルター** 特定の条件を満たすイベントのみを計算に含めたい場合。
   * フィルターは、イベントの特性（例：特定の購入の売上金額）またはユーザーの特性（例：参加者が100ドル超の購入を行った回数のカウント）に適用できます
8. **確認** 選択内容を確認し、 [値をバックフィルする](/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/edit-a-calculated-field.md) ことを選択します。
   * 次を選択します ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FwXho9QKP3e4iU4ZKUSJ5%2F167ebb8cc30303.svg?alt=media\&token=a046e9f0-63aa-46f6-8a35-f73973fd326c) **\[チェック済みのボックス]** 計算結果をバックフィルしたい場合。
9. 選択 **保存** 変更を保存します。

#### 例

* 紹介プログラムがあり、紹介後まもなく高額の購入を頻繁に行う参加者に報酬を与えたいとします。プログラムでは、紹介開始後の1か月以内に50ドル以上の購入を3回以上行った参加者を対象とすると決めます。計算フィールドを使うと、この基準を満たす参加者を特定し、これらの参加者に報酬を付与するプログラムルールの基盤として活用できます。

<details>

<summary>設定手順</summary>

計算の設定は次のとおりです：

1. の下の **計算**、次を完了します： **名前** フィールドに含めてください。
2. イベントおよび計算フィールドに次の値を入力します：
   * **イベント**: 購入
   * **計算**: 件数
     * これにより、条件に一致する購入イベントを impact.com が受信した回数をカウントする計算が設定されます。
3. 固定 **追跡ウィンドウ**を適用します。これにより、計算は毎月リセットされます。
   * 選択 **固定ウィンドウ**.
   * を選択します **1暦月** のウィンドウ期間。
4. 追加 **フィルター** 50ドル以上の購入イベントのみをカウントすることを指定するには：

   * 選択 **ルールを追加**.
   * 最初の条件では ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-c2cb550b55c51ea1eeff0acbd6f437a03b621a2c%2F60d033ae8a04c14498d5229c3c0160ac05feea7f605dbd770741793c900469f0.svg?alt=media) **\[ドロップダウンメニュー]**、 `events.fields.revenue` フィールドに含めてください。
   * 演算子の種類を次に変更します **以上**.
   * Enter `50` を文字列変数の値として指定します。

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>注:</strong> JSONata 式は整数のみを受け付けます。通貨を使用する場合は、impact.com ではデータベース設定で使用している最小単位を使うことを推奨します。よく分からない場合は、 <a href="http://saasquatch-support@impact.com">サポートチームにお問い合わせください</a> までお問い合わせください。</p></div>
5. 確認して **保存**.

</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/set-up-a-calculated-field.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.
