# Why is address geocoding critical for accurate travel time and routing calculations?

**Topic:** Field Service · **Difficulty:** Medium · **Tags:** Field Service, Geocoding, Routing

Read it on the site: https://www.forcechallenges.com/interview-questions/why-is-address-geocoding-critical-for-accurate-travel-time-and-routing-calculations

## Answer

**Basics:** Computers cannot measure distance between "12 Main St" and "98 Oak Ave" without coordinates. Geocodes supply them.

**How it works:** Salesforce can populate coordinates through geocoding data integration rules for standard address fields. Field Service uses latitude/longitude on Service Appointments, Service Territory Members and Territories. The engine calculates travel using aerial distance with a configured speed, or street-level routing if enabled in Field Service settings. Appointments missing coordinates show on the Gantt as unmappable, and travel-based rules do not work properly.

**Advanced / deep dive:** Geocode accuracy matters; a postcode-level geocode puts all addresses at the centroid, giving inaccurate travel. Store geocode accuracy and review low-accuracy ones. Common pattern: Flow or Apex on create/update of the work order address triggers geocoding via the Salesforce service or an external provider, using async code since callouts cannot be made inline in triggers. Polygons depend on accurate coordinates. Street-level routing improves estimates but costs processing and may need extra enablement.

**Code / config example:**
```text
Setup > Data Integration Rules > Geocodes for ... Address > Activate
Field Service Settings > Scheduling > Routing: choose aerial or street-level routing
```

**Hidden gotchas & must-remember points:**
- Aerial routing ignores roads and rivers, so estimates may be badly off.
- Geocoding is not instant; handle newly created records.
- Missing coordinates break Maximum Travel From Home rules.
- Technician home address needs geocodes too.
- Verify which objects geocoding rules cover in your edition.

**Best practice:** Geocode every address on creation, monitor accuracy, and enable street-level routing where travel precision matters.

---
Source: ForceChallenges · last updated 2026-11-02
