Integration of ServiceNow Field Service Management Software and NB.ai’s Route Optimization API
Introduction
ServiceNow® Field Service Management (FSM) stands out as a comprehensive solution in the constantly evolving landscape of service management, streamlining operations and fostering collaboration. ServiceNow's FSM, a single-platform powerhouse, improves scheduling and dispatching efficiency, optimizes workforce management, empowers field service teams, and elevates service delivery. FSM caters to a wide range of organizational needs, from integrated service to a robust partner ecosystem, self-service capabilities, territory planning, and project management.
NextBillion.ai's Route Optimization API is a powerful tool designed to revolutionize business route planning. The API ensures optimal route selection for fleets by taking into account factors such as time windows, capacity, and vehicle availability when addressing the Single and/or Multi-Vehicle Routing Problem (VRP).
NextBillion.ai's API, which consists of two key components - input data and the optimization engine - integrates seamlessly with ServiceNow's FSM. The input data contains relevant information about jobs, vehicles, and shipments. Using this data, the optimization engine determines the most efficient routes while taking into account complex constraints and variables.
This document will provide a step-by-step guide as we dive into the integration details, ensuring a seamless integration of ServiceNow's FSM and NextBillion.ai's Route Optimization API. Organizations can achieve unparalleled efficiency, time savings, and cost reductions in their field service operations by combining the strengths of these two powerful tools.
Prerequisites
The following prerequisites are mandatory requirements to ensure seamless integration between ServiceNow and NextBillion.ai.
-
ServiceNow account with ServiceNow instance
-
NextBillion.ai's API key: It is necessary to authenticate the API requests sent to the Route Optimization API.
These prerequisites lay the foundation for successful integration, facilitating the smooth exchange of data and functionalities between the two systems.
Integration Steps
This section outlines the integration steps for incorporating ServiceNow records into NextBillion's Route Optimization API using the Retool development suite, generating optimized routes by triggering Route Optimization API and visualizing the result using Optimization Tester.
Step 1: Setup Field Service Management Software
1. Create a ServiceNow Account
Establish a ServiceNow account to initiate the integration process.
2. Set up Field Service
-
Navigate to
All
➝Field Service
➝Administration
➝Guided Setup
within your ServiceNow account. -
Follow the guided setup to configure the database and populate relevant data records (e.g., user groups, field technicians, dispatchers, work order tasks).
3. User Authentication
-
During guided setup, create a user with a specific user ID and password credentials.
-
Record the username and password as they serve for authentication in REST API calls outside the ServiceNow instance.
4. User Management
-
In ServiceNow, locate
Users
underAll
➝Organization
➝Users
. -
Create a new user, assign a user ID, set a password, and assign necessary user roles (e.g., admin roles for comprehensive data access).
5. API Connection Testing
Verify API connectivity using Postman to ensure seamless integration.
Note: The subsequent steps demonstrate the integration process using Retool, a custom software development platform. A parallel methodology can be applied when integrating NB.ai's Route Optimization API with ServiceNow.
Step 2: Retrieve Work Order Tasks
In this step, we retrieve work order tasks from the ServiceNow account. The objective is to pull a comprehensive list of work order tasks that provide essential details for further analysis and optimization.
API Request
To fetch work order tasks from ServiceNow, use the following cURL command:
API Response
The following API response contains a structured set of information, such as task details, associated links, and relevant attributes. This step lays the groundwork for subsequent actions.
The following image displays the work order information accessible through the integration, allowing seamless visualization and manipulation within the Retool application.
Step 3: Retrieve Dispatchers Information
To optimize routes based on vehicle capacity and other parameters, it's crucial to obtain a list of dispatchers, representing your vehicles.
API Request
Execute the following cURL command to fetch dispatcher information from ServiceNow:
API Response
The API response returns a comprehensive list of dispatchers, which represent field service vehicles. Name, contact information, geolocation coordinates, and organizational affiliations are all included in each dispatcher entry. Attributes like gender, employee count, and user roles are also returned in the API response. This data is used to optimize routes based on vehicle capacity and other parameters, increasing the efficiency of field service management.
The following image displays the dispatchers' data returned in the API response, presented on the Retool application, providing a user-friendly interface for further actions.
Step 4: Data Preparation and Mapping
After successfully pulling the necessary data from ServiceNow, the data is mapped with the respective Route Optimization API parameters. Configure optimization settings such as shift start and end time, service time, and start and end location coordinates.
Step 5: Create Optimization Job
In this step, the mapped data is sent to Route Optimization API to create an optimization job and response confirms the job creation and returns a unique job id
.
API Request
The following cURL command sends a POST request to the Route Optimization API to create an optimization job.
API Response
The following API response confirms the creation of optimization job.
Step 6: Retrieve Optimized Route Result
Retrieve the optimized route result by making a GET request to the NextBillion.ai Route Optimization API with the job ID and API key.
API Request
API Response
Step 7: Visulaize Optimized Route Results
The optimized route results can be visulalized with the help of our Route Optimization Tester.
Use the following link to visualize the optimized routes.
The above link directs you to the Optimizer interface, providing a convenient way to inspect and analyze the optimized routes generated by the Route Optimization API. Simply replace the placeholders with your API key and the request ID obtained from the API response for seamless integration and route assessment. The following image visualizes the routes generated by the Route Optimization API within the Tester interface.
ServiceNow and NextBillion.ai's Route Optimization API integration combines the strengths of a leading service management platform and cutting-edge route optimization technology. This integration enables organizations to improve their logistics and service delivery capabilities, resulting in operational excellence and, ultimately, a more agile and responsive business environment.