---
name: moltsets-attio-territory-owner-assignment
description: Apply your territory rules to firmographic data filled by MoltSets, and automatically set the right owner on Attio deals and companies.
---

# Attio Territory and Owner Assignment by Firmographics

## Triggers

- "Assign owners to these Attio companies based on employee count and region"
- "Run territory assignment on companies that just got firmographics filled"

## What this skill does

Puts firmographic data to work once it is on the record. It reads your territory rules (employee range, industry, region, or a combination), applies them to Attio companies and their linked open deals, and sets the correct owner. Built to run right after firmographic fill, so companies that just had industry, size, and region completed get routed immediately rather than sitting unassigned or with the wrong rep.

## Chain

```
Attio company records (recently firmographic-filled, or unassigned / misassigned)
  to attio/query-records                (companies missing an owner, or owner mismatch vs rules)
  to MoltSets:
      search_companies                  (domain -> employee_range, revenue_range, industry, if not already on record)
  to apply territory rules              (employee range + industry + region -> owner or team)
  to attio/update-record                (set company owner attribute)
  to attio/query-records                (open deals referencing the company)
  to attio/update-record                (set deal owner to match, where deal owner is unset or stale)
```

## Inputs

- **Territory rules** - the mapping from employee range, industry, and/or region to owner or team
- **Scope** - unassigned companies only, or also companies with an owner that no longer matches current rules
- **Deal cascade** - whether to also update the owner on linked open deals, or company only
- **Fallback owner** - who or which queue gets a company that matches no rule

## `search_companies` filter notes

- **Use `domain` when you have one.** Exact match, always beats a free-text `query`, and full URLs are normalised automatically ("https://www.acme.com/about" → "acme.com") - no need to strip the protocol or path first. `query` searches the company **name only**.
- **Filters are free precision.** Execution cost comes from `query`, not the filters attached to it - a filters-only call runs **~40x cheaper**, and most firmographic lookups need no free text at all. Billing is unchanged: tokens are charged per record returned.
- **Full filter set:** `query`, `domain`, `industry`, `linkedin_industry`, `naics_code`, `employee_range`, `revenue_range`, `country`, `state`, plus `limit`/`offset`.
- **Industry vocabularies overlap.** `industry` carries broad buckets *and* long-tail values (`"Computer Software"`, `"Insurance"`, `"Banks"`, `"Aerospace and Defense"`), so the same company may be filed under either - if a lookup comes back thin, try the neighbouring value. `linkedin_industry` (~150 niche labels) and `naics_code` (any hierarchy level) cover finer granularity.
- **Location is derived from where the team is based.** Accurate for small companies, but **large multinationals resolve to a single one of their offices** - don't lean on `country`/`state` alone for enterprise or international targeting.
- **Range values are exact and skewed.** `"1-10"` dominates `employee_range`; `"$500k - $1M"` dominates `revenue_range`. Prefer numeric bands over legacy `"Small"`/`"Mid-Market"`/`"Enterprise"`/`"Unknown"`, and always use `"$500k - $1M"` over the legacy `"$1 - $1M"` (same range, far fewer records).
- **Read `results.total` before paginating.** Results are `_score`-ranked; 25 max per call, increment `offset` by `limit`.

## How it works

1. Pulls companies missing an owner, or flagged as a rule mismatch under the current territory logic
2. Runs `search_companies` for any company still missing the firmographic fields the rules depend on
3. Applies the territory rules in order (most specific rule first, for example named account lists before general industry rules) to determine the correct owner or team
4. Writes the owner to the company record
5. Queries open deals that reference the company and, where the deal owner is unset or does not match, updates the deal owner to align
6. Routes anything matching no rule to the fallback owner or queue rather than leaving it unassigned

## Output

| Company | Domain | Employees | Industry | Region | Rule Matched | Assigned Owner | Deals Updated |
| --- | --- | --- | --- | --- | --- | --- | --- |

```
Companies reviewed:          X
Owner assigned:              X
Rule mismatches corrected:   X
Fallback owner used:         X
Deal owners updated:         X
MoltSets tokens used:        X
```

## Tips

- **Region rules are the risky ones.** `country`/`state` on a company record are derived from where the team is based, and large multinationals are attributed to a single one of their offices - so a global account can route to the wrong rep. Gate region rules behind a size check, or handle named/enterprise accounts with an explicit account list ahead of the general region rule.
- **Size and revenue bands are exact strings.** Write territory rules against the numeric bands (`"1-10"` … `"5001+"`, `"$500k - $1M"` … `"Over $5B"`), not the legacy `"Small"`/`"Mid-Market"`/`"Enterprise"` values, which cover far fewer records and will silently leave companies unrouted.

- Requires the Attio MCP (mcp.attio.com) and the MoltSets MCP connected in the same client
- Run this right after the firmographic fill skill so newly completed data gets routed the same day rather than sitting stale
- Order your territory rules from most specific to most general (named accounts, then industry plus size, then a catch-all) so the first match wins predictably
- Reassigning an owner on a deal already being worked is disruptive, so consider excluding deals with recent activity from the cascade
- Since deals reference their company directly in Attio, finding linked deals is a straightforward query rather than a separate association lookup
