Agent submitting a case
Summarize
Summary of Agent submitting a case
This use case demonstrates how an agent can submit a customer complaint case in ServiceNow by retrieving and integrating customer and financial account data from a remote banking application. The scenario enables agents to search for a customer's account details directly within a complaint form, automatically populate the form with relevant data, and save the complaint case in ServiceNow. This process enhances accuracy and efficiency by synchronizing external customer and mortgage account information into ServiceNow tables.
Show less
Key Features
- Customer Lookup Integration: Agents use an Account Search button on the complaint form to query customer information via REST APIs exposed by the bank application.
- REST API Usage: Two REST endpoints are leveraged:
GET /api/getConsumerDetailsto retrieve customer details.GET /api/getFinancialAccountsto fetch associated financial accounts such as mortgages.
- Data Synchronization: Retrieved customer and financial account data is stored locally in ServiceNow’s
Consumer [csmconsumer]andLoan Account [snbomloanaccount](a type of financial account) tables using GlideRecord API for create/update operations. - Customizable Search Parameters: The search pop-up allows configuration of search criteria based on the customer's external system, supporting integration with various core banking and CRM systems.
- Automated Form Population: After account selection, the complaint form auto-fills with the customer's mortgage account information, allowing the agent to add case-specific details before submission.
Implementation Highlights
- RESTMessageV2 API: Used to send GET requests to the bank’s REST endpoints and retrieve JSON responses.
- GlideRecord API: Used to create or update records in the ServiceNow consumer and financial account tables based on the retrieved data.
- Example JavaScript Code: Provided sample scripts demonstrate how to:
- Fetch consumer details from the bank application.
- Fetch consumer financial accounts like mortgages.
- Create/update ServiceNow records accordingly.
- Display retrieved data on a UI page for agent review.
Benefits for ServiceNow Customers
- Streamlined Case Submission: Agents can quickly find and attach accurate customer and mortgage data, reducing manual data entry errors.
- Data Consistency: Synchronizing external customer and financial account information with ServiceNow ensures up-to-date records within the platform.
- Flexible Integration: The approach supports integration with multiple core banking and CRM systems by configuring REST endpoints and search parameters.
- Improved Customer Service: Faster complaint handling with trusted customer data enables better service outcomes.
This use case illustrates how to enable an agent to submit a case for a known customer.
In this scenario, from within an FSO complaint form, an agent looks up a customer's account information, which is located on a remote bank application. Once located, it appears within the complaint form and the agent then manually fills in the case details related to the customer's mortgage account and save the complaint case. In the background, the form script saves the customer details and financial account information locally on the ServiceNow instance.
- Consumer [csm_consumer]: Contains customer record.
- Loan Account [sn_bom_loan_account]: Contains loan account information for each customer. Note:Loan Account is a type of Financial Account.
The following is an example of a ServiceNow complaint form (case form) that walks an agent through filing a complaint on behalf of a customer. In this form, the agent clicks the Account Search button on the form to locate the customer's account information.
When the agent clicks the Account Search a pop-up similar to the following appears. The pop-up allows the agent to lookup the customer's account using any of the displayed search parameters. You can create your own search criteria based on your specific web service. These web services generally come from Customer Master and Account Master systems, CRMs, core banking mainframes, and APIs from core banking software providers such as Fiserv, FIS, Jack Henry, Finastra and others.
The search returns the following accounts for this customer.
The agent selects the appropriate account and the necessary account information is automatically populated in the case form. The agent then adds any additional information needed to submit the customer case and clicks the Submit button to save the complaint in the ServiceNow instance.
The following diagram shows the flow of the REST API calls for this use case and provides brief remarks on any required processing.
|
Example code
// Fetch consumers for the given first name and last name and associated
// financial accounts from the remote bank application
function fetchConsumers(consumer_fname, consumer_lname) {
var request = new sn_ws.RESTMessageV2();
request.setHttpMethod('get');
request.setEndpoint('api/getConsumerDetails?fname=consumer_fname&lname=consumer_lname');
var response = request.execute();
var responseBody = response.getBody();
var responseObj = JSON.parse(responseBody);
var consumers = responseObj.consumers;
// Create a record in the ServiceNow Consumer [csm_consumer] table for the specified consumer
var consumerDetails = [];
consumers.foreach(function(consumer){
var consumerGR = new GlideRecord('csm_consumer');
consumerGR.initialize();
consumerGR.setValue('uid', consumer.uid);
consumerGR.setValue('name', consumer.name);
consumerGR.setValue('email', consumer.email);
consumerGR.setValue('mobile', consumer.mobile);
consumerGR.setValue('address', consumer.address);
if(consumerGR.update()){
consumer.sysId = consumerGR.getValue('sys_id');
consumer.financialAccount = fetchFinancialAccountsForConsumer(consumer);
}
});
}
// Fetch financial accounts for the specified consumer
function fetchFinancialAccountsForConsumer(consumer) {
var financialAccounts = [];
var request = new sn_ws.RESTMessageV2();
request.setHttpMethod('get');
request.setEndpoint('api/getFinancialAccounts/' + consumer);
var response = request.execute();
var responseBody = response.getBody();
var responseObj = JSON.parse(responseBody);
var financialAccounts = responseObj.financialAccounts;
// Create a record in the ServiceNow financial_account table for each of the customer's financial accounts
financialAccounts.foreach(function(finAccount){
var finAccountGR = new GlideRecord('financial_account');
finAccountGR.initialize();
finAccountGR.setValue('uid', finAccount.uid);
finAccountGR.setValue('type', finAccount.type);
finAccountGR.setValue('number', finAccount.ac_number);
finAccountGR.setValue('balance', finAccount.balance);
if(finAccountGR.update()){
finAccount.sysId = finAccountGR.getValue('balance');
financialAccounts.push(finAccount);
}
});
return financialAccounts;
}
// The following retrieves an object to display in UI page
fnmae = ‘john’;
lname = ‘brown’;
var consumerObj = fetchConsumers(fname, lname);
consumerObj.foreach(function(consumer){
// Display the details on the page and populate it in the form as necessary
console.log(consumer);
});