Docs

Territories

What it does

Territories show who covers a slice of a partner's map, so a campaign can target a patch instead of a loose list of accounts.

Open Territories (/territories). A territory is a coverage slice on a partner account: region, industry, and segment, with the people who cover it. The list and the drawer are a thin client. A signed-in person can create a row. An agent proposes one and waits for approval. There is no MCP tool that lists or inserts territories directly.

Allowed fields are in Entity fields.

MCP tools

ToolScopeRole
approval_createapprovals:writePropose a territory. table territories, type graph_entity_create
entity_field_writegraph:writeWrite one field through provenance
entity_note_addnotes:writeAppend a note
entity_notes_listnotes:readRecent notes
entity_getnone (token still required)Full card when a search entity exists for the row

Do not call MCP entity_create. It returns deprecated and writes nothing.

HTTP endpoints

MethodPathRole
GET/cockpit/api/territoriesList
POST/cockpit/api/entities/territoriesCreate from a signed-in session. Provenance source is human
GET, PATCH, DELETE/cockpit/api/entities/territories/:idDrawer read, update, delete
POST/cockpit/api/entities/territories/:id/mergeMerge into the keeper

Permissions

Token scopes come from one permission-set layer. A proposal needs approvals:write. A field write needs graph:write. The screen uses the signed-in session.

Row access is RLS by creator. Admins see all rows. Members see their own.

Agent example

Call approval_create with the territory's name and the partner it hangs on. Send a slug or an id for the partner foreign key, not a display name alone.

{
  "tool": "approval_create",
  "arguments": {
    "item_type": "graph_entity_create",
    "title": "Create territory: West Manufacturing",
    "table": "territories",
    "fields": {
      "name": "West Manufacturing",
      "partner": "example-partner"
    }
  }
}

Expected result: a pending card. The territory does not appear on /territories until a person approves it.

{
  "status": "pending",
  "item_type": "graph_entity_create",
  "title": "Create territory: West Manufacturing"
}