Externe Systeme, die eine Fallanforderung übermitteln
Dieser Anwendungsfall veranschaulicht, wie ServiceNow Financial Services Operations(FSO)-Produkt kann Fallanforderungen von einem externen System empfangen, z. B. Online- oder Mobile-Banking-Anwendung, Core-Banking-Systeme oder andere CRM-Tools.
Jedes System, das REST-API-Aufrufe verarbeiten kann, kann dieses Szenario implementieren, um Kundenfälle in FSO zu erstellen. In diesem Szenario werden die Felder Verbraucher, Finanzkonto, Kategorie, Kurzbeschreibung, und -Notizen werden vom externen System gesendet.
Die Tabelle, auf die in diesem Szenario zugegriffen wird, ist der Darlehensservicefall [sn_bom_loan_Service].
Das folgende Diagramm zeigt den Flow der REST API-Aufrufe für dieses Szenario und enthält kurze Anmerkungen zur Verarbeitung.
|
Beispielcode
Im Folgenden finden Sie ein JavaScript-Beispiel, das die erforderlichen REST-API-Aufrufinformationen generiert und dann die POST-Anforderung an Ihren sendet ServiceNow Instanz.
// 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);