케이스 요청을 제출하는 외부 시스템

  • 릴리스 버전: Australia
  • 업데이트 날짜 2025년 07월 31일
  • 소요 시간: 4분
  • 이 사용 사례에서는 (FSO) 제품이 온라인 또는 모바일 뱅킹 애플리케이션, 핵심 뱅킹 시스템 또는 기타 CRM 도구와 같은 외부 시스템에서 케이스 요청을 수신하는 방법을 ServiceNow 재무 서비스 운영 보여줍니다.

    REST API 호출을 처리할 수 있는 모든 시스템은 이 시나리오를 구현하여 FSO에서 고객 케이스를 만들 수 있습니다. 이 시나리오에서는 소비자, 금융 계좌, 범주, 짧은 설명 및 메모 필드가 외부 시스템에서 전송됩니다.

    이 시나리오에서 액세스하는 테이블은 대출 서비스 케이스 [sn_bom_loan_service]입니다.

    다음 다이어그램은 이 시나리오에 대한 REST API 호출의 플로우를 보여주고 처리에 대한 간략한 설명을 제공합니다.

    1. 은행 애플리케이션에서 대출 케이스 기록을 생성하는 데 필요한 정보를 정의한 다음 인스턴스에서 ServiceNowPOST /now/table/{table_Name} REST 엔드포인트를 호출합니다.
    2. 테이블 API는 게시된 정보를 대출 서비스 케이스 [sn_bom_loan_service] 테이블에 기록하려고 시도합니다.
    3. 테이블 API는 POST 요청의 결과를 반환합니다.

    코드 예시

    다음은 필요한 REST API 호출 정보를 생성한 다음 POST 요청을 인스턴스로 보내는 ServiceNow 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);