Load Territory Records (Territory Design)

Available with Business Analyst license.

Summary

Adds records (features) or updates existing records for the specified level.

Usage

  • The tool specifies an existing territory solution.

  • The tool specifies the level where records will be added.

  • A point layer will add records to the Territories Centers layer.

  • A polygon layer will add records to the Territories Boundary layer.

  • The tool requires a feature layer or table for input.

Parameters

LabelExplanationData Type
Input Territory Solution

The name of the input territory solution.

Group Layer; Feature Dataset; String
Level

The name of the level to which the data will be loaded.

String
Input Data

The layer or records to be loaded.

Table View
ID Field
(Optional)

The field containing the ID values to be loaded into the level.

Field
Name Field
(Optional)

The field containing the name values to be loaded into the level.

Field
Field Map
(Optional)

The values that will be used for the territory properties.

  • Parent Territory ID—The ID of the parent territory.
  • Locked State—The territory can't be modified.
  • Center Locked—Center points can't be modified and will remain in their fixed locations.

Value Table
Append Data
(Optional)

Specifies whether the records being loaded will be appended or replaced.

  • Checked—The records being loaded to the specified level will be appended.
  • Unchecked—The records being loaded to the specified level will be replaced. This is the default.
Boolean

Derived Output

LabelExplanationData Type
Updated Territory Solution

The updated territory solution.

Group Layer

arcpy.td.LoadTerritoryRecords(in_territory_solution, level, in_data, {id_field}, {name_field}, {field_map}, {append_data})
NameExplanationData Type
in_territory_solution

The name of the input territory solution.

Group Layer; Feature Dataset; String
level

The name of the level to which the data will be loaded.

String
in_data

The layer or records to be loaded.

Table View
id_field
(Optional)

The field containing the ID values to be loaded into the level.

Field
name_field
(Optional)

The field containing the name values to be loaded into the level.

Field
field_map
[[attribute, field],...]
(Optional)

The values for the territory properties.

  • parent_territory_id—The ID of the parent territory.
  • locked_state—The territory can't be modified.
  • center_locked—Center points can't be modified and will remain in their fixed locations.

Value Table
append_data
(Optional)

Specifies whether the records being loaded will be appended or replaced.

  • APPENDThe records being loaded to the specified level will be appended.
  • REPLACEThe records being loaded to the specified level will be replaced. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_territory_solution

The updated territory solution.

Group Layer

Code sample

LoadTerritoryRecords example (Python window)

The following Python window script demonstrates how to use the LoadTerritoryRecords function.

import arcpy
arcpy.td.LoadTerritoryRecords("Territory Solution", "Level[1]", r"C:\Temp \sampledata.gdb\StoreLocations", "ID", "Name", None, "REPLACE")

Environments

Licensing information

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

Related topics