> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/to/self-service-forms.md).

# セルフサービス フォーム

RealmJoin Self Service Forms は、Support によって有効化されると、インシデント報告や変更要求などの構造化データをユーザーから収集します。

## 概要

Self Service Forms を使って、ユーザーから構造化データを収集できます。これは、ユーザーにインシデントを報告してもらったり、オフィスでの新しい作業環境の設定が必要になったなどの変更を伝えてもらったりするために使えます。

「Self Service Forms」はオプション機能で、RealmJoin Support によりお使いのテナントで有効化できます。有効化されていない場合でも、設定ページでフォームを入力/準備することはできますが、ユーザーは self service forms を表示/使用できません。

例として、「新しいペットを登録する」ワークフローを使用します。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2Fk4raaucFdNBWERFd1K7V%2Fimage.png?alt=media&amp;token=1e3f9fb5-66eb-405e-962f-ba1adab495b6" alt=""><figcaption><p>フォームの例</p></figcaption></figure>

## フォームの使用

次の ![](https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FEoSZwvVn9NMFPA1LgGVn%2Fimage.png?alt=media\&token=0ef42605-f332-45bc-8a1d-503b842f8c12) ナビゲーション項目を使って、ユーザーは入力して送信するフォームを選択できます。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FPUnJnLhYCdcgI9aTfJew%2Fimage.png?alt=media&amp;token=6455eb83-923f-4a39-b871-43d73f2d43c5" alt=""><figcaption><p>フォーム選択</p></figcaption></figure>

ユーザーがフォームに入力して送信すると、その内容はフォーム定義で指定された宛先にメールで送信されます。メールは RealmJoin のインフラを通じて送信され、会社のメールアドレスから送信されることはありません。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FOk30wlZKDMEe3MWvzxS1%2Fimage.png?alt=media&amp;token=c40cb2ea-113c-4b4f-9da0-ff085a808b65" alt=""><figcaption><p>フォームからのサンプルメール</p></figcaption></figure>

{% hint style="info" %}
Self Service Forms がテナントで有効になっている場合、すべてのユーザーがフォームを使用/送信できます。
{% endhint %}

## 送信内容の確認

次の ![](https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FzLUitkjFFMieHZaQppjS%2Fimage.png?alt=media\&token=bb07172e-904c-459d-a9a8-e73c48f18ae6) ナビゲーションアイコンから、ユーザーの過去のフォーム送信内容を確認できます。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FhW7xAk19PilNZOMOGodf%2Fimage.png?alt=media&amp;token=adc9d2ba-359a-4fa1-b272-996d354c6b4f" alt=""><figcaption><p>送信一覧</p></figcaption></figure>

送信内容は送信ユーザー名とフォーム名で検索できますが、フォーム送信内のフィールドでは検索できません。

"View" をクリックすると、入力済みフォームのデータを表示できます。表示は読み取り専用です。

## 設定ページ

Self Service Forms の設定ページでは、既存のフォームの管理、追加、編集、削除ができます。

### 設定ページのフォーム一覧

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FYfij5VCCe1WNBYeIe1Jl%2Fimage.png?alt=media&amp;token=e6f11b7c-8a3e-42ba-aeaf-57f6b5fa8b08" alt=""><figcaption><p>フォーム一覧</p></figcaption></figure>

"New Form" または "Edit" を使って、次を用いてフォームを記述します [JSON Schema](https://json-schema.org/)。これにより、どのフィールドを入力する必要があるか、またどの値が有効かが定義されます。UI には、構文チェック付きエディターと、生成されるフォームのプレビューがあります。

このスキーマは、ユーザー向けのフォームを動的に作成するために使用されます。基本的には、スキーマを目的のデータを記述するだけでなく、フォームの UI を暗黙的に作成するためにも使用します。

### スキーマエディター

エディターの上には 2 つのフィールドがあります。左側のフィールドにはフォームのわかりやすい名前を入力します。右側のフィールドには、ユーザーが送信したデータの受信者のメールアドレスを入力します。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FlDKKa8gI37FWDapkH2xh%2Fimage.png?alt=media&amp;token=d13dbe12-150a-4503-ba1c-50d637962498" alt=""><figcaption><p>スキーマエディターのサンプル</p></figcaption></figure>

"Update JSON Form Preview" を使うと、エディターの下に生成されるフォームのプレビューを作成できます。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FPqMhyTDusXhcaIcafvFu%2Fimage.png?alt=media&amp;token=f04e8882-1d3c-4bd4-a032-2af26f763e59" alt=""><figcaption><p>エディタープレビュー</p></figcaption></figure>

スキーマを変更した後、"Submit" を押して変更を保存します。構文チェックに失敗するとエラーが表示されます。

## JSON Schema

JSON Schema の使用方法は、このドキュメントの範囲外です。オンラインのスキーマジェネレーター（たとえば [これ](https://www.jsonschema.net/app)）を使うと、この作業を簡単にできます。

少なくとも出発点として、例のスキーマを見てみましょう

```json
{
  "title": "人物",
  "type": "object",
  "required": [
    "name",
    "date",
    "location",
    "pets"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "名と姓",
      "minLength": 4,
      "default": "- ここに名前を入力 -"
    },
    "date": {
      "type": "string",
      "format": "date",
      "options": {
        "flatpickr": {}
      }
    },
    "location": {
      "type": "object",
      "title": "場所",
      "properties": {
        "city": {
          "type": "string",
          "default": "サンフランシスコ"
        },
        "state": {
          "type": "string",
          "default": "CA"
        },
        "citystate": {
          "type": "string",
          "description": "これは前の 2 つのフィールドから自動生成されます",
          "template": "{{city}}, {{state}}",
          "watch": {
            "city": "location.city",
            "state": "location.state"
          }
        }
      }
    },
    "pets": {
      "type": "array",
      "format": "table",
      "title": "ペット",
      "uniqueItems": true,
      "items": {
        "type": "object",
        "title": "ペット",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "cat",
              "dog",
              "bird",
              "reptile",
              "other"
            ],
            "default": "dog"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "default": [
        {
          "type": "dog",
          "name": "Walter"
        }
      ]
    }
  }
}
```

すべての JSON Schema はオブジェクトで構成されます。各オブジェクトには少なくとも type と name が必要です。

### 型

#### オブジェクト

他の子オブジェクトを含む「Complex」オブジェクトでは、次のものを使用します **オブジェクト** 型です。例では、スキーマのルートノード「Person」はこの型です。

必須フィールドは次のものを使って定義できます **required** キーワードです。これらのフィールドもスキーマ内で定義する必要があります。

使用してください **properties** は、必要な各フィールドの特性を記述するために使います。これには、型と名前を指定することも含まれます。

#### 配列

配列を使用すると、複数の類似した **項目** をリストに追加できます。次の **項目** キーワードを使って、項目の型などを記述します。

#### 文字列

単なるプレーンテキストです。これは次のものを使って事前入力できます **既定** キーワード。

特定の値のみを許可するには、次のものを使います **enum** キーワード。


---

# 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://docs.realmjoin.com/ja/to/self-service-forms.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.
