Update remote information in the system of record
Summarize
Summary of Update Remote Information in the System of Record
This integration scenario demonstrates how to update a customer's credit card limit in the remote bank application through a ServiceNow workflow. It highlights the importance of using the system of record for accurate information and outlines the process for making updates via a REST API call.
Show less
Key Features
- The ServiceNow workflow script requests an update to the customer's credit card limit using the bank application's REST endpoint POST /api/card/updateLimit.
- It is crucial to rely on the system of record for the most current information, particularly when the same data exists in both the bank application and the ServiceNow database.
- This scenario specifically does not update the Credit Card Account table in ServiceNow.
- The workflow accesses the Consumer table (csmconsumer) for business-to-customer records.
Key Outcomes
By following this integration process, ServiceNow customers can effectively manage customer credit limits through automated workflows, ensuring accurate and up-to-date information in the system of record. The provided JavaScript example illustrates how to implement the REST API call to increase a customer's credit limit.
This integration scenario illustrates how to update a system of record within the bank application.
In this scenario, a script in a ServiceNow workflow makes a request to the remote bank application to update a customer's credit card limit. If the new limit is approved, the customer limit is updated in the bank application (system of record).
The table that is accessed in this scenario is the Consumer [csm_consumer] table which contains the business-to-customer records.
The following diagram shows the flow of the REST API calls for this use case and provides brief remarks on any required processing. It assumes that you have used the steps outlined in Lookup remote information in the system of record to obtain the customer account information.
|
Example code
// Shows how to request the increase the credit limit for a specified card
// This code assumes there is a REST endpoint 'api/card/updateLimit' on the bank application system
// REST call to the /api/card/updateLimit endpoint to request
// an update to the customer's credit card limit
function updateCreditLimit(requestBody) {
var request = new sn_ws.RESTMessageV2();
request.setHttpMethod('post');
request.setEndpoint('/api/card/updateLimit');
request.setRequestBody(JSON.stringify(requestBody));
var response = request.execute();
var responseBody = response.getBody();
var responseObj = JSON.parse(responseBody);
return responseObj;
}
// The following is the data object sent to the /api/card/updateLimit endpoint
// to increase the credit limit for the card
var requestBody = {
'cardNumber': 'xxxx-xxxx-xxxx-5896',
'accountNumber': 'xxxxxxxxxxxx9590',
'oldLimit': 'USD 5000',
'newLimit': 'USD 10000',
'requestType': 'Increase_limit',
};
updateCreditLimit (requestBody);