Auto-Build Territories
auto_buildPartitions ingested account points into balanced sales territories with equal workload, metric, or count over a part layer (e.g. ZIPs) as a new alignment (TAL). Needs the user's choices: build_mode (fixed_territory_count + territory_count, fixed_workload_target + target_workload hours, or scoped_split), objective (workload_bias for drive time + dwell; metric + metric_bias for a column such as Revenue; biases sum to 100), and dwell_time (a column or a stated scalar). Each missing choice returns CLARIFICATION_REQUIRED with ask_user; a declared visit-frequency column also needs visit_frequency_field or ignore_visit_frequency. part_scope: bbox_intersect (default; parts near the accounts, can reach national scale) or explicit with part_filter, e.g. {state_abbr: TX}. The filter limits parts; accounts outside it stay on the layer, unassigned (UNASSIGNED_ACCOUNTS). With map_session_id the open map is the input. Returns a task; national builds take minutes and estimated_remaining_ms is capped, not a forecast. The result carries tal_id, ts_handle, and phase_timings_ms; analyze has statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| part_ids | No | ||
| objective | No | ||
| tal_label | Yes | ||
| ts_handle | No | ||
| build_mode | No | ||
| dwell_time | No | ||
| part_layer | Yes | ||
| part_scope | No | ||
| output_mode | No | tal is the default. assignments returns assignments_artifact plus an authenticated download_url; no ts_handle, tal_id, or map_refresh. | tal |
| part_filter | No | ||
| point_layer | Yes | ||
| 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 | ||
| visit_frequency_field | No | ||
| ignore_visit_frequency | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||