Build Territories from Assignments
direct_buildBuilds territories from known part-to-territory assignments (a ZIP-to-territory sheet or file, including a three-level region/district/territory hierarchy via territory_path) and adds them to the Territory Solution as a new alignment (TAL). Assignments come inline or as an assignments_handle (aup_...) from request_assignment_upload. Sheets with Postal Code plus Territory/Region/Division columns are mapped automatically. Duplicate part_ids follow duplicate_part_policy (default keep_first). Returns a task; the result carries tal_id and ts_handle and paints the open map. Location points load with ingest_accounts; balanced partitions come from auto_build; grouping by a column is account_build.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| tal_id | No | ||
| tal_label | Yes | ||
| ts_handle | No | ||
| part_layer | Yes | ||
| assignments | No | ||
| repair_policy | No | Topology repair for dissolved territories. default fills interior holes in the dissolved geometry (no part is added or reassigned; repair_summary.changed_part_ids lists the territories' own parts). report_only detects holes and changes nothing (warning REPAIR_AVAILABLE). strict fails with REPAIR_REQUIRED when a hole is found. | default |
| map_session_id | No | ||
| expected_revision | No | ||
| assignments_handle | No | ||
| missing_part_policy | No | fail | |
| duplicate_part_policy | No | keep_first |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||