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.