> ## Documentation Index
> Fetch the complete documentation index at: https://intervyo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# トレーニングフロー ステップバイステップ

> 参加者が練習しスキルを高めるコーチングプログラムを構築します—エージェント、テンプレート、再受験に対応したステージ、そしてチームの登録まで。

トレーニングは参加者をふるい落とすためのものではなく、**参加者の成長を支援する** ためのものです。そのため、セットアップは採用とは少し異なります。よりフレンドリーなエージェント、再受験の許可、そしてフィードバックを最大限に活用します。

<Note>
  **Developer → API Keys** から取得したAPIキー（`iv_live_...`）が必要です。これを
  `x-api-key` ヘッダーに設定し、`<slug>` をご自身のチームスラッグに置き換えてください。
</Note>

## ステップ 1 — コーチングエージェントを作成する

たくさんのフィードバックを提供する、親切で励ましてくれる面接担当者です。

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/interviewers?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Coach",
    "persona": "Sam, a friendly sales enablement coach.",
    "useCase": "training",
    "evaluationDimensions": [
      { "name": "Discovery",          "description": "Finds the buyer pain", "weight": 50 },
      { "name": "Objection Handling", "description": "Reframes pushback",     "weight": 50 }
    ],
    "interaction": { "tone": "friendly", "difficulty": "adaptive", "probingDepth": "medium" },
    "output": { "includeImprovementFeedback": true }
  }'
```

👉 `id` を `AGENT_ID` として保存してください。

## ステップ 2 — プログラムを定義する

`use_case` を `training` に設定し、*準備完了 / 要練習* の成果（outcome）を選択します。

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/roles?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "template_name": "Q3 Sales Enablement",
    "use_case": "training",
    "description": "Discovery and objection-handling practice for AEs.",
    "objective": "Help reps run a confident discovery call.",
    "success_outcome": "ready_needs_training",
    "default_session_mode": "roleplay_simulation",
    "default_duration_minutes": 20
  }'
```

👉 `id` を `TEMPLATE_ID` として保存してください。

## ステップ 3 — 練習用ドリルを追加する（再受験あり）

各ドリルは1つのステージです。`allow_retake` をオンにすると、参加者が再挑戦できるようになります。

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/rounds?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": "TEMPLATE_ID",
    "type": "discovery",
    "stage_name": "Discovery Drill",
    "stage_type": "roleplay_simulation",
    "stage_order": 0,
    "allow_retake": true,
    "pass_threshold": 70,
    "interviewer_id": "AGENT_ID"
  }'
```

「Objection Drill」については `stage_order: 1` を指定して同様に繰り返してください。

## ステップ 4 — チームメンバーを追加する

各担当者（rep）が1人の参加者です。人数が多い場合は一括インポートを使用してください。

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/participants/bulk?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [
      { "name": "Carlos Reyes", "email": "carlos@yourco.com", "external_id": "workday-44120", "role_id": "TEMPLATE_ID" },
      { "name": "Dana Lee",     "email": "dana@yourco.com",   "external_id": "workday-44121", "role_id": "TEMPLATE_ID" }
    ]
  }'
```

## ステップ 5 — 練習を開始する

ドリルのステージを指定して、各担当者ごとにセッションをスケジュールします。

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/sessions?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "candidate_id": "PARTICIPANT_ID",
    "role_id": "TEMPLATE_ID",
    "stage": "discovery"
  }'
```

## ステップ 6 — 進捗を確認する

スコアの推移を確認しましょう。再受験がオンになっているため、担当者は練習を続けることができ、数値が伸びていく様子を見守ることができます。

<Card title="参加者のセッション一覧を取得する" icon="list" href="/api-reference/participants/get-participants-id-sessions">
  `GET /api/v1/participants/{id}/sessions` で、すべての受験回数とスコアを確認できます。
</Card>

<Tip>
  エージェントの `tone` はフレンドリーに保ちましょう。コーチが励ましてくれると参加者はより多く練習し、改善フィードバックこそがトレーニングを定着させる鍵となります。
</Tip>
