Verizon Connect Integration with NB.ai’s Route Optimization API

Introduction

Verizon Connect serves as a comprehensive fleet management software, empowering fleet owners to streamline their operations. Tailored for businesses with mobile workforce requirements, Verizon Connect harnesses GPS technology and telematics data to offer real-time insights into various facets of fleet management. From tracking vehicle locations to monitoring driver behavior, fuel consumption, and maintenance needs, Verizon Connect provides a holistic solution for optimizing fleet operations.

Nextbillion's Route Optimization API offers businesses accurate and efficient route planning, helping them save time, reduce costs, and enhance customer satisfaction. The API offers over 50 custom parameters that can help businesses to manage their fleet operations as per their requirements.

By combining the capabilities of Verizon Connect and Nextbillion's Route Optimization API, businesses can revolutionize their operations on the field and stay ahead in today's competitive market.

Prerequisites

In order to successfully integrate Verizon Connect with NextBillion.ai's services, certain prerequisites must be met. These include:

  1. Access to the Verizon Connect Developer Portal

    • Ensure that you have the necessary credentials to access the Verizon Connect Developer Portal. This platform serves as the gateway to initiating the integration process seamlessly.
  2. Reveal Integration User Credentials

    • You'll need a Reveal Integration user account, complete with a username and password. These credentials are automatically shared with you via the Reveal Marketplace, streamlining the setup process.
    • For detailed information regarding Reveal Integration user credentials, refer to this link.
  3. NextBillion.ai's API Key

    • Acquire a valid API key from NextBillion.ai, which acts as the authentication mechanism for connecting your Verizon Connect Field Service instance with NextBillion.ai's services.
    • This key establishes a secure and authorized communication channel between the two platforms, facilitating seamless data exchange and integration. Contact support to get your API key.

Verizon Connection App

To integrate with Verizon, follow these steps to build a connection app within the Verizon developer portal and establish a connection using REST API queries. Refer to the official documentation for detailed steps.


  1. Create a Verizon Connect App

Navigate to the Verizon developer portal and create a new app dedicated to your integration.

docs-image
  1. Retrieve Authorization Token

Use Postman to retrieve the Authorization token by following these steps:

  • Refer to the detailed instructions provided here for a visual guide.
  • Once obtained, store the access token securely for future use.
docs-image
  1. Test Connection via Curl Requests

  • With the access token in hand, proceed to test the connection by performing curl REST API requests.
  • Use standard curl commands to interact with the Verizon APIs and ensure the connection functions correctly.

By following these steps, you'll successfully establish a connection app with Verizon for your integration.

Integration Steps

Step 1: Pull List of Vehicles from Verizon Connect

In this step, we retrieve vehicle data from the Verizon Connect account. The objective is to pull a comprehensive list of vehicles that provide essential details for further analysis and optimization.

docs-image

API Request

Use the following cURL command to retrieve vehicles data.

1
# Fetch Vehicles from Verizon Connect
2
curl --location 'https://fim.api.us.fleetmatics.com/cmd/v1/vehicles' \
3
--header 'Authorization: Atmosphere atmosphere_app_id=[Verizon Connect App ID], Bearer [Authorization Token]'

API Response

The following API response represents information about vehicles retrieved from Verizon Connect.

1
[
2
{
3
"Name": "GPS History Vehicle 7",
4
"VehicleNumber": "1007",
5
"RegistrationNumber": "1007",
6
"VIN": "1FAFP40664F177257",
7
"Make": "Ford",
8
"Year": 2004,
9
},
10
}

Step 2: Pull Work Order Records

In this step work-order records are fetched and mapped to the jobs and shipments parameter of NextBillion.ai’s Route Optimization API.

Users have the following flexibility to source work order data:

  • Pull from Existing Application: Users can extract work orders directly from their existing application and integrate them with the route optimization process.

  • Upload Work Order Data: Users can also upload work orders directly to the application, streamlining the route processing workflow.

The following image visualizes the mock work-orders on the dashboard.

docs-image

Sample Work orders

The following JSON data represents the work orders created for this integration guide.

1
{
2
"pointsArray": [
3
{
4
"country": "USA",
5
"address": "600 Sycamore Turn Lane, Columbus, OH 43213, United States",
6
"business": "Koepp Group",
7
"city": "Columbus",
8
}
9
]
10
}

Step 3: Setup Additional Custom Parameters

Nextbillion's Route Optimization API provides a robust set of over 50 parameters, allowing users to tailor optimization to their specific requirements. In this integration, key parameters like max_tasks, service time, and shift time window are used to fine-tune the optimization process.

Additionally, it is important to define the vehicle's start location and end location. These locations can represent the warehouse from which the vehicle originates and returns after completing deliveries. The service time parameter is critical because it represents the time delivery personnel are required to complete an order.

With the help of these custom parameters, businesses can optimize their route planning and align their goals to meet their logistical objectives. Refer to our Route Optimization API Tutorials to learn more about these custom parameters.

docs-image

Once all necessary data fields have been filled out with relevant information, the inputs can be sent to Nextbillion's Route Optimization API.

Step 4: Data Preparation and Mapping with Route Optimization API

  • After successfully pulling data from Verizon Connect, integrate the fetched data with Route Optimization API.
  • Use the provided API endpoint to map the data to respective API parameters.
  • Configure optimization settings, including shift start and end times, service time, and start and end location coordinates.
1
let vehicles = [];
2
let shifts = [];
3
let starts = [];
4
let ends = [];
5
let veh_attr = [];

Step 5: Create Optimization Job with Route Optimization API

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.

1
#POST Query
2
curl --request POST \
3
--url https://api.nextbillion.io/optimization/v2?key={{localStorage.values.apiKey}}

API Response

The following API response confirms the creation of an optimization job.

1
{
2
"id": "5321be606a4896572c84794d2d5ffa93",
3
"message": "Optimization job created",
4
"status": "Ok",
5
}

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

Use the following GET Query request to retrieve the optimized route result.

1
https://api.nextbillion.io/optimization/v2/result?id={{nbaiOptimizationRun.data.id}}&key={{localStorage.values.apiKey}}

API Response

Upon successful retrieval, the API responds with a JSON structure, providing important information about the optimized route.

1
{
2
"result": {
3
"code": 0,
4
"summary": "{...}",
5
"routes": "[...]"
6
},
7
"status": "Ok",
8
"message": ""
9
}

Visualize Routes using Nextbillion.ai's Route Planner Tool

Explore and analyze optimized routes effortlessly using NextBillion.ai's Route Planner Tool. This tool is accessible through NextBillion.ai's Cloud Console (NCC), providing a user-friendly interface for visualizing, reviewing, and fine-tuning routes generated by the optimization process.

Seamlessly navigate through the routes, gaining valuable insights into the geographical distribution and efficiency of planned tasks. Leverage the Route Planner Tool within NCC to enhance route visualization and optimize your field service operations with ease.

The following image showcases the optimized routes within the Route Planner Tool interface.

docs-image

© 2024 NextBillion.ai all rights reserved.