Create Territory Solution (Territory Design)

Available with Business Analyst license.


Creates a new territory solution with two levels and loads input features into the base level.


  • Input features for the base level can be a point feature layer or a polygon feature layer.

  • The type of input layer will determine how the base level is displayed—for example, points or polygons.

  • Additional geometries can be created to display either boundary centers or polygon boundaries.

  • Additional layers can be created to display the base level—for example, centers of polygons or boundaries of points.

  • The ID Field and the Name Field parameters are optional and are used to uniquely identify the features in the base layer. Examples are ZIP Code or census tract names. If no ID field is provided, a unique ID will be generated automatically.

  • By default, all of the fields in the input layer will be added to the territory solution. You can turn off field visibility by right-clicking the column header and clicking Hide Field if you do not want the field to be added to the territory solution.

  • The %Number% variable determines where the integer number is placed, either after or before the territory name—for example, Territory %Number% produces Territory 1, Territory 2, and so forth, whereas %Number% Territory produces 1 Territory, 2 Territory, and so forth.

  • A mask layer is only supported for a point-based territory solution.


CreateTerritorySolution(in_features, solution_name, {id_field}, {name_field}, {territory_level_name}, {default_territory_name}, {in_boundary_mask})
ParameterExplanationData Type

The geometry or data features that will be used as the base level of the created solution. The level will have the same name as the input features.

Feature Layer

The name of the territory solution to be created.


The field that contains ID values for objects in the level.


The field that contains name values for objects in the level.


The name of the territory level—for example, level 2.


The prefix for the names of the new territories that will be created—for example, Territory 1, Territory 2, and Territory 3 or District 1, District 2, and District 3.


The layer that is used as a mask to limit the growth of point-based layers.

Feature Layer

Derived Output

NameExplanationData Type

The output territory solution.

Group Layer

Code sample

CreateTerritorySolution example (Python window)

The following Python window script demonstrates how to use the CreateTerritorySolution tool.

import arcpy"CensusTacts", "Territory Solution", "CensusID", "TractName", "Territories", "Territory", None)


Licensing information

  • Basic: Requires Business Analyst
  • Standard: Requires Business Analyst
  • Advanced: Requires Business Analyst

Related topics