A new knowledge base article has been published on our support portal.
Scenario Overview
In this scenario the business requirement was to calculate the driving distance and travel time for a student to Oxford University College. If a student’s home address is more than 70 miles away then they are to be marked as eligible for Student accommodation.
To achieve this we are going to use the Bing Maps REST API to do the driving distance and travel time calculations and then update the student’s contact record with the results.
You can sign up for a Bing Maps account and API
Note 3: The TravelDistance value is returned in the JSON response as a string value, so we use Truncate() to convert it to a number value and remove any decimal portion to compare with the 70. Also the TravelDuration is returned in seconds, so we divide it by 60 to get the duration in minutes.