---
schema_version: "1"
id: b925138ce87df66695c4c010e801ed434a65840d5b1782f8cb63dafe31543483
title: Import Service Territory Polygons in KML
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/pfs_import_kml.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.pfs_import_kml.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9998a6839ed89e689e0419692f03083d945672804c5108a75d76dca6d5b60eaf
description: Map polygons represent the physical boundaries of a service territory in Field Service. While you can draw a polygon on the Classic Dispatch Console map, you can also import one in KML (Keyhole Markup Language). For example, cities may provide public KML files so you can create service territories whose boundaries correspond exactly to the city borders.
products:
  - Field Service
release: "264"
---
# Import Service Territory Polygons in KML

Map polygons represent the physical boundaries of a service territory in Field Service. While you can draw a polygon on the Classic Dispatch Console map, you can also import one in KML (Keyhole Markup Language). For example, cities may provide public KML files so you can create service territories whose boundaries correspond exactly to the city borders.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">The Agentforce Field Service and Operations core features, managed package, and mobile app are available in <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions.</td></tr></tbody></table>

![Package icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/support_field_service/images/fs_package.png) _This is a Field Service managed package feature._

Before you import a polygon in KML, make sure that you meet these requirements.

- The longitude values range between -180 to +180. These values are the first numbers in each coordinate line.
- The latitude values range between -90 to +90. These values are the second numbers in each coordinate line.
- To clearly define the start and end of the polygon, the first and last coordinates must be identical.
- To prevent a self-intersecting or invalid polygon, make sure that there are no duplicate coordinates, except for the first and last coordinates.

To import a polygon in KML, click the Map Polygons custom object tab in Salesforce and click **New**. Add a name, color, description, and service territory. In the KML Details field, add your KML text. Make sure that each set of coordinates has its own line.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_example.png)

Example

```
<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns="http://www.opengis.net/kml/2.2">
<Style id="myPolygonStyle"> 
<LineStyle> 
<width>1</width> 
</LineStyle> 
<PolyStyle> 
<color>8047A043</color> 
</PolyStyle> 
</Style> 
<Placemark> 
<name>myPolygon</name> 
<styleUrl>#myPolygonStyle</styleUrl> 
<Polygon> 
<outerBoundaryIs> 
<LinearRing>
<coordinates>-122.44257817993167,37.80710430993863,0
-122.4278153015137,37.804391739106606,0
-122.4113358093262,37.80737556154185,0
-122.40412603149417,37.80629054915071,0
-122.38867650756839,37.78974213500372,0
-122.38764653930667,37.74821914921608,0
-122.45390783081058,37.74523293816564,0
-122.4604309631348,37.78865686357955,0
-122.44257817993167,37.80710430993863,0</coordinates> 
</LinearRing> 
</outerBoundaryIs> 
</Polygon> 
</Placemark> 
</kml>
```