In general, you have to find distance from a given point (your customer) and a polyline (the route). The route from the google directions response is divided into legs, and the leg is consisted of multiple steps... In each step, you have path[] array of locations (pair of latitude and longitude). Let's call each location in the path[] array, a "Vertex".
You have to iterate through all vertices in the route (get all vertices from all steps in the route) and calculate the distance between the polyline created from the current "observed" vertices and the yours POI (Points of Interest - the Customers)
The shortest distance can be calculated by presenting the two vertices & the Customer's location as nVector. After this, by doing Vector cross product of the vectors you find the shortest (orthogonal) distance between the point and the polyline
I had similar problem recently and I solved it that way. I got the idea from the examples Here (look at the DISTANCE POINT TO POLYLINE OR POLYGON example Source code)
If you are confused from the Math involved, maybe this link might help you by explaining the concept of a Vector Cross Product. Also this could also help you to understand the nVector concept.
Because this kind of calculating the distance is pretty much time consuming (if you have many customer locations in the database), you might be interested of filtering some of the locations from the database and not performing calculations for them...look at my answer on this question about how to do filtering on locations based on the route that is shown on the map.
Hope this helps and give you some basic idea on how to start solving your problem. It took me a lot of time till to figure it out. Cheers.