Siebel Field Service Guide > Business Service Methods Reference for Field Service > Dispatch Board >
CalculateDistanceVals is the second API called by GetCalculatedDistanceVals. This method calculates the distance between the new activity location and the employee location, and outputs a list of <Employee Id, Distance Value> pairs.
This method checks the City, State, and Postal Code fields on an address for matching entries in the Zip Code business component. The master list of geocodes can be reviewed using the Administration - Data screen > Zip Code Administration view. The lookup requires that all three fields (City, State, and Postal Code) match exactly in order to return the latitude/longitude location values used in the distance calculation. This calculation determines the straight line distance between the latitude/longitude coordinates for the two ZIP Codes.
The method returns a distance of -1 to alert users when there is no valid result from the data provided. Typically, invalid results occur because of a missing address or unmapped ZIP Code.