ケース要求を送信する外部システム

  • リリースバージョン: Yokohama
  • 更新日 2025年01月30日
  • 所要時間:4分
  • このユースケースでは、 ServiceNow ファイナンシャルサービスオペレーション (FSO) 製品が、オンラインバンキングアプリケーションやモバイルバンキングアプリケーション、コアバンキングシステム、その他の CRM ツールなどの外部システムからケース要求を受信する方法を示します。

    REST API 呼び出しを処理できるシステムであれば、このシナリオを実装して FSO に顧客ケースを作成できます。このシナリオでは、[コンシューマー]、[金融口座]、[カテゴリ]、[簡単な説明]、および [メモ] の各フィールドが外部システムから送信されます。

    外部システムからの要求を示す FSO ケースフロー。

    このシナリオでアクセスされるテーブルは、ローンサービスケース [sn_bom_loan_service] です。

    次の図は、このシナリオでの REST API 呼び出しのフローを示し、処理に関する簡単な説明を示しています。

    フロー図は、エージェントがローンケースレコードを作成する方法と、処理のためのさまざまな REST API 呼び出しのフローを示しています。ケース。
    1. 銀行アプリケーションで、ローンケースレコードの作成に必要な情報を定義し、ServiceNow インスタンスで POST /now/table/{table_Name} REST エンドポイントを呼び出します。
    2. テーブル API は、投稿された情報をローンサービスケース [sn_bom_loan_service] テーブルに書き込もうとします。
    3. Table API は POST 要求の結果を返します。

    コード例

    次に、必要な REST API 呼び出し情報を生成し、 ServiceNow インスタンスに POST 要求を送信する JavaScript の例を示します。
    // Construct the REST call to POST the creation of the loan service case on the ServiceNow instance
    // 
    function createRecord(tableName, requestBody) {
    
      var client = new XMLHttpRequest();
      client.open('post', 'http://<instance.servicenow.com>/api/now/tableName);
      client.setRequestHeader('Accept', 'application/json');
      client.setRequestHeader('Content-Type', 'application/json');
    
      client.onreadystatechange = function() {
        if (this.readyState == this.DONE) {
          console.log(this.status + this.response);
        }
      };
    
      client.send(JSON.stringify(requestBody)); // Send the POST request to the ServiceNow instance
    }
    
    // Create the requestBody object to send to the Table API to create the loan service case.
    // This is the typical minimum data that should be passed. You can write to any of the record fields except those
    // starting with 'sys_' - these are system generated read-only fields.
    
    var tableName = ‘sn_bom_loan_service’;
    var requestBody = {
      'consumer': '8938984kljhkhg34j5689903498u5',  // Sys_id of the associated consumer
      'sold_product': '9590349760hkjhi3450983405033', // Sys_id of the customer loan account. 
      'assignment_group': '5469813sae32135s5d55d5d6s6sdd',  // Sys_id of the group to assign the case to
      'contact_type': 'web',  // Communication method used by customer to contact agent
      'product': '54666s6s46s6d6e4116b1f3rgt',  // Sys_id of the product model of the asset associated to the case.
      'service_definition': '989300jfkh8403jf87uj3h9-03i984n4', // Sys_id of the definition of service associated with this account. 
      'short_description': 'Request for loan forgiveness' // Short description for the loan case
    };
    
    createRecord(tableName, requestBody);