Unlocking the Power of AI/ML with ServiceNow

Unlocking the Power of AI/ML with ServiceNow

Table of Contents

  1. Introduction
  2. Architecture Diagram for SageMaker Model Deployment
  3. Integration of AWS API Gateway with ServiceNow Application
  4. Demo Use Case: Incident Task Categorization
  5. Steps for Demo Use Case
  6. Training the Model on SageMaker
  7. Exposing the Model using REST API
  8. ServiceNow Workflow for New Incidents
  9. Creating the Incident and Task in ServiceNow
  10. Predictive Analytics in ServiceNow
  11. FAQ

Introduction

In this article, we will explore the integration of AWS SageMaker with ServiceNow to automate the incident task categorization process. We will walk through the steps involved in deploying the SageMaker model, exposing it as a REST API using the AWS API Gateway, and integrating it with ServiceNow's workflow and ticketing system. The goal is to Create a seamless process that automatically generates tasks in ServiceNow Based on the categorization results from the SageMaker model.

Architecture Diagram for SageMaker Model Deployment

Before we dive into the details, let's take a look at the high-level architecture diagram for the SageMaker model deployment and integration with ServiceNow. The diagram showcases the flow of data and the key components involved in the process.

Architecture Diagram

Integration of AWS API Gateway with ServiceNow Application

The integration of AWS API Gateway with the ServiceNow application plays a crucial role in exposing the SageMaker model's endpoint as a REST API. The AWS API Gateway acts as a bridge between the SageMaker model and ServiceNow, allowing for seamless communication and data exchange. By configuring the API Gateway, we can expose the endpoint from the SageMaker model and integrate it with the ServiceNow application to enable the automation of incident task categorization.

Demo Use Case: Incident Task Categorization

Our demo use case focuses on incident task categorization in ServiceNow. When a new incident or ticket is reported with a short description, such as "network not working" or "hardware installation," we aim to create a new task ticket in ServiceNow. Using AI or ML models running on SageMaker, the fields in the task ticket will be pre-populated based on the model results. This automation streamlines the process of creating tasks and ensures accurate categorization based on the provided description.

Steps for Demo Use Case

To implement the demo use case of incident task categorization, the following steps are involved:

  1. Creating and Deploying a SKLearn Model in SageMaker
  2. Exposing the SKLearn Model as a REST API using AWS API Gateway
  3. Integrating the REST API with ServiceNow's Rest Messages
  4. Creating a ServiceNow Workflow for New Incidents
  5. Triggering the Workflow for New Incidents
  6. Calling the REST API to Get Model Results
  7. Populating Task Fields Based on Model Results

Training the Model on SageMaker

To train the SKLearn model on SageMaker, we start by creating a ServiceNow POC notebook instance in AWS SageMaker. The model is written in the train.py file, where it takes data from an S3 bucket for training. The model creation and training process involves fitting the data and deploying the SKLearn model as an endpoint. Once deployed, the model appears in the SageMaker endpoint for future use.

Exposing the Model using REST API

To expose the SageMaker model as a REST API, we configure the AWS API Gateway. By creating a GET method and specifying the name and path of the endpoint, we can expose the REST API. The integration with ServiceNow requires configuring the necessary service rules and query STRING parameters to enable the flow of inputs and outputs between ServiceNow and the REST API. Once configured, an API URL is generated, which can be used to execute the model and retrieve the results.

ServiceNow Workflow for New Incidents

In ServiceNow, a workflow needs to be created to handle new incidents. This workflow should trigger when a new incident is identified and call the REST API created in the previous steps using scripting execution. This allows us to retrieve the results from the SageMaker model, which are then executed within the workflow. A new task is created, and the task fields are populated based on the model results.

Creating the Incident and Task in ServiceNow

To demonstrate the incident task categorization process, we create a new incident in ServiceNow. We provide a short description, such as "network issue," and submit the incident. This action triggers the workflow we created earlier, which calls the REST API and retrieves the model results. The workflow captures the category result and populates the task description field accordingly. The incident and task details can be viewed in ServiceNow's user interface.

Predictive Analytics in ServiceNow

ServiceNow also offers predictive analytics capabilities. By leveraging the Predictive Intelligence plugin, we can create and deploy classification models within the ServiceNow platform. These models can be used to analyze and predict various fields or attributes based on the provided data. The Predictive Intelligence plugin provides a user-friendly interface for creating, training, and analyzing the models. The results can be visualized through customizable dashboards within ServiceNow.

FAQ

Q: What is the model doing on AWS?

A: The model deployed on AWS SageMaker takes a short description as input and predicts the category based on that description. It is used for incident/task categorization in the ServiceNow application.

Q: How does the model work?

A: The model is trained on data from ServiceNow and uses machine learning algorithms to learn Patterns and relationships between descriptions and categories. It predicts the category by analyzing the provided description.

Q: Can the model handle descriptions other than incidents?

A: Yes, the model can be customized to handle various types of descriptions. By training it on different datasets and categories, it can adapt to different use cases.

Q: Does the model require authentication to access the data?

A: Yes, authentication can be implemented using OAuth 2.0 for the REST API. It can be configured in the REST API settings in AWS API Gateway.

Q: Can the model be published on the ServiceNow platform?

A: Yes, ServiceNow supports the integration of custom models through the Predictive Intelligence plugin. However, access to this feature may require a non-trial version.

Q: Can the training data be fetched directly from ServiceNow using an API call?

A: Yes, it is possible to fetch the training data directly from ServiceNow using the servicenow API. This eliminates the need for manual data export and upload to an S3 bucket.

Q: Is it possible to manage cloud resources within ServiceNow?

A: Yes, ServiceNow provides cloud management capabilities, allowing users to manage their cloud resources, such as AWS or GCP, directly from within the ServiceNow platform.

Q: Does ServiceNow offer marketplace-like functionality for vendors?

A: Yes, ServiceNow has a marketplace where vendors can publish their applications and solutions for other users to Consume. However, the specific use case of deploying SageMaker models within ServiceNow requires further exploration.

Q: Is a real account required to publish models on the ServiceNow platform?

A: Yes, a business account is required to publish models on the ServiceNow platform. Setting up a business account involves obtaining business approval and associating a bank account for payment purposes.

Q: What models from Electrify can be integrated with ServiceNow?

A: The choice of models from Electrify depends on the specific use case and integration requirements in ServiceNow. The sales and product teams need to determine which models can be effectively utilized within the ServiceNow platform.

Q: Is it possible to consume and deploy the entire application offered by the vendor within ServiceNow?

A: Consuming and deploying the entire application offered by a vendor within ServiceNow is generally not supported. ServiceNow focuses on providing a platform for managing services and integrating with external solutions, rather than hosting complete applications.

Q: What is the best model for integration with ServiceNow?

A: The best model for integration with ServiceNow depends on the specific use case and requirements. Considerations such as vendor cleansing or standardization models can be explored based on the nature of the data and processes in ServiceNow.

Find AI tools in Toolify

Join TOOLIFY to find the ai tools

Get started

Sign Up
App rating
4.9
AI Tools
20k+
Trusted Users
5000+
No complicated
No difficulty
Free forever
Browse More Content