---
title: "Intercom コネクタ"
description: "Tajo を介して Intercom の連絡先、会話、企業、エンゲージメントイベントを Brevo と同期するための完全な Intercom 統合ガイド。"
url: https://tajo.io/jp/docs/connectors/support/intercom/
markdown: https://tajo.io/jp/docs/connectors/support/intercom.md
lang: ja-JP
robots: noindex
---

先行利用を申し込む

お名前と会社のメールアドレスを入力してください。Tajoへのアクセス申請を確認するためのリンクをメールでお送りします。

# Intercom コネクタ

コネクターのステータス: 予定 まだ構築されていません。Tajo は現在このコネクターを実行していません。

| 送信元フィールド | 送信先フィールド | サンプル値 |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

Intercom ワークスペースを Tajo 経由で Brevo に接続し、統合された顧客メッセージング、会話トラッキング、サポートおよび製品データを活用したエンゲージメント駆動のマーケティング自動化を実現します。

## 概要

| プロパティ | 値 |
| --- | --- |
| **プラットフォーム** | Intercom |
| **カテゴリ** | サポート |
| **セットアップの複雑さ** | 中 |
| **公式統合** | いいえ |
| **同期データ** | 連絡先、会話、企業、イベント |
| **API ベース URL** | `https://api.intercom.io` |

## 機能

- **連絡先同期** - Intercom ユーザーおよびリードと Brevo 連絡先の双方向同期
- **会話トラッキング** - サポート駆動のセグメンテーションのため会話データを同期
- **企業マッピング** - アカウントベースのワークフロー用に連絡先を企業に関連付け
- **カスタム属性** - Intercom のカスタム属性を Brevo 連絡先フィールドにマッピング
- **イベントトラッキング** - 行動ターゲティングのためカスタムイベントとユーザーアクティビティを同期
- **タグ同期** - Intercom タグを Brevo リストメンバーシップまたは属性にマッピング
- **Messenger データ** - アプリ内メッセージングエンゲージメントとチャットインタラクションをトラッキング
- **AI エージェント統合** - AI エージェント会話の結果を Brevo と同期

## 前提条件

開始する前に、以下を準備してください。

1. Intercom ワークスペース(Starter、Pro、または Premium プラン)
2. アクセストークン付きの Intercom アプリ(プライベートアプリ)または OAuth 設定済み(パブリックアプリ)
3. API アクセス可能な Brevo アカウント
4. Tajo アカウント

## 認証

### アクセストークン(プライベートアプリ)

自分のワークスペースデータにアクセスするプライベート統合用。

1. Developer Hub > Your Apps > Create new app に移動
2. Intercom ワークスペースに関連付け
3. アクセストークンをコピー

```bash
curl https://api.intercom.io/contacts \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -H "Intercom-Version: 2.11"
```

### OAuth 2.0(パブリックアプリ)

他の顧客の Intercom データにアクセスする統合用。

```bash
# 認可 URL
https://app.intercom.com/oauth?client_id={client_id}&state={state}

# トークン交換
curl -X POST https://api.intercom.io/auth/eagle/token \
  -d "client_id={client_id}" \
  -d "client_secret={client_secret}" \
  -d "code={auth_code}"
```

API バージョニング

リクエストには常に `Intercom-Version` ヘッダーを含めてください。Tajo はデフォルトで API バージョン 2.11 を使用します。破壊的変更については Intercom のチェンジログを確認してください。

## 設定

### 基本セットアップ

```yaml
connectors:
  intercom:
    enabled: true
    access_token: "${INTERCOM_ACCESS_TOKEN}"
    api_version: "2.11"

    # データ同期オプション
    sync:
      contacts: true
      conversations: true
      companies: true
      events: true
      tags: true

    # 同期方向
    direction: intercom_to_brevo

    # Brevo リストの割り当て
    lists:
      all_users: 35
      active_conversations: 36
      leads: 37
```

### フィールドマッピング

Intercom の連絡先データを Brevo 連絡先属性にマッピングします。

#### デフォルトマッピング

| Parameter | Type | Description |
| --- | --- | --- |
| `email` required | string | 連絡先のメールアドレス(一意識別子) |
| `name` optional | string | フルネーム、FIRSTNAME/LASTNAME に分割 |
| `phone` optional | string | WhatsApp/SMS 用の SMS 属性にマッピング |
| `role` optional | string | 連絡先タイプ: user または lead |
| `company.name` optional | string | 関連する企業名 |
| `signed_up_at` optional | timestamp | ユーザーサインアップ日 |
| `last_seen_at` optional | timestamp | 最終アクティブタイムスタンプ |
| `custom_attributes` optional | object | カスタム属性のキーと値のペア |

#### カスタム属性マッピング

```yaml
field_mapping:
  # 標準フィールド
  email: email
  name: FULLNAME
  phone: SMS

  # エンゲージメントフィールド
  signed_up_at: SIGNUP_DATE
  last_seen_at: LAST_ACTIVE
  session_count: SESSION_COUNT
  unsubscribed_from_emails: UNSUBSCRIBED

  # 企業フィールド
  company.name: COMPANY_NAME
  company.plan: COMPANY_PLAN
  company.size: COMPANY_SIZE

  # カスタム属性
  custom_attributes.plan_tier: PLAN_TIER
  custom_attributes.feature_usage: FEATURE_USAGE
```

## API エンドポイント

### Contacts API

| メソッド | エンドポイント | 説明 |
| --- | --- | --- |
| `GET` | `/contacts` | すべての連絡先を一覧取得 |
| `POST` | `/contacts` | 連絡先を作成 |
| `PUT` | `/contacts/{id}` | 連絡先を更新 |
| `GET` | `/contacts/{id}` | 連絡先を取得 |
| `POST` | `/contacts/search` | 連絡先を検索 |
| `DELETE` | `/contacts/{id}` | 連絡先をアーカイブ |

### Conversations API

| メソッド | エンドポイント | 説明 |
| --- | --- | --- |
| `GET` | `/conversations` | 会話を一覧取得 |
| `GET` | `/conversations/{id}` | 会話を取得 |
| `POST` | `/conversations` | 会話を作成 |
| `POST` | `/conversations/{id}/reply` | 会話に返信 |
| `POST` | `/conversations/{id}/parts` | 会話パートを追加 |

### Companies API

| メソッド | エンドポイント | 説明 |
| --- | --- | --- |
| `GET` | `/companies` | 企業を一覧取得 |
| `POST` | `/companies` | 企業を作成または更新 |
| `GET` | `/companies/{id}` | 企業を取得 |
| `GET` | `/companies/{id}/contacts` | 企業の連絡先を一覧取得 |

### Events API

| メソッド | エンドポイント | 説明 |
| --- | --- | --- |
| `POST` | `/events` | イベントを送信 |
| `GET` | `/events?type=user&intercom_user_id={id}` | ユーザーイベントを一覧取得 |

## イベント

### 会話イベント

| イベント | トリガー | ユースケース |
| --- | --- | --- |
| `conversation.created` | 新しい会話が開始 | サポートチケットアラート |
| `conversation.closed` | 会話が解決 | CSAT 調査トリガー |
| `conversation.rating.added` | 評価が送信 | 満足度トラッキング |
| `conversation.snoozed` | 会話がスヌーズ | フォローアップスケジューリング |

### 連絡先イベント

| イベント | トリガー | ユースケース |
| --- | --- | --- |
| `contact.created` | 新しい連絡先が追加 | ウェルカムシーケンス |
| `contact.updated` | 連絡先データが変更 | 属性同期 |
| `contact.deleted` | 連絡先がアーカイブ | クリーンアップ |
| `contact.tag.created` | 連絡先にタグが追加 | セグメント更新 |

### ユーザーイベント

| イベント | トリガー | ユースケース |
| --- | --- | --- |
| `user.created` | 新しいユーザーがサインアップ | オンボーディングフロー |
| `user.email.updated` | メールが変更 | 連絡先のマージ |
| `user.unsubscribed` | メール購読解除 | 設定更新 |

## コード例

### コネクタの初期化

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

// Intercom を接続
await tajo.connectors.connect('intercom', {
  accessToken: process.env.INTERCOM_ACCESS_TOKEN,
  apiVersion: '2.11'
});
```

### 連絡先と会話を同期

```javascript
// 連絡先と会話データをフル同期
await tajo.connectors.sync('intercom', {
  type: 'full',
  resources: ['contacts', 'conversations', 'companies'],
  since: '2023-01-01'
});

// 同期ステータスを確認
const status = await tajo.connectors.status('intercom');
console.log(status);
// {
//   connected: true,
//   lastSync: '2024-01-15T10:30:00Z',
//   contactsSynced: 14200,
//   conversationsSynced: 28400,
//   companiesSynced: 2100
// }
```

### Intercom Webhook の処理

```javascript
import crypto from 'crypto';

app.post('/webhooks/intercom', async (req, res) => {
  const signature = req.get('X-Hub-Signature');
  const expectedSig = 'sha1=' + crypto
    .createHmac('sha1', process.env.INTERCOM_CLIENT_SECRET)
    .update(JSON.stringify(req.body))
    .digest('hex');

  if (signature !== expectedSig) {
    return res.status(401).send('Unauthorized');
  }

  await tajo.connectors.handleWebhook('intercom', {
    topic: req.body.topic,
    data: req.body.data
  });

  res.status(200).send('OK');
});
```

## レート制限

Intercom はプランに基づいてレート制限を適用します。

| プラン | レート制限 | 詳細 |
| --- | --- | --- |
| Starter | 20 リクエスト/10 秒 | アプリ単位 |
| Pro | 50 リクエスト/10 秒 | アプリ単位 |
| Premium | 100 リクエスト/10 秒 | アプリ単位 |
| 検索エンドポイント | 1 リクエスト/秒 | アプリ単位 |
| スクロールエンドポイント | 1 リクエスト/分 | アプリ単位 |

追加の制限:

- **一括操作**: 一括リクエストあたり 15 連絡先
- **イベント送信**: ワークスペースあたり 500 イベント/秒
- **Webhook 配信**: 24 時間の自動リトライ
- **データエクスポート**: 同時エクスポート 1 件

レート制限レスポンス

Intercom は `Retry-After` ヘッダー付きで `429 Too Many Requests` を返します。指数バックオフを実装し、リトライウィンドウを尊重してください。

## トラブルシューティング

### 一般的な問題

| 問題 | 原因 | 解決策 |
| --- | --- | --- |
| 401 Unauthorized | トークンが無効または期限切れ | Developer Hub でアクセストークンを再生成 |
| 連絡先が同期されない | メールフィールドの欠落 | Intercom リードはメールがない場合がある。role でフィルタ |
| 会話データが空 | アプリに会話スコープがない | 会話読み取り権限で再認可 |
| Webhook を受信できない | Webhook が登録されていない | Developer Hub 設定で Webhook を構成 |
| API バージョン不一致 | 新バージョンでの破壊的変更 | `Intercom-Version` ヘッダーで API バージョンを固定 |

### デバッグモード

詳細ロギングを有効化:

```yaml
connectors:
  intercom:
    debug: true
    log_level: verbose
    log_webhooks: true
```

### 接続テスト

```bash
tajo connectors test intercom
# ✓ API 接続成功
# ✓ 連絡先読み取り可能
# ✓ 会話読み取り可能
# ✓ 企業読み取り可能
# ✓ Webhook 登録済み
```

## ベストプラクティス

1. **API バージョンを固定する** - 破壊的変更を避けるため常に `Intercom-Version` を指定
2. **Search API を効率的に使用する** - フィルタとページネーションを使用してデータ転送を削減
3. **ユーザーとリードの両方を同期する** - ファネル全体を Brevo でキャプチャ
4. **会話タグをマッピングする** - サポート後のマーケティングセグメントに会話タグを使用
5. **カスタムイベントをトラッキングする** - 行動ターゲティングのため主要な製品イベントを Intercom に送信
6. **連絡先のマージを処理する** - 重複連絡先のマージロジックを実装

## セキュリティ

- **アクセストークン** - プライベートアプリ用の Bearer トークン認証
- **OAuth 2.0** - パブリックアプリ用の委任認可(クライアントシークレット付き)
- **Webhook 検証** - `X-Hub-Signature` による HMAC SHA-1 署名検証
- **TLS 暗号化** - すべての API 通信は HTTPS で暗号化
- **データアクセス制御** - アプリ設定ごとの細かいデータアクセス

## 関連リソース

- [Intercom Developer ドキュメント](https://developers.intercom.com/docs)
- [Intercom API リファレンス](https://developers.intercom.com/docs/references/introduction)
- [Zendesk コネクタ](https://tajo.io/jp/docs/connectors/support/zendesk)
- [顧客同期スキル](https://tajo.io/jp/docs/skills/data-sync/customer-sync)
- [Brevo Contacts API](https://tajo.io/jp/docs/contact-management)
