---
sourceDocument: Xanadu IT Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/it-service-management

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# ライブエージェントスクリプトインクルードの更新

# ライブエージェントスクリプトインクルードの更新 {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：3分

ライブエージェント構成は、自己解決転送 (KB 記事を使用した転送、QnA AIS を使用した転送、QnA LLM を使用した転送、および ITSM VA を使用した転送) で使用されます。これらの転送を構成する際、ライブエージェントスクリプトインクルードを更新する必要があります。SSADeflectionHelper スクリプトを更新して <var class="keyword varname">checkInteraction</var> 関数をオーバーライドします。

## 始める前に

必要なロール：admin

## このタスクについて

エージェントのインタラクションでは、インタラクションが仮想エージェントのインタラクションを経由しません。インタラクションは、ウォークアップエクスペリエンス、電話、ビデオ、またはライブエージェントを経由して行うことができます。ベースシステムのインスツルメンテーションは、従業員が記事を読んだり仮想エージェントとやり取りしたりした後にインシデントを作成したかどうかや、エージェントとやり取りしたかどうかを確認します。

SSADeflectionHelper スクリプトは、チェックインタラクション関数をオーバーライドし、ライブエージェントのインタラクションの設定を支援します。

## 手順

1. \[すべて\]\[システム定義\]\[スクリプトインクルード\] に移動します。
2. SSADeflectionHelper スクリプトインクルードを開いて、スクリプトを次のとおりに変更します。  
   1. SSADeflectionHelperSNC から関数 <var class="keyword varname">checkInteraction</var> をオーバーライドします

          checkInteraction: function(openedFor, windowStart, windowEnd) {
                  var interactionRecord = new GlideRecord('interaction');
                  // Pulling Virtual Agent User sysId from com.glide.cs.va.sys_user property
                  var vaUser = gs.getProperty('com.glide.cs.va.sys_user');
                  var windowConditions = 'opened_for=' + openedFor + '^sys_created_on>=' + windowStart + '^sys_created_on<=' + windowEnd;
                  var interactionConditions = 'virtual_agent!=true^ORstateINon_hold,closed_abandoned^ORsys_created_by=system^ORopened_for.web_service_access_only!=false^opened_for.web_service_access_onlyISNOTEMPTY^ORopened_for.internal_integration_user!=false^opened_for.internal_integration_userISNOTEMPTY^assigned_to!=' + vaUser + '^ORassigned_to=NULL';
                  var encodedQuery = windowConditions + '^' + interactionConditions;
                  interactionRecord.addEncodedQuery(encodedQuery);
                  interactionRecord.setLimit(1);
                  interactionRecord.query();
                  if (interactionRecord.next()) {
                      return true;
                  }
                  return false;
              },

   2. 次の行を更新して、ライブエージェントのインタラクション条件を更新します。

          var interactionConditions = 'virtual_agent!=true^ORstateINon_hold,closed_abandoned^ORsys_created_by=system^ORopened_for.web_service_access_only!=false^opened_for.web_service_access_onlyISNOTEMPTY^ORopened_for.internal_integration_user!=false^opened_for.internal_integration_userISNOTEMPTY^assigned_to!=' + vaUser + '^ORassigned_to=NULL';

   {#update-live-agent-script-include__ol_nsq_zy1_4v}

