케이스 요청을 제출하는 외부 시스템
이 유스 케이스는 (FSO) 제품이 온라인 또는 모바일 뱅킹 애플리케이션, 코어 뱅킹 시스템 또는 기타 CRM 도구와 같은 외부 시스템에서 케이스 요청을 수신할 수 있는 방법을 ServiceNow 재무 서비스 운영 보여줍니다.
REST API 호출을 처리할 수 있는 모든 시스템은 이 시나리오를 구현하여 FSO에서 고객 사례를 만들 수 있습니다. 이 시나리오에서는 외부 시스템에서 소비자, 금융 계정, 범주, 간단한 설명 및 메모 필드가 전송됩니다.
이 시나리오에서 액세스하는 테이블은 대출 서비스 케이스[sn_bom_loan_service]입니다.
다음 다이어그램에서는 이 시나리오에 대한 REST API 호출의 흐름을 보여 주고 처리에 대한 간략한 설명을 제공합니다.
|
코드 예시
다음은 필요한 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);