Lookup remote information in the system of record
Summarize
Summary of Lookup remote information in the system of record
This use case demonstrates how ServiceNow customers can integrate with a remote banking system (system of record) via a REST API to retrieve financial transaction details for a customer’s mortgage account. The integration supports call center agents who create Financial Services Operations (FSO) cases in ServiceNow and need to verify transaction information from the bank before completing the case.
Show less
Key Features
- REST API Integration: Uses a REST call (GET /api/getTransactions) to query the remote bank application for financial transaction data based on consumer and financial account inputs.
- Remote Tables: Financial transaction details returned from the bank are stored temporarily in ServiceNow remote tables (cached in memory, not persisted in the database) using the vtable API, enabled by the Remote Tables (com.glide.script.vtable) plugin.
- GlideRecord API: Optionally, customers can write remote data into ServiceNow database tables using GlideRecord for persistent storage.
- Data Display in FSO Form: Retrieved transaction details are displayed on the FSO case form for agent verification before completing case entry.
- Example Code Provided: Illustrates how to invoke the RESTMessageV2 API to send requests and store results in remote tables, as well as how to query those remote tables and display data on the form.
Practical Application for ServiceNow Customers
By implementing this scenario, call center agents can efficiently validate customer financial transaction data from an authoritative external banking system directly within ServiceNow. This reduces manual lookup errors and speeds case resolution.
To enable this functionality, customers should:
- Ensure the remote banking system exposes the required REST endpoint.
- Activate the Remote Tables plugin to use the vtable API for caching remote data.
- Use the provided script patterns to configure RESTMessageV2 calls and process responses.
- Adapt the example GlideRecord queries to suit their form and data model.
Expected Outcomes
- Real-time retrieval of accurate financial transaction details from an external system of record.
- Improved agent productivity by showing verified data within the ServiceNow form before case completion.
- Flexible data storage options: temporary caching in remote tables or persistent storage via database tables.
- A streamlined workflow for handling financial service operations cases involving external data validation.
This use case illustrates how to use a REST API call to lookup financial transaction details for a customer’s mortgage account on a remote banking system (system of record).
A call center agent responds to a customer inquiry and creates a new FSO case using a ServiceNow form. In that form, they manually enter the consumer, financial account, category, and short description information, and any associated notes.
Using the consumer and financial account information, a script within the ServiceNow form calls a remote REST endpoint on the remote banking system (bank application) to obtain the financial transaction details. It then displays these details in the ServiceNow form so that the agent can verify the information before manually entering the remainder of the required case information. Once complete, the FSO case is cached on the ServiceNow instance.
The following is an example of what the financial transaction details received from the remote bank application might look like when they appear on the FSO case form:
The following diagram shows the application flow for this use case scenario and provides brief remarks on any required processing. In this implementation, the data obtained from the remote bank application is store in remote tables. Remote tables are only cached in memory, they are never stored in the ServiceNow database tables. You can also implement this scenario by writing the remote data to the corresponding ServiceNow database tables. The s scenario illustrates how to store data in the ServiceNow database tables using the GlideRecord API.
|
Example code
(function executeQuery (v_table, v_query) {
// Parameters needed in the request body of the REST endpoint
var requestBody = {
'financial_account':v_query.getParameter('financial_account')
};
// Instantiate the RESTMessageV2 object
var request = new sn_ws.RESTMessageV2();
// Set the HTTP method as "GET"
request.setHttpMethod('get');
// URL of the endpoint on the bank application
request.setEndpoint('https://<yourbankapphost>/api/getTransactionDetails');
// Request body as a string
request.setRequestBody(JSON.stringify(requestBody));
// Call the REST endpoint
var response = request.execute();
// Get the response body
var responseBody = response.getBody();
// Parse the response body into an object
var responseObj = JSON.parse(responseBody);
// Store the response body into a virtual table
v_table.addRow({
sys_id: gs.generateGUID(),
amount: responseObj.amount,
description: responseObj.description,
posting_date: responseObj.posting_date,
transaction_date: responseObj.transaction_date
});
}) (v_table, v_query);Example code
function getRequiredInfo() {
// Instantiate a GlideRecord object with the remote table containing the financial transaction details.
var now_GR = new GlideRecord('transaction_details_remote_table');
// Create a query to obtain the desired financial account
now_GR.addQuery('financial_account', g_form.getValue('financial_account'));
// Execute the query
var result = now_GR.query();
// Display the data in the FSO form
var data = [];
data ['amount'] = result.amount;
data ['description'] = result.description;
data ['posting_date'] = result.posting_date;
data ['transaction_date'] = result.transaction_date;
return data;
}
getRequiredInfo();