{"info":{"_postman_id":"08385194-e60a-4972-9003-3453721012a9","name":"BPCC Task Routing API (JA)","description":"<html><head></head><body><p>Bright Pattern Contact Center（BPCC）タスクルーティングAPI v1は、外部システム（CRMなど）がBPCC内でタスクの作成、ルーティング、修正、キャンセル、および照会を行えるようにするRESTful APIです。</p>\n<h2 id=\"機能\">機能</h2>\n<p>タスクルーティング API v1 では、以下の機能がサポートされています。</p>\n<ul>\n<li><strong>タスクのキューへの登録：</strong>新規のタスクを作成してキューに登録し、ケースおよび連絡先に関連付けます。</li>\n<li><strong>タスクのキャンセル：</strong>特定のタスクをキューから消去し、そのdispositionを設定します。</li>\n<li><strong>サービスタスクのキャンセル：</strong>特定のサービスに関連付けられた、キューに登録されているすべてのタスクをキャンセルします。</li>\n<li><strong>タスクの更新：</strong>キューに登録されたタスクの属性（サービスや優先度など）を修正します。</li>\n<li><strong>タスクの照会：</strong>特定のタスクのステータスやキュー情報を取得します。</li>\n<li><strong>外部識別子のサポート：</strong>エンティティは、内部識別子（BPCC によって自動的に生成される）または外部識別子（ユーザーが指定する）のいずれかを使用して参照できます。</li>\n</ul>\n<h2 id=\"エンティティ\">エンティティ</h2>\n<p>この API は、Bright Pattern Contact Center 内の以下のコアオブジェクトと連携します：</p>\n<ul>\n<li><strong>タスク：</strong>エージェントが完了すべき特定のアクションやアクティビティを表す、個別の作業単位です。タスクは常にケースおよび連絡先に関連付けられています。タスクがキューに入れられる際、外部識別子に関連付けられる場合があります。既存のタスクは、内部識別子または外部識別子を用いて、キャンセル、更新、および照会を行うことができます。</li>\n<li><strong>ケース：</strong>特定の顧客リクエストに関連する<a href=\"https://help.brightpattern.com/Agent-guide/Work/CasesEmail/CasesEmailandThreads#Cases_and_Email\">コミュニケーションおよび情報のグループ</a>です。ケースは常に連絡先に関連付けられています。API経由でケースが作成される際、外部識別子とリンクされる場合があります。タスクがキューに入れられる際、既存のケースは、そのケースの外部識別子を使用してタスクに関連付けられる場合があります。</li>\n<li><strong>連絡先：</strong>対話に関与する<a href=\"https://help.brightpattern.com/Agent-guide/Work/Contacts/Overview\">顧客または個人</a>を指します。API 経由で連絡先が作成される場合、外部識別子と関連付けられることがあります。タスクがキューに登録される際、連絡先の外部識別子を使用して、その連絡先をタスクに関連付けることができます。</li>\n</ul>\n<h2 id=\"エンドポイントプレフィックス\">エンドポイントプレフィックス</h2>\n<p>Task Routing API v1 のエンドポイントプレフィックスは以下の通りです：</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://&lt;tenant_url&gt;/taskroutingapi/v1/\n\n</code></pre><h1 id=\"5a6lgh6kqt6icf\">対象読者</h1>\n<p>このドキュメントは、外部システムとBright Patternコンタクトセンターの統合を担当するIT担当者および開発者を対象としています。読者は、REST API、JSONデータ構造、およびサービス、キュー、dispositionなどのコンタクトセンターの概念について、ある程度の知識をお持ちである必要があります。このAPIを使用して統合を実装するには、スクリプト作成やプログラミングの経験があることが推奨されます。</p>\n<h1 id=\"5l255so5pa55rov\">使用方法</h1>\n<p>このドキュメントには、各APIメソッドのサンプルが含まれています。これらのサンプルは、統合開発の出発点としてご利用いただけます。これらのAPIの説明は、 <a href=\"https://www.getpostman.com/\">Postman API開発環境</a> に読み込み、ご自身のアクセストークンを使用してAPIとやり取りすることができます。</p>\n<p>タスクルーティングのリクエストおよびレスポンスには、<code>application/json</code> 型の JSON エンコードされた本文が含まれる場合があります。成功したレスポンスの本文はメソッドによって異なります。失敗したレスポンスでは、以下の内容が返されます：</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-JSON\">{\n\"errorCode\": [integer number],\n\"errorMessage\": \"[string with error description]\"\n}\n\n</code></pre>\n<h2 id=\"認証\">認証</h2>\n<p>以下のAPIメソッドを使用するには、ユーザーに<strong>「タスクルーティングAPIの使用」</strong>権限が付与されている必要があります。管理者は、コンタクトセンター内の <a href=\"https://help.brightpattern.com/Contact-center-administrator-guide/UsersandTeams/Privileges#Service_and_Campaign_Administration\"><b>役割</b> ＞ <b>サービスおよびキャンペーン管理</b></a> からこの権限を付与できます。</p>\n<p>詳細については、『設定ガイド』をご参照ください。</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"対象読者","slug":"5a6lgh6kqt6icf"},{"content":"使用方法","slug":"5l255so5pa55rov"}],"owner":"58450950","collectionId":"08385194-e60a-4972-9003-3453721012a9","publishedId":"2sBYB4LmuJ","public":true,"customColor":{"top-bar":"FFFFFF","highlight":"FF6C37","right-sidebar":"303030"},"publishDate":"2026-09-29T10:20:20.000Z"},"item":[{"name":"認証","item":[{"name":"Get access token","id":"341632c9-61a6-4bf9-8931-77c4080d11f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"client_id","value":"String (Username)","type":"text","description":"<p><a href=\"https://help.brightpattern.com/Contact-center-administrator-guide/Users#Username\">Username</a> of a BPCC user with the <a href=\"https://help.brightpattern.com/Contact-center-administrator-guide/UsersandTeams/Privileges\">User Privilege</a> <em>Use Task Routing API</em> enabled.</p>\n"},{"key":"client_secret","value":"String (API Token)","type":"text","description":"<p>The <a href=\"https://help.brightpattern.com/Contact-center-administrator-guide/UsersandTeams/Users#API_secret\">API secret key</a> generated for the user specified by <strong>client_id</strong> </p>\n"},{"key":"scope","value":"String (URL)","type":"text","description":"<p>Your tenant URL, e.g., <em>example.brightpattern.com</em></p>\n"},{"key":"grant_type","value":"String (\"client_credentials\")","type":"text","description":"<p>Grant type. Must be set to <em>client_credentials</em>.</p>\n"}]},"url":"https://<tenant-url>/configapi/v2/oauth/token","description":"<p>このAPI経由で行われる以降の各リクエストの認証に使用する必要があるアクセストークンを返します。</p>\n","urlObject":{"protocol":"https","path":["configapi","v2","oauth","token"],"host":["<tenant-url>"],"query":[],"variable":[]}},"response":[{"id":"8285fb72-94aa-4465-afe7-6aa39289becf","name":"Get Access Tokan","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"client_id","value":"bot","type":"text"},{"key":"client_secret","value":"5O3yBrH5j1GqLVG0qDS7M1kKXhprngJNWV10eh8g0fu7yc9SVyWtquJ4SNQffu3G","type":"text"},{"key":"scope","value":"example.tenant.com","type":"text"},{"key":"grant_type","value":"client_credentials","type":"text"}]},"url":"https://<tenant-url>/configapi/v2/oauth/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.21.0"},{"key":"Date","value":"Fri, 15 Dec 2023 16:47:24 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"147"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"6538A1974B81A0391A1C410AF9ACCEA5E6FE7EAF52FE7B90D2A9CB67D0254841\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": \"3600\",\n    \"scope\": \"example.tenant.com\"\n}"}],"_postman_id":"341632c9-61a6-4bf9-8931-77c4080d11f3"}],"id":"c345b84b-4ac1-4013-ac14-44e4c0c9f676","description":"<p>このAPIのクライアントを認証するために、<a href=\"https://tools.ietf.org/html/rfc6749#section-4.4\">OAuth 2.0 クライアント認証情報グラント</a>が使用されます。認証されたユーザーが、要求された操作を実行するための適切な権限を持っているかどうかが確認されます。権限の完全なリストは<a href=\"https://help.brightpattern.com/latest:Contact-center-administrator-guide/UsersandTeams/Privileges/ja\">こちら</a>で確認できます。権限は、1つまたは複数の<a href=\"https://help.brightpattern.com/latest:Contact-center-administrator-guide/UsersandTeams/Roles/ja\">役割</a>を通じてユーザーに割り当てられます。</p>\n<p>アクセストークンを取得するには：</p>\n<ol>\n<li><p>BPCC管理ポータルにログインします。</p>\n</li>\n<li><p><a href=\"https://help.brightpattern.com/latest:Contact-center-administrator-guide/UsersandTeams/Users/ja\">ユーザー</a>ページに移動します。</p>\n</li>\n<li><p>「_Taskrouting APIを使用する_」権限を持つユーザーを選択するか、新規作成します。</p>\n</li>\n<li><p>[生成] ボタンをクリックして、<a href=\"https://help.brightpattern.com/latest:Contact-center-administrator-guide/UsersandTeams/Users/ja#API_secret\">APIシークレットキー</a>を生成します。生成されたキーをコピーし、ユーザー名を記録しておきます。</p>\n</li>\n<li><p>「<em>Get Access Token_」メソッドを使用して、アクセストークンを取得します。_client_id</em> には上記のユーザー名を、<em>client_secret</em> には生成されたAPIシークレットキーを設定します。</p>\n</li>\n<li><p>レスポンスで返された_access_token_の値を使用して、BPCC タスクルーティングAPI経由で送信される以降の各リクエストの「_Authorization: Bearer [access token]_」ヘッダーに設定します。</p>\n</li>\n</ol>\n","_postman_id":"c345b84b-4ac1-4013-ac14-44e4c0c9f676"},{"name":"タスクルーティング","item":[{"name":"Queue Task","id":"8be2a1e4-2e0f-432f-8bdb-2ddc5b2e5313","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"extTaskId\": \"task_id_12345_external_crm\",\n    \"extCaseId\": \"case_id_67890_external_crm\",\n    \"extContactId\": \"contact_id_6789_external_crm\",\n    \"serviceName\": \"Task Service\",\n    \"screenpop\": \"SHOW_OBJECT:192837465:task\",\n    \"screenpopData\": [\n    {\n        \"type\": \"web\",\n        \"url\": \"https://www.brightpattern.com\",\n        \"label\": \"The Title\",\n        \"webScreenpopShowInTab\": true\n    },\n    {\n        \"type\": \"web\",\n        \"url\": \"https://www.someotherurl.com\",\n        \"label\": \"A different title that doesn't matter, since it's not opened in a tab\",\n        \"webScreenpopShowInTab\": false\n    },\n    {\n        \"type\": \"dynamicscrm\",\n        \"url\": \"SHOW_OBJECT:5551212:task\",\n        \"screenpopShowUponAnswer\": true\n    }],\n    \"webScreenpopShowInTab\": true,\n    \"screenpopShowUponAnswer\": false,\n    \"priority\": 2,\n    \"taskLaunchPointId\": \"952e8dc2e0469c349cb9c02c9b31f9150b7afd7a\",\n    \"order\": \"fifo\",\n    \"contactInfo\":\n    {\n        \"firstName\": \"John\",\n        \"lastName\": \"Doe\",\n        \"title\": \"Senior Manager\",\n        \"position\": \"Head of Engineering\",\n        \"summary\": \"Experienced leader in software development.\",\n        \"segment\": \"High Value Customer\",\n        \"dob\": \"1980-05-10T00:00:00.000Z\",\n        \"emails\": [\n        {\n            \"type\": \"PRIMARY\",\n            \"address\": \"john.doe@example.com\"\n        },\n        {\n            \"type\": \"BUSINESS\",\n            \"address\": \"john.doe.business@example.com\"\n        }],\n        \"addresses\": [\n        {\n            \"type\": \"PRIMARY\",\n            \"postcode\": \"90210\",\n            \"state\": \"CA\",\n            \"city\": \"Beverly Hills\",\n            \"addressLine1\": \"123 Main Street\",\n            \"addressLine2\": \"Suite 456\",\n            \"country\": \"USA\"\n        }],\n        \"custom_signup_source\": \"Website\"\n    },\n    \"caseInfo\":\n    {\n        \"category\": \"Technical Support\",\n        \"priority\": 1,\n        \"custom_related_knowledge_base_article\": \"KB-12345\"\n    },\n    \"taskInfo\":\n    {\n        \"subject\": \"Follow up on customer issue\",\n        \"custom_task_notes\": \"Offer a reduced subscription price if customer is not satisfied by the resolution.\"\n    }\n}"},"url":"https://<tenant-url>/taskroutingapi/v1/task/","description":"<p>タスクをキューに入れ、ケースおよび連絡先に関連付けます。</p>\n<p>オプションとして、重複を防ぐために、タスク、ケース、または連絡先に紐付ける外部IDを指定することができます。外部IDが指定された場合：</p>\n<ol>\n<li><p>BPCCは、タスク、ケース、または連絡先に対して指定された外部IDと関連付けられている既存のレコードがあるかどうかを確認します。</p>\n</li>\n<li><p><strong>If a match is found</strong> 外部IDと適合するレコードが見つかった場合、BPCC内の対応する既存のレコードが使用されます。</p>\n</li>\n<li><p><strong>If no match is found</strong> 外部IDと適合するレコードが見つからない場合、BPCCに新規のレコード（タスク、ケース、または連絡先）が作成され、その外部IDと関連付けられます。</p>\n</li>\n<li><p>最後に、そのタスク（既存のものを参照した場合でも、新規に作成された場合でも）は、ケースおよび連絡先エンティティ（既存のものを参照した場合でも、新規に作成された場合でも）に関連付けられ、指定されたサービスにキューに入れられます。</p>\n</li>\n</ol>\n<h3 id=\"request-body\">Request Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>extTaskId</td>\n<td>CRMやデータベースなどの外部システムからの一意の識別子です。  <br />- BPCC内の既存のタスクがすでに <strong>extTaskId</strong> とリンクされている場合、<strong>taskInfo</strong>、<strong>caseInfo</strong>、および <strong>contactInfo</strong> 内のデータはすべて無視され、リンクされたタスクがキューに入れられます。  <br />- <strong>extTaskId</strong> とリンクされたタスクがBPCCに存在しない場合、<strong>taskInfo</strong> のデータを使用して新規のタスクが作成され、指定された <strong>extTaskId</strong> とリンクされます。  <br />- <strong>extTaskId</strong> が指定されていない場合、<strong>taskInfo</strong> のデータを使用して新規のタスクが作成され、キューに入れられます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>extCaseId</td>\n<td>CRMやデータベースなどの外部システムからの一意の識別子です。  <br />- BPCC内に <strong>extCaseId</strong> とリンクされた既存のケースが存在する場合、そのケースはキューに入れられたタスクに関連付けられ、<strong>caseInfo</strong> および <strong>contactInfo</strong> 内のデータは無視されます。  <br />- <strong>extCaseId</strong> にリンクされたケースが存在しない場合、<strong>taskInfo</strong> のデータを使用して新規のケースが作成され、<strong>extCaseId</strong> にリンクされた上で、キューに入れられたタスクに関連付けられます。  <br />- <strong>extCaseId</strong> が指定されていない場合、<strong>taskInfo</strong> のデータを使用して新規のケースが作成され、キューに入れられたタスクに関連付けられます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>extContactId</td>\n<td>CRMやデータベースなどの外部システムからの一意の識別子です。  <br />- 既存のBPCC連絡先が <strong>extContactId</strong> とリンクされている場合、その連絡先はキューに入れられたタスクのケースに関連付けられ、<strong>contactInfo</strong> は無視されます。  <br />- <strong>extContactId</strong> とリンクされた連絡先が存在しない場合、<strong>contactInfo</strong> のデータを使用してBPCC連絡先が作成され、<strong>extContactId</strong> とリンクされ、キューに入れられたタスクのケースに関連付けられます。  <br />- <strong>extContactId</strong> が指定されていない場合、<strong>contactInfo</strong> のデータに基づいて連絡先が作成され、キューに入れられたタスクのケースに関連付けられます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>serviceName</td>\n<td>タスクがキューに入れられる<a href=\"https://help.brightpattern.com/Contact-center-administrator-guide/ServicesandCampaigns/ServicesandCampaignsOverview\">Service</a>の名前です。<code>taskLaunchPointId</code> で指定されたシナリオエントリーによって指定されたサービスを上書きします。  <br />- <code>taskLaunchPointId</code> が指定されている場合は省略可能です。  <br />- <code>taskLaunchPointId</code> が省略されている場合は必須です</td>\n</tr>\n<tr>\n<td>screenpop</td>\n<td>タスクに関連付ける<a href=\"https://help.brightpattern.com/Microsoft-dynamics-365-integration-guide/Configuration/ScreenpopforPreviewCampaigns#2a._Configure_the_Screenpop_URL\">CRM screen pop URL</a>または通常のWeb URLスクリーンポップです。フォーマットの例：<code>SHOW_OBJECT:5551212:task</code> または <code>https://brightpattern.com</code>  <br />CRMスクリーンポップは、CRM内でBPCCウィジェットを使用しているエージェントにのみ表示されます。複数のスクリーンポップを設定するには、<strong>screenpopData</strong> プロパティを使用してください。  <br />Optional.</td>\n</tr>\n<tr>\n<td>screenpopData</td>\n<td><strong>screenpopData</strong> オブジェクトの配列です。  <br />- エージェントがエージェントデスクトップを使用している場合、複数のWeb URLスクリーンポップを表示できます。  <br />- CRMスクリーンポップは、対応するCRMアプリケーションに組み込まれたエージェントデスクトップウィジェットを使用しているエージェントにのみ表示されます。  <br />- エージェントには、1つのCRMスクリーンポップのみを表示できます。配列内に同一タイプのCRMスクリーンポップが複数存在する場合、最後のものが使用されます。  <br />利用可能なプロパティについては、以下で説明します。  <br />Optional</td>\n</tr>\n<tr>\n<td>webScreenpopShowInTab</td>\n<td>Web URLスクリーンポップを新規のブラウザタブで開くかどうかを指定するブール値です。既定は <code>false</code> です。  <br />- <code>true</code> の場合、<strong>スクリーンポップ</strong> は新規のタブで開かれます。  <br />- <code>false</code> の場合、<strong>スクリーンポップ</strong> はエージェントデスクトップで開かれます。  <br />- CRM内のBPCCウィジェットを使用してエージェントにWeb URLのスクリーンポップを表示するには、<code>true</code> に設定する必要があります。<code>false</code> の場合、スクリーンポップは表示されません。  <br />- <strong>screenpop</strong> がCRMのスクリーンポップURLである場合は無視されます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>screenpopShowUponAnswer</td>\n<td>エージェントがタスクを承認した際にWebスクリーンポップを開くかどうかを指定するブール値です。既定値は <code>false</code> です。  <br />- <code>true</code> の場合、ユーザーがタスクに応答（承認）した後にスクリーンポップが表示されます。  <br />- <code>false</code> の場合、タスクがエージェントに割り当てられた直後にスクリーンポップが表示されます。  <br /><strong>screenpopShowUponAnswer</strong> の値によって、<a href=\"https://help.brightpattern.com/AgentDesktop-client-side-javascript-api-specification/onWebScreenPopCustom\">Agent Desktop Client-Side JavaScript callback onWebScreenPopCustom</a> のフラグ <strong>popUponAnswer</strong> が設定されます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>priority</td>\n<td><code>0.01</code> から <code>100</code> までの範囲（両端を含む）の数値で表されるタスクの優先度です。値が大きいほど、タスクは値が小さいタスクよりもキュー内を速く移動します。これは、<a href=\"https://help.brightpattern.com/Scenario-builder-reference-guide/ScenarioBlocks/SetPriority#Priority_Values\">Priority Value in the Set Priority scenario block</a>のロジックに従います。  <br />指定された場合、<code>taskLaunchPointId</code> で示される <em>Scenario Entry</em> で定義された優先度を上書きします。  <br /><code>priority</code> と <code>taskLaunchPointId</code> の両方が省略された場合、既定値は <code>1</code> となります。  <br />Optional.</td>\n</tr>\n<tr>\n<td>order</td>\n<td>タスクのキュー順序です。既定は <code>fifo</code> です。  <br />- <code>fifo</code> は「先入れ先出し（First in, first out）」を示し、これは、その後キューに入れられたタスクが割り当てられる前に、このタスクがエージェントに割り当てられることを意味します。  <br />- <code>lifo</code> は「後入れ先出し（Last in, first out）」を示し、以前にキューに入れられたすべてのタスクが割り当てられた後にのみ、そのタスクがエージェントに割り当てられることを意味します。<code>lifo</code> の順序が指定されたタスクについては、<strong>priority</strong> の値は無視されます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>contactInfo</td>\n<td>連絡先を作成するために使用されます。<strong>extContactId</strong> が指定されていない場合、または指定された <strong>extContactId</strong> に内部連絡先が関連付けられていない場合は必須です。利用可能なプロパティは以下にリストされています。  <br />Optional.</td>\n</tr>\n<tr>\n<td>caseInfo</td>\n<td>ケースの作成に使用されます。<strong>extCaseId</strong> が指定されていない場合、または指定された <strong>extCaseId</strong> に内部ケースが関連付けられていない場合は必須となります。利用可能なプロパティは以下にリストされています。  <br />Optional.</td>\n</tr>\n<tr>\n<td>taskInfo</td>\n<td>タスクの作成に使用されます。<strong>extTaskId</strong> が指定されていない場合、または <strong>extTaskId</strong> にリンクされたタスクがない場合は必須となります。利用可能なプロパティは以下にリストされています。  <br />Optional.</td>\n</tr>\n<tr>\n<td>taskLaunchPointId</td>\n<td>タスクをキューに入れる際に使用する、<a href=\"https://help.brightpattern.com/Contact-center-administrator-guide/ScenarioEntries/Tasks\">Task Scenario Entry</a>の <strong>Unique Identifier</strong> を指定します。  <br />Task <em>Scenario Entries</em> は、タスクを関連付ける既定の <em>Service</em> を提供し、既定の <em>Priority</em> を定義することもできます。  <br />- <em>Scenario Entry</em> で定義された既定の <em>Service</em> は、<strong>serviceName</strong> プロパティで別の <em>Service</em> を指定することで上書きできます。  <br />- <em>Scenario Entry</em> で定義された既定の <em>Priority</em> は、<code>priority</code> プロパティを使用して上書きできます。  <br />Optional</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"contactinfo-properties\"><code>contactInfo</code> Properties:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>firstName</td>\n<td>連絡先の名前。  <br />Required.</td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>連絡先の姓です。  <br />Optional.</td>\n</tr>\n<tr>\n<td>title</td>\n<td>連絡先の役職名です。  <br />Optional.</td>\n</tr>\n<tr>\n<td>position</td>\n<td>連絡先の役職です。  <br />Optional.</td>\n</tr>\n<tr>\n<td>summary</td>\n<td>連絡先の概要です。  <br />Optional.</td>\n</tr>\n<tr>\n<td>segment</td>\n<td>顧客セグメントです。  <br />Optional.</td>\n</tr>\n<tr>\n<td>dob</td>\n<td>顧客の生年月日（<code>YYYY-MM-DDTHH:mm:ss.sssZ</code> フォーマット）。  <br />Optional.</td>\n</tr>\n<tr>\n<td>emails</td>\n<td>その連絡先に関連付けられたメールアドレスの配列です。各エレメントで利用可能なプロパティは、以下にリストされています。  <br />Optional.</td>\n</tr>\n<tr>\n<td>addresses</td>\n<td>その連絡先に紐付けられた住所の配列です。各エレメントで利用可能なプロパティは、以下にリストされています。  <br />Optional.</td>\n</tr>\n<tr>\n<td>custom_</td>\n<td>その他のカスタムフィールドです。  <br />Optional.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"contactinfoemails-array-element-properties\"><code>contactInfo.emails</code> Array Element Properties:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>メールアドレスの種類（PRIMARY、BUSINESS、PRIVATE）。  <br />Required.</td>\n</tr>\n<tr>\n<td>address</td>\n<td>メールアドレス。  <br />Required.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"contactinfoaddresses-array-element-properties\"><code>contactInfo.addresses</code> Array Element Properties:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>住所の種類（PRIMARY、BILLING、SHIPPING、OTHER）。  <br />Required.</td>\n</tr>\n<tr>\n<td>postcode</td>\n<td>郵便番号。  <br />Optional.</td>\n</tr>\n<tr>\n<td>state</td>\n<td>州。  <br />Optional.</td>\n</tr>\n<tr>\n<td>city</td>\n<td>都市名。  <br />Optional.</td>\n</tr>\n<tr>\n<td>addressLine1</td>\n<td>住所の1行目。  <br />Optional.</td>\n</tr>\n<tr>\n<td>addressLine2</td>\n<td>住所の2行目。  <br />Optional.</td>\n</tr>\n<tr>\n<td>country</td>\n<td>国。  <br />Optional.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"screenpopdata-array-element-properties\"><code>screenpopData</code> Array Element Properties:</h3>\n<p><code>screenpopData</code> 配列を使用して、エージェントのクライアントアプリケーション（フルエージェントデスクトップまたは統合CRMウィジェット）に基づいて条件付きで表示される複数のスクリーンポップを定義します：</p>\n<h6 id=\"full-agent-desktop\">Full Agent Desktop</h6>\n<ul>\n<li><p>エージェントがフルエージェントデスクトップアプリケーションでタスクを承認した場合、<code>type: \"web\"</code> が指定されたスクリーンポップのみが表示されます。複数の <code>web</code> スクリーンポップを同時に表示することができます（例：<code>webScreenpopShowInTab</code> の設定に応じて、別々のタブや埋め込みフレームで表示されます）。</p>\n</li>\n<li><p>タイプが <code>web</code> のオブジェクトを複数含めることができます。定義されたすべての <code>web</code> スクリーンポップが試行されます。ただし、配列要素内で最後に検出された <code>webScreenpopShowInTab</code> および <code>screenpopShowUponAnswer</code> の値が、<em>すべての</em> スクリーンポップに適用されます。</p>\n</li>\n</ul>\n<h6 id=\"integrated-crm-widget\">Integrated CRM Widget</h6>\n<ul>\n<li><p>エージェントが特定のCRMウィジェット（例：Dynamics、Salesforce、ServiceNow、またはZendesk）内でタスクを承認した場合、システムは配列内から、そのCRM（例：<code>type: \"dynamicscrm\"</code>）と適合する <code>type</code> を持つスクリーンポップオブジェクトを検索します。見つかった場合、その特定のCRMスクリーンポップのみがウィジェットインターフェース内に表示されます。配列内の <code>web</code> タイプのスクリーンポップはすべて無視されます。</p>\n</li>\n<li><p>配列内に対応するCRMの <code>type</code> が見つからない場合、システムは <code>web</code> タイプのスクリーンポップを検索します。<code>web</code> タイプのスクリーンポップが存在する場合、その <code>webScreenpopShowInTab</code> 設定が <code>true</code> である場合に_のみ_表示されます（オブジェクト内で明示的に設定されているか、リクエストの最上位レベルから継承されているか）。<code>webScreenpopShowInTab</code> が <code>false</code> の場合、Webスクリーンポップはウィジェット内に表示されません。</p>\n</li>\n<li><p>フルエージェントデスクトップとCRMウィジェットの両方が開いており、<code>screenpopData</code> に適合するCRMタイプと <code>web</code> タイプの両方が含まれている場合、ウィジェットでタスクを承認した際には、CRMのスクリーンポップのみが表示されます。</p>\n</li>\n<li><p>異なるCRMに対応する複数のオブジェクトを含めることができます（例：<code>dynamicscrm</code> 用と <code>salesforce</code> 用をそれぞれ1つずつ）。ただし、同じCRMタイプを持つ複数のオブジェクトを含めた場合（例：<code>type: \"dynamicscrm\"</code> を持つオブジェクトが2つある場合）、配列内のその特定のCRMタイプに属する最後のオブジェクトのみが使用されます。</p>\n</li>\n</ul>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>スクリーンポップのタイプを指定します。有効な値は以下の通りです：  <br />- <code>web</code>  <br />- <code>dynamicscrm</code>  <br />- <code>servicenow</code>  <br />- <code>zendesk</code>  <br />- <code>salesforce</code>  <br />このスクリーンポップを表示できるエージェントインターフェース（フルエージェントデスクトップまたは特定のCRMウィジェット）を決定します。</td>\n</tr>\n<tr>\n<td>url</td>\n<td>表示するWeb URL（例：<code>https://brightpattern.com</code>）またはプレビューエンコードされたCRM URL（例：<code>SHOW_OBJECT:5551212:task</code>）です。</td>\n</tr>\n<tr>\n<td>label</td>\n<td><strong>type</strong> が <code>web</code> であり、スクリーンポップが新規タブで開くように設定されている場合（<strong>webScreenpopShowInTab</strong> が <code>true</code> の場合）、ブラウザのタブタイトルを定義します。それ以外の場合は無視されます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>webScreenpopShowInTab</td>\n<td>ブール値。<code>web</code> タイプのスクリーンポップにのみ適用されます。指定されている場合、この特定のスクリーンポップに対して、最上位の <strong>webScreenpopShowInTab</strong> 設定を上書きします。Webスクリーンポップを新しいブラウザタブで開くか（<code>true</code>）、エージェントデスクトップ内で開くか（<code>false</code>）を決定します。CRMタイプのスクリーンポップでは無視されます。  <br />Optional.</td>\n</tr>\n<tr>\n<td>screenpopShowUponAnswer</td>\n<td>ブール値。指定されている場合、この特定のスクリーンポップに対して、最上位の <strong>screenpopShowUponAnswer</strong> 設定を上書きします。タスクの割り当て直後にスクリーンポップを表示するか（<code>false</code>）、エージェントがタスクを承認した後にのみ表示するかを決定します（<code>true</code>）。  <br />Optional.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"caseinfo-properties\"><code>caseInfo</code> Properties:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>category</td>\n<td>ケースのカテゴリー名です。既存のケースカテゴリーと適合している必要があります。  <br />Required</td>\n</tr>\n<tr>\n<td>custom_*</td>\n<td>その他のカスタムフィールド。  <br />Optional.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"taskinfo-properties\"><code>taskInfo</code> Properties:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>subject</td>\n<td>タスクの件名。  <br />Required.</td>\n</tr>\n<tr>\n<td>custom_*</td>\n<td>その他のカスタムフィールド。  <br />Optional</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response-properties\">Response Properties</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>taskId</td>\n<td>キューに入れられた内部タスクの内部IDです。</td>\n</tr>\n<tr>\n<td>caseId</td>\n<td>キューに入れられたタスクに関連付けられたケースの内部IDです。</td>\n</tr>\n<tr>\n<td>contactId</td>\n<td>キューに入れられたタスクにリンクされているケースに関連付けられている連絡先の内部IDです。</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["taskroutingapi","v1","task",""],"host":["<tenant-url>"],"query":[],"variable":[]}},"response":[{"id":"2471a18a-9c42-4e31-b612-c5963d16dcfa","name":"Queue Task","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer E9C97B84D0F72C08A1B31916A1646B91618F63F146CC3694CD2523B63F732363","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"extTaskId\": \"task_id_12345_external_crm\",\n  \"extCaseId\": \"f0g9h8i7-j6k5-l4m3-n2o1-p0q9r8s7t6u5\",\n  \"extContactId\": \"contact_id_6789_external_crm\",\n  \"serviceName\": \"Task Service\",\n  \"screenpop\": \"SHOW_OBJECT:192837465:task\",\n  \"webScreenpopShowInTab\": true,\n  \"screenpopShowUponAnswer\": false,\n  \"priority\": 2,\n  \"taskLaunchPointId\": \"952e8dc2e0469c349cb9c02c9b31f9150b7afd7a\",\n  \"order\": \"fifo\",\n  \"contactInfo\": {\n    \"firstName\": \"John\",\n    \"lastName\": \"Doe\",\n    \"title\": \"Senior Manager\",\n    \"position\": \"Head of Engineering\",\n    \"summary\": \"Experienced leader in software development.\",\n    \"segment\": \"High Value Customer\",\n    \"dob\": \"1980-05-10T00:00:00.000Z\",\n    \"emails\": [\n      {\n        \"type\": \"PRIMARY\",\n        \"address\": \"john.doe@example.com\"\n      },\n      {\n        \"type\": \"BUSINESS\",\n        \"address\": \"john.doe.business@example.com\"\n      }\n    ],\n    \"addresses\": [\n      {\n        \"type\": \"PRIMARY\",\n        \"postcode\": \"90210\",\n        \"state\": \"CA\",\n        \"city\": \"Beverly Hills\",\n        \"addressLine1\": \"123 Main Street\",\n        \"addressLine2\": \"Suite 456\",\n        \"country\": \"USA\"\n      }\n    ],\n    \"custom_field_1\": \"Value 1\",\n    \"custom_field_2\": \"Value 2\"\n  },\n  \"caseInfo\": {\n    \"category\": \"Technical Support\",\n    \"custom_case_description\": \"Issue with product X\"\n  },\n  \"taskInfo\": {\n    \"subject\": \"Follow up on customer issue\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://<tenant-url>/taskroutingapi/v1/task"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"taskId\": \"66bb3a68bf36507742b4c612\",\n    \"caseId\": \"66bb3a68bf36507742b4c611\",\n    \"contactId\": \"66bb3a68bf36507742b4c610\"\n}"}],"_postman_id":"8be2a1e4-2e0f-432f-8bdb-2ddc5b2e5313"},{"name":"Cancel Task","id":"0329041a-0851-496a-acb2-9170fefbbe3c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"note\":\"Cancelled per user request\",\n    \"dispositionName\":\"Abandoned\"\n}"},"url":"https://<tenant-url>/taskroutingapi/v1/task/:taskid/?external=Boolean","description":"<p>path変数で指定された<strong>taskId</strong>のタスクをキューから削除し、そのdispositionを<strong>dispositionName</strong>に設定します。タスクのキャンセルは、そのタスクがまだサービスキューまたはエージェントのパーソナルキュー内にある場合にのみ可能です。</p>\n<p><strong>external</strong> クエリパラメータを使用して、<strong>taskId</strong> が内部識別子か外部識別子かを指定してください。</p>\n<h3 id=\"リクエスト本文\">リクエスト本文</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>パラメータ</th>\n<th>説明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>note</td>\n<td>タスクのキャンセル時にタスクに追加されるオプションのメモです。このメモには、アクションの背景情報が記載されます。</td>\n</tr>\n<tr>\n<td>dispositionName</td>\n<td>キャンセルされたタスクに適用される処理結果の名前。終了の結果や理由を示します。既定は「<code>Abandoned</code>」です。</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"レスポンス本文のパラメータ\">レスポンス本文のパラメータ</h3>\n<p>なし</p>\n","urlObject":{"protocol":"https","path":["taskroutingapi","v1","task",":taskid",""],"host":["<tenant-url>"],"query":[{"description":{"content":"<p>パスで指定された <strong>taskId</strong> が、外部タスクID（CRM やその他の外部システムからのもの）であるか、それとも Bright Pattern Contact Center によって生成された内部タスクIDであるかを示します。</p>\n","type":"text/plain"},"key":"external","value":"Boolean"}],"variable":[{"description":{"content":"<p><strong>external</strong> クエリパラメータで指定されたとおり、内部または外部のいずれかのIDを使用して、キャンセルするタスクを特定します。</p>\n","type":"text/plain"},"type":"any","value":"String (task ID)","key":"taskid"}]}},"response":[{"id":"cd42b563-8c94-48cb-a3ce-d8d31d471b62","name":"Cancel Task","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer E9C97B84D0F72C08A1B31916A1646B91618F63F146CC3694CD2523B63F732363","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"note\":\"Cancelled per user request\",\n    \"dispositionName\":\"Abandoned\"\n}"},"url":{"raw":"https://<tenant-url>/taskroutingapi/v1/task/:taskid/?external=false","protocol":"https","host":["<tenant-url>"],"path":["taskroutingapi","v1","task",":taskid",""],"query":[{"key":"external","value":"false"}],"variable":[{"key":"taskid","value":"{{task_id}}"}]}},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Server","value":"nginx/1.25.4"},{"key":"Date","value":"Fri, 22 Mar 2024 16:11:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, PUT"},{"key":"Access-Control-Allow-Headers","value":"Content-Type"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"0329041a-0851-496a-acb2-9170fefbbe3c"},{"name":"Cancel Service Tasks","id":"13a85ca3-0530-4054-9417-5d42dc2ba804","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"note\":\"This service is no longer being offered.\",\n    \"serviceName\":\"Example Service\",\n    \"dispositionName\":\"Abandoned\"\n}"},"url":"https://<tenant-url>/taskroutingapi/v1/service","description":"<p><strong>serviceName</strong> で指定されたサービスに関連付けられている、現在キューに登録されているすべてのタスクをキャンセルします。<strong>dispositionName</strong> で指定された処理結果と、<strong>note</strong> で指定された注記が、キャンセルされた各タスクに適用されます。</p>\n<h3 id=\"リクエスト本文\">リクエスト本文</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>パラメータ</th>\n<th>説明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>serviceName</td>\n<td>関連するすべてのキュー内のタスクをキャンセルするサービスの名前です。</td>\n</tr>\n<tr>\n<td>note</td>\n<td>各タスクがキャンセルされる際に追加される、オプションのメモです。</td>\n</tr>\n<tr>\n<td>dispositionName</td>\n<td>キャンセルされた各タスクに適用する処理結果の名前です。</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"レスポンス本文\">レスポンス本文</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>パラメータ</th>\n<th>説明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>count</td>\n<td>この操作によってキャンセルされたタスクの数です。</td>\n</tr>\n<tr>\n<td>taskIds</td>\n<td>キャンセルされた各タスクの <code>extTaskId</code> および <code>taskId</code> を示すオブジェクトの配列です。</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["taskroutingapi","v1","service"],"host":["<tenant-url>"],"query":[],"variable":[]}},"response":[{"id":"e0075bd4-0efe-438b-a1a3-3711ebf5f1c1","name":"Cancel Service Tasks","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer E9C97B84D0F72C08A1B31916A1646B91618F63F146CC3694CD2523B63F732363","type":"text"}],"body":{"mode":"raw","raw":"{\n\"note\":\"Example service will no longer be provided.\",\n\"serviceName\":\"Example service\",\n\"dispositionName\":\"Abandoned\"\n}\n","options":{"raw":{"language":"json"}}},"url":"https://<tenant-url>/taskroutingapi/v1/service"},"status":"No Content","code":204,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.25.4"},{"key":"Date","value":"Fri, 22 Mar 2024 16:11:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, PUT"},{"key":"Access-Control-Allow-Headers","value":"Content-Type"},{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"count\": 2,\n    \"taskIds\": [\n        {\n            \"extTaskId\": \"12345\",\n            \"taskId\": \"5432321\"\n        },\n        {\n            \"extTaskId\": \"12346\",\n            \"taskId\": \"5432322\"\n        }\n    ]\n}"}],"_postman_id":"13a85ca3-0530-4054-9417-5d42dc2ba804"},{"name":"Update Task","id":"ef3caf84-ba4d-4bb2-ab31-2db4b33c891f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"priority\": 100,\n\t\"serviceName\": \"New service\"\n}\n"},"url":"https://<tenant-url>/taskroutingapi/v1/task/:taskid?external=Boolean","description":"<p><strong>taskID</strong> パス変数で指定されたキュー内のタスクの優先度または関連するサービスを修正します。</p>\n<p><strong>external</strong> クエリパラメータを使用して、<strong>taskId</strong> が内部識別子か外部識別子かを指定します。</p>\n<h3 id=\"request-body\">Request Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>serviceName</td>\n<td>タスクを移動する先のサービスの名前です。現在のサービスと異なる場合、タスクは新しいサービスに再キューイングされます。</td>\n</tr>\n<tr>\n<td>priority</td>\n<td>タスクの新規優先度です。これは、<code>lifo</code> の優先順位でルーティングされるタスクにのみ適用されます。</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"body-parameters\">Body Parameters</h3>\n<p>なし</p>\n","urlObject":{"protocol":"https","path":["taskroutingapi","v1","task",":taskid"],"host":["<tenant-url>"],"query":[{"description":{"content":"<p>パスで指定された <strong>taskId</strong> が、外部タスク ID（CRM やその他の外部システムからのもの）であるか、それとも Bright Pattern Contact Center によって生成された内部タスク ID であるかを示します。</p>\n","type":"text/plain"},"key":"external","value":"Boolean"}],"variable":[{"description":{"content":"<p><strong>external</strong> クエリパラメータで指定された内部識別子または外部識別子のいずれかを使用して、キャンセルするタスクを特定します。</p>\n","type":"text/plain"},"type":"any","value":"String (task ID)","key":"taskid"}]}},"response":[{"id":"c9feeab6-929f-4972-a716-b65b56581bee","name":"Update Task","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer E9C97B84D0F72C08A1B31916A1646B91618F63F146CC3694CD2523B63F732363","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"priority\": 100,\n\t\"serviceName\": \"TaskService\"\n}\n"},"url":{"raw":"https://<tenant-url>/taskroutingapi/v1/task/:taskid?external=false","protocol":"https","host":["<tenant-url>"],"path":["taskroutingapi","v1","task",":taskid"],"query":[{"key":"external","value":"false"}],"variable":[{"key":"taskid","value":"{{taskId}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Server","value":"nginx/1.21.0"},{"key":"Date","value":"Mon, 11 Dec 2023 19:28:49 GMT"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, PUT"},{"key":"Access-Control-Allow-Headers","value":"Content-Type"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"ef3caf84-ba4d-4bb2-ab31-2db4b33c891f"},{"name":"Query Task","id":"546ba1cd-57ec-408f-85fa-d1068af9fdbd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://<tenant-url>/taskroutingapi/v1/task/:taskid/?external=Boolean","description":"<p>path変数の <strong>taskId</strong> で指定されたタスクに関する情報を取得します。</p>\n<p><strong>external</strong> クエリパラメータを使用して、<strong>taskId</strong> が内部識別子か外部識別子かを指定してください。</p>\n<h3 id=\"リクエスト本文\">リクエスト本文</h3>\n<p>なし</p>\n<h3 id=\"レスポンス本文\">レスポンス本文</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>taskStatus</td>\n<td>タスクの現在のステータス（CREATED、QUEUED、DEFERRED、COMPLETED）。</td>\n</tr>\n<tr>\n<td>serviceName</td>\n<td>タスクが関連付けられているサービスの名前。</td>\n</tr>\n<tr>\n<td>priority</td>\n<td>タスクのキューの優先度。</td>\n</tr>\n<tr>\n<td>order</td>\n<td>タスクのキュー順序（FIFO/LIFO）。</td>\n</tr>\n<tr>\n<td>dispositionName</td>\n<td>完了したタスクの対話結果名。タスクがまだキューに入っている場合は空です。</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["taskroutingapi","v1","task",":taskid",""],"host":["<tenant-url>"],"query":[{"description":{"content":"<p>パスで指定された <strong>taskId</strong> が、外部タスクID（CRMやその他の外部システムからのもの）であるか、それともBright Pattern Contact Centerによって生成された内部タスクIDであるかを示します。</p>\n","type":"text/plain"},"key":"external","value":"Boolean"}],"variable":[{"description":{"content":"<p><strong>external</strong> クエリパラメータで指定された内部識別子または外部識別子のいずれかを使用して、キャンセルするタスクを特定します。</p>\n","type":"text/plain"},"type":"any","value":"String (task ID)","key":"taskid"}]}},"response":[{"id":"973c2f7e-1e6f-4bdb-8bc6-0fa1ae325816","name":"Query Task","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer E9C97B84D0F72C08A1B31916A1646B91618F63F146CC3694CD2523B63F732363","type":"text"}],"url":{"raw":"https://<tenant-url>/taskroutingapi/v1/task/:taskid/?external=false","protocol":"https","host":["<tenant-url>"],"path":["taskroutingapi","v1","task",":taskid",""],"query":[{"key":"external","value":"false"}],"variable":[{"key":"taskid","value":"65736beabae70b588348f2b5","description":"CRM task ID. Treated as internal by default."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.21.0"},{"key":"Date","value":"Mon, 11 Dec 2023 14:38:39 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"79"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, PUT"},{"key":"Access-Control-Allow-Headers","value":"Content-Type"}],"cookie":[],"responseTime":null,"body":"{\n\t\"taskStatus\": \"DEFERRED\",\n    \"priority\": 5,\n\t\"serviceName\": \"New Task Processing Service\",\n\t\"order\": \"fifo\",\n\t\"dispositionName\":\"Abandoned\"\n}\n"}],"_postman_id":"546ba1cd-57ec-408f-85fa-d1068af9fdbd"}],"id":"47c01fe5-cb05-4345-9ce8-4dad865dbd60","description":"<p>以下の方法により、Bright Pattern Contact Center 内のタスクをキューに入れ、キャンセルし、更新し、照会することができます。</p>\n","_postman_id":"47c01fe5-cb05-4345-9ce8-4dad865dbd60"},{"name":"エラーコード","item":[],"id":"8c7861a1-5405-48c0-95a7-547109afd8c1","description":"<p>Task Routing API では、以下のいずれかのエラーコードが返される可能性があります。</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Code</strong></th>\n<th><strong>Text</strong></th>\n<th><strong>HTTP response</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0</td>\n<td>Success</td>\n<td>200 OK</td>\n<td></td>\n</tr>\n<tr>\n<td>1</td>\n<td>Authentication failed</td>\n<td>401 Unauthorized</td>\n<td>Authorization ヘッダーが欠落しているか、指定されたアクセストークンが存在しません。</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Access token expired</td>\n<td>401 Unauthorized</td>\n<td>アクセストークンは有効（存在）ですが、期限切れです。クライアントは新規のアクセストークンをリクエストする必要があります。</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Privilege not granted</td>\n<td>403 Forbidden</td>\n<td>アクセストークンは有効ですが、そのトークンが付与されたユーザーには、必須の <em>Use Task Routing API</em> 権限がありません。</td>\n</tr>\n<tr>\n<td>4</td>\n<td>Missing parameter(s) [param_name]</td>\n<td>400 Bad Request</td>\n<td>必須のパラメータが欠落しています。欠落しているパラメータ名のリストがテキストに含まれています。</td>\n</tr>\n<tr>\n<td>5</td>\n<td>Task is or already was in the queue</td>\n<td>400 Bad Request</td>\n<td>タスクの重複 - 同じ id を持つタスクが過去にキューに入れられていました。</td>\n</tr>\n<tr>\n<td>6</td>\n<td>Service not found or invalid</td>\n<td>400 Bad Request</td>\n<td>指定されたサービスが存在しないか、\"Task\" タイプではありません。</td>\n</tr>\n<tr>\n<td>7</td>\n<td>Disposition not found</td>\n<td>400 Bad Request</td>\n<td>指定された disposition が存在しません。</td>\n</tr>\n<tr>\n<td>8</td>\n<td>Task not found</td>\n<td>404 Not Found</td>\n<td>指定されたタスクが見つからないか、キューに登録されていません。</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Task not in queue</td>\n<td>400 Bad Request</td>\n<td>指定されたタスクは存在しますが、キューにはありません（すでにルーティング済み、またはキャンセル済みです）。</td>\n</tr>\n<tr>\n<td>10</td>\n<td>Task already routed to an agent</td>\n<td>400 Bad Request</td>\n<td>タスクはキューに入れられましたが、すでにルーティングされています。ルーティングをキャンセルできません。</td>\n</tr>\n<tr>\n<td>11</td>\n<td>No servers available</td>\n<td>502 bad gateway</td>\n<td>リクエストを処理するアクティブなサーバーが見つかりませんでした（すべてのアクティビティサーバーがダウンしているか、すべての CRM サーバーがダウンしているか、CRM サーバーからの応答が無効です）。</td>\n</tr>\n<tr>\n<td>12</td>\n<td>API limit exceeded</td>\n<td>429 Too Many Requests</td>\n<td>API 制限を超過しました。</td>\n</tr>\n<tr>\n<td>13</td>\n<td>Internal server error</td>\n<td>500 Internal server error</td>\n<td>データベース例外が発生しました。</td>\n</tr>\n<tr>\n<td>14</td>\n<td>Feature not enabled</td>\n<td>403 Forbidden</td>\n<td>テナントに対してこの機能が有効になっていません。</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"8c7861a1-5405-48c0-95a7-547109afd8c1"}],"event":[{"listen":"prerequest","script":{"id":"7af1b467-d52c-450c-93ec-95d7384fe200","type":"text/javascript","exec":["const echoPostRequest = {","  url: \"https://\" + pm.environment.get(\"tenant_url\") + \"/configapi/v2/oauth/token\",","  method: 'POST',","  header: {","    'Accept': '*/*',","    'Content-Type': 'application/x-www-form-urlencoded',","  },","  body: {","    mode: 'urlencoded',","    urlencoded : [","      { key: 'client_id', value: pm.environment.get(\"client_id\")},","      { key: 'client_secret', value: pm.environment.get(\"client_secret\")},","      { key: 'scope', value: pm.environment.get(\"scope\")},","      { key: 'grant_type', value: \"client_credentials\"},","    ]","  }","};","","var getToken = true;","","if (!pm.environment.get('accessTokenExpiry') || ","    !pm.environment.get('currentAccessToken')) {","    console.log('Token or expiry date are missing')","} else if (pm.environment.get('accessTokenExpiry') <= (new Date()).getTime()) {","    console.log('Token is expired')","} else {","    getToken = false;","    console.log('Token and expiry date are all good');","}","","if (getToken === true) {","    pm.sendRequest(echoPostRequest, function (err, res) {","    console.log(err ? err : res.json());","        if (err === null) {","            console.log('Saving the token and expiry date')","            var responseJson = res.json();","            pm.environment.set('currentAccessToken', responseJson.access_token)","    ","            var expiryDate = new Date();","            //console.log(\"expiry date: \",expiryDate)","            //console.log(\"expiry seconds: \", responseJson['expires_in'])","            expiryDate.setSeconds(expiryDate.getSeconds() + Number(responseJson['expires_in']));","            //console.log(\"new expiry date: \", expiryDate)","            pm.environment.set('accessTokenExpiry', expiryDate.getTime());","","        }","    });","}"]}},{"listen":"test","script":{"id":"519e558a-fe67-4aeb-9ffb-c7be21c2efbc","type":"text/javascript","exec":[""]}}],"variable":[{"key":"tenant_url","value":"boromir.bugfocus.com"},{"key":"client_id","value":"User01","type":"string"},{"key":"clientSecret","value":"huuw8tbDgk9tX0r6C4rZfpa6kzCHP4oOZmtP7E3DG5d8yaaGC75Ux0Lb7dkngpAg","type":"string"},{"key":"scope","value":"","type":"string"},{"key":"currentAccessToken","value":"","type":"string"},{"key":"accessTokenExpiry","value":"","type":"string"},{"key":"client_credentials","value":"client_credentials"}]}