---
name: moltsets-hubspot-territory-owner-assignment
description: Use this skill to apply territory rules to firmographic data filled by MoltSets and automatically set the right owner on HubSpot deals and companies, run right after a firmographic enrichment pass.
---

# HubSpot Territory and Owner Assignment by Firmographics

Put firmographic data to work once it is on the record. Read the territory rules (employee range, industry, region, or a combination), apply them to HubSpot companies and their open deals, and set 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.

## Triggers

"Assign owners to these HubSpot companies based on employee count and region", "run territory assignment on companies that just got firmographics filled". Use after a firmographic enrichment pass, or to correct unassigned/misassigned companies.

## Requirements

- HubSpot remote MCP (mcp.hubspot.com) and the MoltSets MCP connected in the same client
- Custom objects are not reachable through HubSpot's remote MCP - write to standard company and deal owner properties

## Chain

```
HubSpot companies (recently firmographic-filled, or unassigned / misassigned)
  -> hubspot/search-crm-objects        (companies missing an owner, or owner mismatch vs rules)
  -> MoltSets:
       search_companies                (domain -> employee_range, revenue_range, industry, if not already on record)
  -> apply territory rules             (employee range + industry + region -> owner or team)
  -> hubspot/update-object             (set company owner)
  -> hubspot/list-associations         (open deals on the company)
  -> hubspot/update-object             (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 associated open deals, or company only
- **Fallback owner** - who or which queue gets a company that matches no rule

## Steps

1. Pull companies missing an owner, or flagged as a rule mismatch under the current territory logic.
2. Run `search_companies` for any company still missing the firmographic fields the rules depend on.
3. Apply the territory rules in order (most specific first - named account lists before general industry rules) to determine the correct owner or team.
4. Write the owner to the company record.
5. List open deals associated with the company and, where the deal owner is unset or does not match, update the deal owner to align.
6. Route 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

- Run this right after the firmographic fill skill so newly completed data gets routed the same day rather than sitting stale.
- Order 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 - consider excluding deals with recent activity from the cascade.
