Save a service territory
save_territoryCreate a postal-code territory (no territory_id), update one, or deactivate it (active false). postal_codes are full codes or prefixes ending in * (e.g. "94107", "SW1A*", "5600*"); spaces and hyphens are ignored. New jobs whose address postal code matches get the territory, and its location and staff member when the job has none. An exact code beats a prefix, then higher priority, then the longest prefix.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>"
},
"name": "save_territory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| active | No | ||
| site_id | Yes | ||
| priority | No | ||
| staff_id | No | ||
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| location_id | No | ||
| postal_codes | No | ||
| territory_id | No |