Intelligent field supply chain with Amazon Location Service and AWS Amplify
A solution guidance to help direct store delivery, route sales, and field service teams take the fastest path
Time spent in traffic is the penalty paid by all route sales representatives and field service technicians just to do their jobs. Saving drive time adds to employee morale, customer satisfaction, and company bottom lines. In this blog post, we describe an application that uses Amazon Web Services (AWS) to create and optimize routes while tracking the team member’s progress in near real time as they drive.
Who can benefit?
Many food and beverage companies use the Direct-Store Delivery (DSD) fulfillment model to retain control over their channel strategy and merchandising while facilitating higher customer satisfaction through excellent in-store execution. However, the frontline workforce goes through high turnover, with attrition rates of up to 30 percent per year among route sales representatives. DSD routes don’t change from one day to the next, but real life does catch up from time to time. Territories get reassigned due to changes in the customer base or the workforce, drivers go on vacation or fall ill, or an urgent email from the store manager may arrive that must be given top priority. In other industries, field sales and service technicians who work with industrial or residential customers on equipment installation or repair must complete all the day’s jobs before ending their workday. Efficiently routing and conveniently rerouting the team member through the day’s stops not only increases the time they can spend with the customer to improve stock rotation and merchandising at a retail store but also boosts their job satisfaction. Happy customers and happy employees are good for company profits.
A head start on the path to location awareness
Business processes of large companies are often specific to them, and IT teams must devise bespoke solutions from commercially available building blocks. In-house teams must regularly learn new skills and technologies like managing near-real-time location data and itineraries, geocoding/reverse geocoding, and generating optimal paths before handing over a robust application to a user community that can identify when something works or not.
Our AWS solution – Intelligent route optimization and tracking using Amazon Location Services and AWS Amplify – brings together several AWS systems that provide a starting point for new capabilities that can be deployed immediately. It can be used to add route management and location awareness to existing workflows and applications or even become the foundation for new ones. The solution is packaged as a web-based application that can support role-based access, including different workflows for the dispatcher, driver, and customer (a store manager or a residential customer). Three modules work together to create this complete capability:
- Route entry: Origin, destination, and waypoints of a route can be created by simply clicking on a map or typing an address into a search box. Using a map view helps the human dispatcher use their intuition when assigning or reassigning territories or when trying to identify the nearest driver who can step in to help another.
- Route calculation: The solution automatically determines the best order in which to traverse a group of locations based on total travel time, road networks, distance, and traffic.
- Route tracking: Driver location is automatically updated on the map in near real time based on data from an Internet of Things (IoT) or mobile device, improving safety and potentially receiving assistance from nearby team members.
Using native AWS services for simplified route entry, calculation, and tracking
The figure below shows how the three modules of our application work together behind the scenes:
- Route entry: The route entry component uses React development from AWS Amplify, a set of purpose-built tools and features that help front-end web and mobile developers quickly and easily build full-stack applications on AWS. Alongside AWS Amplify, the solution uses AWS AppSync, a serverless GraphQL and Pub/Sub API service that simplifies building modern web and mobile applications, and Amazon DynamoDB, a fully managed, serverless, key-value NoSQL database designed to run high-performance applications, to help the field service dispatcher enter and store destination and waypoint locations from a map or search box.
- AWS Amplify and Amazon Location Service, which securely adds location data to applications, are used to display a map and activate location entry on the map for origin, destination, and waypoints.
- AWS Amplify and AWS AppSync integration (AWS Amplify add API) is used to automatically create a GraphQL schema for the AWS Amplify map user interface (UI) (React) with Amazon DynamoDB as a data source. AWS AppSync stores dispatch identification (primary key) and location coordinates (latitude and longitude) for the route as an item in Amazon DynamoDB.
- Route calculation: The route calculation component uses AWS Lambda—a serverless, event-driven compute service that lets the customer run code for virtually any type of application or backend service without provisioning or managing servers—Amazon Location matrix routing, and AWS AppSync to automatically create an optimized, lowest cost route based on the shortest time to complete the trip. Then it displays the optimized route on the map.
- AWS Lambda retrieves initial location coordinates from Amazon DynamoDB and invokes the Amazon Location route calculator with matrix routing to calculate the lowest cost route.
- AWS Lambda stores the optimized route in the form of a sorted list of points in Amazon DynamoDB and uses the Amazon Location map API to display the initial route.
- Route tracking: The route tracking component combines the AWS Amplify-based React application with AWS AppSync, AWS IoT Core—which allows users to connect devices to the cloud—and Amazon Location tracker to track a driver on the map as they complete their route. It also simulates an IoT sensor/device installed in their vehicle.
- IoT device sends location updates to IoT core.
- IoT core invokes and updates AWS Lambda for Amazon Location tracker with location updates.
Gateway to advanced capabilities
While route optimization, driving, and delivery play out in the world day-to-day, supply chain, customer fulfillment, and service leaders can build on the capabilities presented here to create differentiated offerings and increase customer value over the long term. AWS can enable robust and well-architected persistence, visualization, and analytics of data and metrics for trip and team performance. Customers can combine this data with machine learning-based technologies from AWS to determine if deliveries are meeting on-time targets, balance service capacity with predicted demand, and improve productivity on the road and at the job site with vision and IoT-based AWS services.
If you’re ready to automate and simplify DSD, route sales, and field service route planning, AWS is here to help you improve operations by overcoming this and other critical challenges. Contact your AWS account team to get started today.