メール処理を自動化。AI x RPA の問い合わせ管理システム

「Teamsアプリは常時起動しているけど、ThinkOwlの起動は自分の業務(もしくはシフト)のときだけ」「セキュリティのため、離席のときは必ずThinkOwlをログアウトする」ことがあるかもしれません。

しかし、うっかりThinkOwlへのログインを忘れていると、お客さまからの問い合わせに気が付かないトラブルが発生してしまいます。

対応漏れを防ぐには、ThinkOwlとTeamsの連携が便利です。そこで今回は、問い合わせ管理システムThinkOwlとTeamsを連携する方法を試してみます。

Teamsとの連携で使用するのはWebhookです。では早速手順を見ていきましょう。

WebサイトにアクセスするとURLが表示されるので、URLをコピー

2. ThinkOwlにログインして,Webhookを設定

管理者>セキュリティ>「+Webhook」からWebhookの設定

コピーしたURLを「ウェブサイトのリンク」に設定
「Webhook name」を入力し,「タイプ」は「CASE」を選択し,「Event type」では「CASE_CREATED」と「CASE_ATTREBUTE_CHANGED」を選択し「保存」する

「有効」→「有効化」

3. webhook.siteで,JSONスキーマを取得する

Raw cntentをすべてコピーする

4. TeamsのPowerAutomateアプリでトリガーを設定する

「PowerAutomate」を選択し,

「+新しいフロー」あるいは「作成」を選択する

「+-から作成」を選択し,

「http要求の受信時」を選択する

「サンプルのペイロードを使用してスキーマを生成する」を選択し,

手順4でコピーしたRaw cntentを貼り付ける

{
    "type": "object",
    "properties": {
        "notification_id": {
            "type": "string"
        },
        "subscription_tenant": {
            "type": "string"
        },
        "subscription_id": {
            "type": "string"
        },
        "notification_time": {
            "type": "string"
        },
        "resource_type": {
            "type": "string"
        },
        "event_time": {
            "type": "string"
        },
        "event_data": {
            "type": "object",
            "properties": {
                "channel": {
                    "type": "string"
                },
                "category": {
                    "type": "string"
                },
                "keywords": {
                    "type": "array"
                },
                "language": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "priority": {
                    "type": "integer"
                },
                "title": {
                    "type": "string"
                },
                "complaint": {
                    "type": "boolean"
                },
                "since": {
                    "type": "integer"
                },
                "submitter": {
                    "type": "string"
                },
                "version": {
                    "type": "integer"
                },
                "parameters": {
                    "type": "object",
                    "properties": {}
                },
                "tenant": {
                    "type": "string"
                },
                "desk_id": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "time_stamp": {
                    "type": "integer"
                },
                "assigned_agent": {
                    "type": "string"
                },
                "current_user": {
                    "type": "string"
                },
                "case_id": {
                    "type": "string"
                },
                "due_status": {
                    "type": "integer"
                },
                "time_consumed": {
                    "type": "integer"
                },
                "first_reply_time": {
                    "type": "integer"
                },
                "lapsed_time": {
                    "type": "integer"
                },
                "creation_date": {
                    "type": "integer"
                },
                "due_base_time": {
                    "type": "integer"
                },
                "follow_up": {
                    "type": "integer"
                },
                "last_modified": {
                    "type": "integer"
                },
                "external_case_id": {
                    "type": "string"
                },
                "activity_log_id": {
                    "type": "string"
                },
                "unread_messages": {
                    "type": "integer"
                },
                "case_fields": {
                    "type": "array"
                }
            }
        }
    }
}

5. アクションを設定する

「+新しいステップ」を選択し,

「チャットまたはチャネルでメッセージを投稿する」を選択する

投稿先を選択し「保存」する

6. POST先のURLを取得しフローを有効にする

「HTTP POSTのURL」をコピーする

フローの状況を「オン」にする

7. 手順6で取得したURLをThinkOwlのWebhookに設定し有効化する

ThinkOwlとTeamsとの連携が完了です。

補足:通知されるjsonサンプル

スキーマ作成の時に使えるかもしれません。

ThinkOwlにwebhookを設定すると

{
  "id": "1234567a-bc12-1de2-1234-123fghij45678",
  "name": "Sandbox webhook test",
  "active": false,
  "resource": {
    "desks": [
      "12a3bcde-1f2g-1h23-i1j2-klm123n1op2q"
    ],
    "type": "CASE",
    "event_types": [
      "CASE_CREATED",
      "CASE_ATTRIBUTE_CHANGED"
    ]
  },
  "url": "https://webhook.site/99052337-1e64-4a60-9b77-9980a76497f1"
}

Case新規作成した時

{
  "notification_id": "9238030b-4048-43c3-ac9f-4f64d1d4f7f2",
  "subscription_tenant": "cba",
  "subscription_id": "1234567a-bc12-1de2-1234-123fghij45678",
  "notification_time": "2022-06-06T08:09:40.15483Z",
  "resource_type": "CASE",
  "event_time": "2022-06-06T08:09:39.839Z",
  "event_data": {
    "channel": "PORTAL",
    "category": "2b13984e-ad33-401b-9cb4-015653732123",
    "keywords": [],
    "language": "en",
    "status": "OPEN",
    "priority": 0,
    "title": "webhookのテスト2",
    "complaint": false,
    "since": 0,
    "submitter": "SYSTEM",
    "version": 1,
    "parameters": {},
    "tenant": "cba",
    "desk_id": "12a3bcde-1f2g-1h23-i1j2-klm123n1op2q",
    "type": "CASE_CREATED",
    "time_stamp": 1654502979839,
    "assigned_agent": "",
    "current_user": "SYSTEM",
    "case_id": "05f05ddd-063e-4318-8b1d-95c24880ef2f",
    "due_status": 0,
    "time_consumed": 0,
    "first_reply_time": 0,
    "lapsed_time": 0,
    "creation_date": 1654502979839,
    "customer_id": "90923322-80d7-436e-98b7-9911ef47f0e5",
    "customer_name": "ishikawa",
    "due_base_time": 0,
    "follow_up": 9971942400000,
    "last_modified": 1654502979839,
    "external_case_id": "107006",
    "activity_log_id": "9238030b-4048-43c3-ac9f-4f64d1d4f7f2",
    "unread_messages": 0,
    "case_fields": []
  }
}

Case更新した時

{
  "notification_id": "e3512895-26ae-40c7-a140-4ee60d1edab0",
  "subscription_tenant": "cba",
  "subscription_id": "1234567a-bc12-1de2-1234-123fghij45678",
  "notification_time": "2022-06-06T08:16:36.99544Z",
  "resource_type": "CASE",
  "event_time": "2022-06-06T08:16:36.879Z",
  "event_data": {
    "channel": "PORTAL",
    "category": "2b13984e-ad33-401b-9cb4-015653732123",
    "keywords": [],
    "language": "en",
    "status": "OPEN",
    "priority": 0,
    "title": "webhookのテスト2",
    "complaint": false,
    "since": 0,
    "submitter": "SYSTEM",
    "version": 3,
    "parameters": {
      "casefield_new": [
        {
          "id": "f6be0b41-8969-4043-a1d6-ca3a58d4f4e5",
          "key": "cf100012",
          "value": "false",
          "read_only": false,
          "case_global": false
        },
        {
          "id": "b53e2bd1-2165-4c08-85d2-8f68f84e9541",
          "key": "cf102000",
          "value": "false",
          "read_only": false,
          "case_global": false
        }
      ],
      "involvedAgents": [
        "c21fd357-f505-43f8-a75d-5c1b78c61128"
      ],
      "involvedAgents_old": [],
      "casefield_old": []
    },
    "tenant": "cba",
    "desk_id": "12a3bcde-1f2g-1h23-i1j2-klm123n1op2q",
    "type": "CASE_ATTRIBUTE_CHANGED",
    "time_stamp": 1654503396879,
    "assigned_agent": "",
    "current_user": "c21fd357-f505-43f8-a75d-5c1b78c61128",
    "case_id": "05f05ddd-063e-4318-8b1d-95c24880ef2f",
    "due_status": 0,
    "time_consumed": 0,
    "first_reply_time": 0,
    "lapsed_time": 0,
    "creation_date": 1654502979839,
    "customer_id": "90923322-80d7-436e-98b7-9911ef47f0e5",
    "customer_name": "ishikawa",
    "due_base_time": 0,
    "follow_up": 9971942400000,
    "last_modified": 1654503396879,
    "external_case_id": "107006",
    "activity_log_id": "e3512895-26ae-40c7-a140-4ee60d1edab0",
    "unread_messages": 0,
    "case_fields": [
      {
        "id": "f6be0b41-8969-4043-a1d6-ca3a58d4f4e5",
        "value": [
          "false"
        ]
      },
      {
        "id": "b53e2bd1-2165-4c08-85d2-8f68f84e9541",
        "value": [
          "false"
        ]
      }
    ]
  }
}

最後に

今回は問い合わせ管理システムThinkOwlTeamsを連携することを実践しました。

いまThinkOwlをご利用中のお客さまも、他社の問い合わせ管理システムをご利用中の方も「こんなことができたらいいな」「あれがやってみたい」という要望がございましたらお気軽にご相談ください。

問い合わせ管理システムThinkOwlとTeamsを連携してみた
トップへ戻る