Calculating Distances Between Addresses: Google API with NetSuite 

Background 

This blog helps you to get distance between specific source, destination and calculate freight. It helps many business providers like Shipping/transportation, transportation broker, cargo, ecommerce etc. It helps customers to estimate delivery time and cost.

While they can directly inquire with truckers for new job quotes, referencing similar past jobs can provide faster and more accurate pricing information. 

The challenge lies in efficiently identifying past transportation jobs that closely resemble new ones needing pricing. Service provider effectively find these comparable past jobs to assist in estimate new transportation/delivery tasks?

NetSuite Geocoding Address and Routes 

To identify similar transportation jobs to the ones that need to be priced, it’s crucial to start with the basics. Every street address corresponds to a latitude and longitude (Long/Lat) coordinate. Knowing the Long/Lat of two addresses, we can apply trigonometry to calculate the distance between them. 

Leveraging the Google Maps API for distances that adhere to actual roads and viable travel routes rather than just straight-line distances. 

Making Previous Transportation Jobs Become Pricing Insights 

When transportation jobs are completed, we capture the distance traveled (in miles or kilometers), along with the associated costs and pricing. Recent jobs are generally more indicative of current market conditions and logistics considerations than older ones. 

For each new transportation/delivery job, we start by identifying the pickup (source) and delivery (destination) addresses. We then decide on a mileage radius to search for similar past jobs near this new job’s route. This enables us to query NetSuite for relevant past jobs and provide this data to pricing planners. These planners can then rapidly estimate costs for new jobs, enhancing their ability to rapidly respond to customer inquiries with pricing quotes. A quick turnaround in these quotes gives our clients a competitive edge. 

With NetSuite SuiteScript and enhancements for storing Lat/Long data within address records, we’re equipped to rapidly retrieve information about distances between addresses.

Referencing the related image, we can see that Job # 196587 departs from zip code 78620 (which is only 4 miles from the prospective job’s starting address) and delivers to zip code 33122 (which is only 6 miles from the prospective job’s ending address). That previous job covered a total distance of 1,378 miles (about 2217.68 km); and we charged the customer $500 while our cost was $200. This is shown in real time and includes the “most similar” jobs as the planner is crafting the customer quote.

Table of Contents

Let’s connect!

Our friendly team would love to hear from you.
Call Us

+91 9824219200

Mail Us

hello@ecobsoft.com

“Our mission is to empower individuals and organizations to navigate the digital world with confidence and peace of mind.”

Kaushik Karia

Co-Founder & CEO

Ecobsoft Logo

Discover Latest Articles

Let us know how we can help with your next project?

Embark on your next project with confidence as EcobSoft stands ready to be your strategic partner. Our seasoned team of experts is dedicated to providing end-to-end support, from project conceptualization to seamless execution. With a proven track record in delivering innovative solutions, tailored to your unique needs, we bring a dynamic approach to every endeavor.

0 +

Active client with positive reviews

Book A Free Consultation

Our friendly team would love to hear from you.