# ServiceNow - インシデント管理コネクターシンクレット

ServiceNowのインシデント管理コネクタのシンクレットを構成して、ワークフロー内で特定のアクションを実行します。

## 操作: インシデントに影響を受けている構成アイテムを追加 <a href="#servicenow-incidentmanagement-action-createincident" id="servicenow-incidentmanagement-action-createincident"></a>

**影響を受けた構成アイテムをインシデントに追加** は、インシデントチケットの影響を受けたCIタブにタスクエントリを追加します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPOST](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-POST) API エンドポイントに依存しています。

<figure><img src="/files/UtDIPAwJIvK7r7m7aIyO" alt="" width="301"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するエントリーパラメーターを設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータのマッピング方法と必要なデータについての詳細情報が表示されます。
  * **インシデント番号またはID**
  * **影響を受けている構成アイテム名またはID**
* **出力**: コネクタThinkletの出力を表示します。
  * **タスク構成アイテムレコードID** (`TaskCIRecordID`)

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th>フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td>api/now/table/task_ci</td><td></td></tr><tr><td>メソッド</td><td>POST</td><td></td></tr><tr><td>ペイロード</td><td><code>{"ci_item": "{{AffectedConfigurationItemRefernce}}","task": "{{IncidentReference}}"}</code></td><td></td></tr><tr><td>出力</td><td>タスクレコードID: <code>$.result.sys_id</code></td><td></td></tr></tbody></table>

## 操作: インシデント作業ノートを追加 <a href="#servicenow-incidentmanagement-action-addincidentworknote" id="servicenow-incidentmanagement-action-addincidentworknote"></a>

**インシデント作業メモを追加** は、インシデントチケットに作業メモを追加します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPATCH](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.md#title_table-patch) APIエンドポイントに依存しています。

<figure><img src="/files/s4X4fF7gniG7eTy2gBk5" alt="image-20240604-120125.png" width="375"><figcaption></figcaption></figure>

* **名前**: コネクタThinklet用の一意な名前を入力します。
* **ID**: システムは名前に基づいてIDを自動的に生成します。
* **説明（オプション）**: コネクタThinkletの目的とその働きを説明してください。 この情報は、これを知らない他のワークフローユーザーにとって有用です。
* **操作を選択**: 実行する操作を選択してください。
* **資格情報**: 統合用の接続資格情報を選択してください。 まず、Administtrationモジュールのコネクタ資格情報ページでそれらを設定してください。 詳細については、[コネクタ認証情報](/platform/ja/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/outbound-connectors/connector-credentials.md) に関するドキュメントを参照してください。
* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメーターがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **ServiceNowチケットID**: ServiceNowチケットを追跡するための識別
  * **デバイス名**: デバイスの名前
  * **作業ノート**: インシデント用に入力された作業ノートのテキスト
* **出力**: コネクタThinkletの出力を表示します。

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="202">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>/api/now/table/incident/{{ServiceNowTicketID}}</code></td><td></td></tr><tr><td>メソッド</td><td>PATCH</td><td></td></tr><tr><td>ペイロード</td><td><code>{"work_notes":"Device Name: {{DeviceName}}, {{WorkNote}}"}</code></td><td></td></tr><tr><td>出力</td><td>-</td><td></td></tr></tbody></table>

## 操作: インシデントの割り当てグループを変更 <a href="#servicenow-incidentmanagement-action-createincident" id="servicenow-incidentmanagement-action-createincident"></a>

**インシデント割り当てグループの変更** は、入力パラメータで提供される値に従って、インシデントチケットの割り当てグループフィールドを更新します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPOST](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-POST) API エンドポイントに依存しています。

<figure><img src="/files/Uh1XiDhhPVwXBflMde2o" alt="" width="291"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **ServiceNowチケットID**
  * **ユーザーグループ名**

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="237">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>api/now/table/incident/{{ServiceNowTicketID}}</code></td><td></td></tr><tr><td>メソッド</td><td>PATCH</td><td></td></tr><tr><td>ペイロード</td><td><code>{"assignment_group":"{{UserGroupName}}"}</code></td><td></td></tr><tr><td>出力</td><td></td><td></td></tr></tbody></table>

## 操作: インシデントを作成 <a href="#servicenow-incidentmanagement-action-createincident" id="servicenow-incidentmanagement-action-createincident"></a>

**インシデントを作成** は、新しいServiceNowインシデントチケットを作成します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPOST](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-POST) API エンドポイントに依存しています。

<figure><img src="/files/uYile5wKIhAZt6rHBht5" alt="image-20240604-114738.png" width="375"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **デバイス名**: デバイスの名前
  * **ServiceNow割り当てグループ**: インシデントのために設定されている割り当てグループ
  * **ビジネスサービス**: インシデントのために設定されているビジネスサービス
  * **通報者**: インシデントのために設定されている通報者
  * **説明**: インシデントのために設定される説明
  * **影響**: インシデントの影響レベル 1- 高、2- 中、3- 低
  * **簡単な説明**: インシデントのために設定される簡単な説明
  * **緊急度**: インシデントの緊急度, 1- 高, 2- 中, 3- 低
* **出力**: コネクタThinkletの出力を表示します。
  * **ServiceNowチケットID** (`ServiceNowTicketID`): ServiceNowチケットID

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="237">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>/api/now/table/incident</code></td><td></td></tr><tr><td>メソッド</td><td>POST</td><td></td></tr><tr><td>ペイロード</td><td><code>{"assignment_group": "{{ServiceNowAssignmentGroup}}", "business_service": "{{BusinessService}}","caller_id": "{{Caller}}","description": "{{Description}}","impact": "{{Impact}}","short_description": "{{ShortDescription}}","urgency": "{{Urgency}}", "cmdb_ci": "{{DeviceName}}"}</code></td><td></td></tr><tr><td>出力</td><td>ServiceNowチケットID: <code>$.result.sys_id</code></td><td></td></tr></tbody></table>

## 操作: ユーザーグループの詳細を名前で取得 <a href="#servicenow-incidentmanagement-action-createincident" id="servicenow-incidentmanagement-action-createincident"></a>

**ユーザーグループの詳細を名前で取得** は、グループ名を検索基準として使用してグループの詳細を取得します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPOST](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-POST) API エンドポイントに依存しています。

<figure><img src="/files/mX6FFVnmlGdhUykPdpJi" alt="" width="375"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **ユーザーグループ名**: グループの名前
* **出力**: コネクタThinkletの出力を表示します。
  * **グループID** (`GroupID`)
  * **デフォルト担当者** (`DefaultAssignee`)
  * **グループメールアドレス** (`GroupEmailAddress`)
  * **グループ管理者ID** (`GroupManagerID`)
  * **グループ状態** (`GroupStatus`): グループがアクティブかどうか - *true* または *false*

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="237">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>api/now/table/sys_user_group?sysparm_query=name={{UserGroupName}}</code></td><td></td></tr><tr><td>メソッド</td><td>GET</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td><p><code>GroupStatus $.result[0].active</code></p><p><code>DefaultAssignee $.result[0].default_assignee</code></p><p><code>GroupEmailAddress $.result[0].email</code></p><p><code>GroupManagerID $.result[0].manager.value</code></p></td><td></td></tr></tbody></table>

## 操作: インシデントを解決 <a href="#servicenow-incidentmanagement-action-resolveincident" id="servicenow-incidentmanagement-action-resolveincident"></a>

**インシデントを解決** は、インシデントチケットの状態を**解決済み**に変更し、解決コードと解決メモを更新します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPATCH](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.md#title_table-patch) API エンドポイントに依存しています。

<figure><img src="/files/rENCl9TSjYIr9vCcNDNM" alt="image-20240604-121433.png" width="375"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **ServiceNowチケットID**
  * **解決ノート**: 解決の説明
  * **解決コード**: チケットに記載される解決コード、例: 完全解決

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="237">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>/api/now/table/incident/{{ServiceNowTicketID}}</code></td><td></td></tr><tr><td>メソッド</td><td>PATCH</td><td></td></tr><tr><td>ペイロード</td><td><code>{"state":"6","close_code":"{{CloseCode}}","close_notes":"{{CloseNotes}}"}</code></td><td></td></tr><tr><td>出力</td><td></td><td></td></tr></tbody></table>

## 操作: インシデントを検索 <a href="#servicenow-incidentmanagement-action-createincident" id="servicenow-incidentmanagement-action-createincident"></a>

**インシデントを検索** は、検索文字列を検索基準として使用して、既存のインシデントチケットを検索します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPOST](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-POST) APIエンドポイントに依存しています。

<figure><img src="/files/nojtWmfk3ankqVUUtRu4" alt="" width="375"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **検索クエリ**: 結果をフィルタリングするために使用されるエンコードされたクエリ文字列
* **出力**: コネクタThinkletの出力を表示します。
  * **ServiceNowチケットID** (`ServiceNowTicketID`)
  * **ServiceNowチケット番号** (`ServiceNowTicketNumber`)
  * **作成日** (`SysCreatedOn`)
  * **IDで開かれた** (`OpenedByID`)
  * **作成者** (`CreatedBy`)
  * **更新日** (`UpdatedOn`)
  * **更新者** (`UpdatedBy`)
  * **通報者ID** (`CallerID`)
  * **状態** (`State`)
  * **インシデント状態** (`IncidentState`)
  * **保留理由** (`HoldReason`)
  * **解決者** (`ResolvedBy`)
  * **CMDB CI ID** (`CmdbCi`): 構成管理データベース (CMDB) 構成アイテム (CI) ID
  * **ビジネスサービスID** (`Business service ID`)
  * **影響** (`Impact`)
  * **ビジネス影響** (`BusinessImpact`)
  * **重大度** (`Severity`)
  * **優先度** (`Priority`)
  * **簡単な説明** (`ShortDescription`)
  * **解決日時** (`ResolvedAt`)
  * **再開時間** (`ReopenedTime`)
  * **クローズコード** (`CloseCode`)
  * **割り当てグループID** (`AssignmentGroupID`)
  * **チケットクラス名** (`TicketClassName`)
  * **クローズ担当者** (`ClosedBy`)
  * **担当ID** (`AssignedToID`)
  * **SLA期限** (`SlaDue`)
  * **期限日** (`DueDate`)
  * **カテゴリー** (`Category`)

以下の例の検索文字列は、ワークフローユーザーによって作成されたインシデントチケットを取得します。 閉じた、解決済み、キャンセルされたステータスのインシデントを除外し、短い説明に `workflow_name` が含まれているものだけを含め、取得するレコードの数に制限を適用します。

<details>

<summary>入力パラメーターの例の検索文字列</summary>

```
state!=6^state!=7^state!=8^sys_created_by={{global.nexthink_workflow_user}}^short_descriptionLIKEworkflow_name&sysparm_limit=1
```

</details>

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="237">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>api/now/table/incident?sysparm_query={{SearchQuery}}</code></td><td></td></tr><tr><td>メソッド</td><td>GET</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td><p><code>AssignedToID $.result[0].assigned_to.value</code></p><p><code>AssignmentGroupID $.result[0].assignment_group.value BusinessImpact $.result[0].business_impact</code></p><p><code>Business service ID $.result[0].business_service.value</code></p><p><code>CallerID $.result[0].caller_id.value</code></p><p><code>Category $.result[0].category</code></p><p><code>CloseCode $.result[0].close_code</code></p><p><code>ClosedBy $.result[0].closed_by</code></p><p><code>CmdbCi $.result[0].cmdb_ci.value</code></p><p><code>DueDate $.result[0].due_date</code></p><p><code>HoldReason $.result[0].hold_reason</code></p><p><code>Impact $.result[0].impact Incident</code></p><p><code>State $.result[0].incident_state</code></p><p><code>ServiceNowチケット番号 $.result[0].number</code></p><p><code>OpenedByID $.result[0].opened_by.value Priority $.result[0].priority</code></p><p><code>ReopenedTime $.result[0].reopened_time</code></p><p><code>ResolvedAt $.result[0].resolved_at</code></p><p><code>ResolvedBy $.result[0].resolved_by</code></p><p><code>Severity $.result[0].severity</code></p><p><code>ShortDescription $.result[0].short_description</code></p><p><code>SlaDue $.result[0].sla_due</code></p><p><code>State $.result[0].state</code></p><p><code>TicketClassName $.result[0].sys_class_name</code></p></td><td></td></tr></tbody></table>

## 操作: インシデント状態を設定 <a href="#servicenow-incidentmanagement-action-setincidentstate" id="servicenow-incidentmanagement-action-setincidentstate"></a>

**インシデント状態を設定する**は、インシデントチケットの**状態コード**を次のいずれかに変更します: 1- 新規、2- 進行中、7- 閉じた、8- キャンセル済み

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPATCH](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.md#title_table-patch) APIエンドポイントに依存しています。

<figure><img src="/files/hQadK29uKrMfKlRruZR0" alt="image-20240604-122044.png" width="375"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **ServiceNowチケットID**
  * **状態コード**: 1- 新規, 2- 進行中, 7- 閉じた, 8- キャンセル済み

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="237">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>api/now/table/incident/{{ServiceNowTicketID}}</code></td><td></td></tr><tr><td>メソッド</td><td>PATCH</td><td></td></tr><tr><td>ペイロード</td><td><code>{"incident_state":"{{StateCode}}"}</code></td><td></td></tr><tr><td>出力</td><td></td><td></td></tr></tbody></table>

## 操作: インシデントを保留に設定 <a href="#servicenow-incidentmanagement-action-setincidentonhold" id="servicenow-incidentmanagement-action-setincidentonhold"></a>

**インシデントを保留に設定** は、インシデントチケットを**保留**に設定し、**保留理由**を更新します。

ServiceNow - インシデント管理コネクタThinkletは、[テーブルインシデントPATCH](https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.md#title_table-patch) APIエンドポイントに依存しています。

<figure><img src="/files/YLySkW3lZ64eMJXohE4Z" alt="image-20240604-122509.png" width="375"><figcaption></figcaption></figure>

* **パラメーター**: この操作に使用するデータをパラメーターとして設定します。 ツールチップアイコンにカーソルを合わせることで、パラメータがどのようにマッピングされ、どのデータが必要かについての詳細情報が表示されます。
  * **ServiceNowチケットID**
  * **保留理由**: 1- 呼び出し待ち, 2- 証拠待ち, 3- 問題待ち, 4- ベンダー待ち, 5- 変更待ち

以下の表は、コネクタを再作成する際に必要なAPIサービスコネクタの詳細を示しています。

<table><thead><tr><th width="237">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>api/now/table/incident/{{ServiceNowTicketID}}</code></td><td></td></tr><tr><td>メソッド</td><td>PATCH</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td></td><td></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexthink.com/platform/ja/user-guide/workflows/creating-workflows/configuring-connector-thinklet/servicenow-incident-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
